Friday 17 November 2017

Sybase iq द्विआधारी विकल्प


बाइनरी डेटा प्रकार विवरण कच्चे बाइनरी डेटा को संग्रहीत करने के लिए, जैसे कि चित्र, एक हेक्साडेसिमल-जैसे नोटेशन में, (32K 1) बाइट्स की लंबाई तक। UNIQUEIDENTIFIER डेटा प्रकार UUID (GUID के रूप में भी जाना जाता है) के भंडारण के लिए उपयोग किया जाता है बाइनरी डेटा 0x या 0x अक्षरों के साथ शुरू होता है और इसमें अंकों के किसी भी संयोजन और अपरकेस और लोअरकेस अक्षर ए से एफ शामिल हो सकते हैं। आप बाइट्स में कॉलम की लंबाई निर्दिष्ट कर सकते हैं या 1 बाइट की डिफ़ॉल्ट लंबाई का उपयोग कर सकते हैं। प्रत्येक बाइट स्टोर 2 हेक्साडेसिमल अंक। हालांकि डिफ़ॉल्ट लंबाई 1 बाइट है, Sybase अनुशंसा करता है कि आप हमेशा BINARY और VARBINARY कॉलम लंबाई के लिए वर्णों की एक भी संख्या निर्दिष्ट करें। यदि आप निर्दिष्ट कॉलम की लंबाई से अधिक मूल्य दर्ज करते हैं, तो Sybase IQ ने बिना किसी चेतावनी या त्रुटि के निर्दिष्ट एंट्री को प्रविष्ट कर दिया है। बाइनरी बाइनरी डेटा लंबाई लंबाई बाइट्स। यदि लंबाई छोड़ी जाती है, तो डिफ़ॉल्ट 1 बाइट है। अनुमति अधिकतम आकार 255 बाइट्स है। डेटा के लिए निश्चित-लंबाई बाइनरी प्रकार BINARY का उपयोग करें जिसमें सभी प्रविष्टियां लम्बाई में लगभग बराबर होने की संभावना है। क्योंकि BINARY कॉलम में प्रविष्टियां कॉलम की लंबाई की लंबाई के लिए शून्य-पैड हैं। उन्हें VARBINARY कॉलम में प्रविष्टियों की तुलना में अधिक संग्रहण स्थान की आवश्यकता हो सकती है। वायरीबाइनरी बाइनरी डेटा अधिकतम लंबाई बाइट की लंबाई तक। अगर अधिकतम लंबाई छोड़ी जाती है, तो डिफ़ॉल्ट 1 बाइट है अनुमति अधिकतम आकार (32 कश्मीर 1) बाइट्स है। वेरिएबल-लंबाई द्विआधारी प्रकार VARBINARY का उपयोग करें जो कि लंबाई में बहुत भिन्न होने की उम्मीद है। एक अलग लाइसेंस प्राप्त विकल्प के रूप में, साइबेस आईक्यू बाइनरी बड़ी ऑब्जेक्ट (ब्लॉब) डेटा को शून्य (0) से लेकर 512 टीबी (टेराबाइट) तक आईबी पेज आकार के 128 केबी या 2 पीबी (पेटबाइट्स) के लिए आईबी पेज आकार के 512KB अधिकतम लंबाई 4GB के बराबर है डेटाबेस पेज आकार से गुणा। Sybase IQ में बड़ी ऑब्जेक्ट मैनेजमेंट देखें लंबी द्विआधारी और छवि डेटा प्रकारों के बारे में जानकारी के लिए, बाइनरी डेटा प्रकार देखें। अनुक्रमित शून्य के उपचार सभी बिनरीनल कॉलम को शून्य के साथ स्तंभ की पूरी चौड़ाई में पैड किया गया है। ट्रेलिंग शून्य सभी वर्जिनरी कॉलम में छोटा कर दिया गया है। निम्न उदाहरण शून्य और नल के साथ परिभाषित BINARY और VARBINARY डेटा प्रकार के सभी चार रूपों के साथ एक तालिका बनाता है। समान डेटा को सभी चार कॉलम में डाला जाता है और स्तंभ के डेटा प्रकार के अनुसार पैड या छोटा किया जाता है। प्लेटफ़ॉर्म पर निर्भरता सटीक रूप जिसमें आप किसी विशेष मान को दर्ज करते हैं, उस प्लेटफ़ॉर्म पर निर्भर करता है जो आप उपयोग कर रहे हैं। इसलिए, बाइनरी डेटा से जुड़े गणना विभिन्न मशीनों पर अलग-अलग परिणाम पेश कर सकती है। हेक्साडेसिमल स्ट्रिंग्स और इंटिजर्स के बीच मंच-स्वतंत्र रूपांतरण के लिए, प्लेटफ़ॉर्म-विशिष्ट कनवर्ट फ़ंक्शन के बजाय INTTOHEX और HEXTOINT फ़ंक्शन का उपयोग करें। विवरण के लिए, अनुभाग डेटा प्रकार रूपांतरण फ़ंक्शन देखें। स्ट्रिंग ऑपरेटर्स कंसनेक्शन स्ट्रिंग ऑपरेटर्स और दोनों द्विआधारी प्रकार डेटा का समर्थन करते हैं। ऑपरेटर के साथ द्विआधारी ऑपरेंड्स के चरित्र डेटा प्रकारों का स्पष्ट रूपांतरण आवश्यक नहीं है। स्पष्ट और अंतर्निहित डेटा रूपांतरण अलग परिणाम पेश करते हैं, हालांकि। BINARY और VARBINARY डेटा पर प्रतिबंध निम्नलिखित प्रतिबंध BINARY और VARBINARY डेटा युक्त कॉलम पर लागू होते हैं: आप समेकित कार्यों SUM का उपयोग नहीं कर सकते। औसत मानक विचलन । या बायनरी डेटा प्रकारों के साथ विविधता कुल कार्य MIN मैक्स और COUNT द्विआधारी डेटा प्रकार द्विआधारी और VARBINARY का समर्थन करते हैं। एचएनजी डब्ल्यूडी तारीख । पहर । और डीटीटीएम अनुक्रमित द्विरेखीय या वायरीय डेटा का समर्थन नहीं करते हैं। केवल डिफ़ॉल्ट इंडेक्स और सीएमपी इंडेक्स प्रकार लंबाई में 255 बाइट्स से अधिक VARBINARY डेटा के लिए समर्थित हैं। बिट ऑपरेशन द्विरेखीय और VARBINARY डेटा पर समर्थित हैं जो लंबाई में 8 बाइट्स या उससे कम है। संगतता द्विआधारी डेटा में शून्य के पीछे के व्यवहार में साइबेस आईक्यू, एससीएल कहीं भी, और अनुकूली सर्वर एंटरप्राइज़ के बीच अलग-अलग है: तालिका 3-4: अनुक्रमित शून्य के उपचार ट्रिंटेट किए गए, पैड किए गए अनुकूली सर्वर एंटरप्राइज, एसक्यूएल कहीं भी, और सिबेस आईक सभी को STRINGRTRUNCATION डेटाबेस का समर्थन विकल्प है, जो INSERT या UPDATE स्ट्रिंग का संक्षिप्त होने पर त्रुटि संदेश रिपोर्टिंग को प्रभावित करता है। ट्रांसएक्ट-एसक्यूएल संगत स्ट्रिंग तुलना के लिए, दोनों डेटाबेस में समान मूल्य के लिए STRINGRTRUNCATION विकल्प सेट करें। आप तालिका में डेटा लोड करते समय भी STRINGRTRUNCATION विकल्प सेट कर सकते हैं, आपको यह सूचित करने के लिए कि फ़ील्ड में लोड करने के लिए डेटा बहुत बड़ा है। डिफ़ॉल्ट मान पर है। द्विआधारी प्रकार डेटा पर बिट ऑपरेशन अनुकूली सर्वर एंटरप्राइज़ द्वारा समर्थित नहीं हैं एसक्यूएल कहीं भी द्विआधारी प्रकार के डेटा के पहले चार बाइटों के मुकाबले बिट ऑपरेशन का समर्थन करता है। साइबेस आईक्यू बाइनरी टाइप डेटा के पहले आठ बाइट्स के खिलाफ बिट ऑपरेशन का समर्थन करता है। UNIQUEIDENTIFIER यूयूआईडी के भंडारण के लिए प्रयुक्त (GUID के रूप में भी जाना जाता है) मूल्य UNIQUEIDENTIFIER डेटा प्रकार अक्सर यूआईआईडी (यूनिवर्सल यूनिक आइडेंटिफ़ायर) मानों को पकड़ने के लिए प्राथमिक कुंजी या अन्य अनूठे कॉलम के लिए उपयोग किया जाता है जो कि पंक्तियों को विशिष्ट रूप से पहचानने के लिए इस्तेमाल किया जा सकता है न्यूएड फ़ंक्शन UUID मान को ऐसे तरीके से उत्पन्न करता है कि एक कंप्यूटर पर उत्पादित मूल्य दूसरे कंप्यूटर पर उत्पादित यूयूआईडी से मेल नहीं खाता। NEWID का उपयोग करने वाले UNIQUEIDENTIFIER मानों को एक सिंक्रनाइज़ेशन वातावरण में चाबियाँ के रूप में उपयोग किया जा सकता है। उदाहरण के लिए, निम्न कथन टेबल मैटैब को अद्यतन करता है और न्यूआईआईडी फ़ंक्शन द्वारा जेनरेट किए गए एक अद्वितीय पहचानकर्ता को कॉलम के मूल्य को सेट करता है, यदि कॉलम का मौजूदा मान नल है। यदि आप निम्न कथन निष्पादित करते हैं, तो अद्वितीय पहचानकर्ता को वापस BINARY (16) के रूप में दिया जाता है। उदाहरण के लिए, मान 0xd3749fe09cf446e399913bc6434f1f08 हो सकता है। आप यूआईआईडीटीओएसआर () फ़ंक्शन का उपयोग करके इस स्ट्रिंग को एक पठनीय प्रारूप में कनवर्ट कर सकते हैं। यूयूआईडी मानों को भी GUIDs (ग्लोबली यूनिक आइडेंटिफ़ायर) के रूप में जाना जाता है। STRTOUUID और UUIDTOSTR फ़ंक्शन UNIQUEIDENTIIFIER और स्ट्रिंग अभिसरणों के बीच मूल्यों को परिवर्तित करने के लिए उपयोग किया जाता है। UNIQUEIDENTIFIER मानों को संग्रहीत और BINARY (16) के रूप में लौटा दिया गया है। क्योंकि UNIQUEIDENTIIFIER मान बड़े हैं, UNIIGNED BIGINT या UNSIGNED INT पहचान स्तंभ के बजाय UNIQUEIDENTIIFIER का उपयोग करना अधिक कुशल है, अगर आपको पार डेटाबेस अद्वितीय पहचानकर्ता की आवश्यकता नहीं है। UNIQUEIDENTIFIER SQL92 विक्रेता विस्तार के लिए मानकों और संगतता। एसक्यूएल कहीं भी द्वारा समर्थित साइबेस अनुकूली सर्वर एंटरप्राइज़ द्वारा समर्थित नहीं है पीछे की ओर संगतता Sybase IQ संस्करण 12.7, STRTOUUID के पहले बनाए गए डेटाबेस में। UUIDTOSTR और न्यूआईडी फ़ंक्शन सीआईएस फ़ंक्शनल मुआवजे के माध्यम से समर्थित थे। संस्करण 15.1 और बाद में, STRTOUUID। UUIDTOSTR और न्यूआइड फ़ंक्शंस मूल साइबेस आईक्यू फ़ंक्शन हैं I UNIQUEIDENTIIFIER से संबंधित अधिक जानकारी के लिए: लोड टैबिल स्टेटमेंट DATETIME (MMDDYY hh: mm: ssaa) Sybase IQ ने सामान्य दिनांक, समय और डेटटाइम प्रारूपों के लिए अंतर्निहित लोड ऑप्टिमाइजेशन बनाया है। यदि आपके डेटा को लोड किया जाना इन स्वरूपों में से एक से मेल खाता है, तो आप उचित प्रारूप का उपयोग करके लोड समय को कम कर सकते हैं। इन स्वरूपों की एक सूची के लिए, और तिथि और डेटटाइम डेटा लोड करते समय प्रदर्शन को अनुकूलित करने के बारे में जानकारी, अध्याय 7, Sybase IQ सिस्टम प्रशासन गाइड में डेटा इन और आउट डाटाबेस देखें। आप एएससीआईआई निश्चित-चौड़ाई वाले फ़ील्ड (जैसा ऊपर वर्णित है) के रूप में डेट टाइम फ़ील्ड निर्दिष्ट कर सकते हैं और स्तंभ सीमांकक को छोड़ने के लिए FILLER (1) विकल्प का उपयोग कर सकते हैं। दिनांक और समय डेटा को निर्दिष्ट करने के बारे में अधिक जानकारी के लिए, दिनांक और समय डेटा प्रकार या अध्याय 7 देखें, Sybase IQ सिस्टम प्रशासनिक गाइड में डेटाबेस में डेटा और डेटा स्थानांतरण। कॉलम-स्पेक का नल भाग इंगित करता है कि टेबल कॉलम में लोड होने पर कुछ इनपुट वैल्यू के रूप में नल मूल्यों के साथ कैसे व्यवहार किया जाए। इन पात्रों में लिपटे, ज़िरोस, या किसी भी अन्य लिखित शब्दों की सूची शामिल हो सकती है जिन्हें आप परिभाषित करते हैं। जब किसी असल मूल्य को निर्दिष्ट करते हैं या स्रोत फ़ाइल से शून्य मान पढ़ते हैं, तो गंतव्य कॉलम में NULLs को नियंत्रित करने में सक्षम होना चाहिए। ज़िरोस को निम्नानुसार व्याख्या की गई है: सेल को शून्य पर सेट किया गया है (इनपुट के पहले (यदि एएससीआईआई), तो (और केवल तभी) यदि सभी द्विआधारी शून्य (और वर्ण शून्य नहीं) हैं यदि इनपुट डेटा वर्ण शून्य है, तो: NULL (ज़िरोस) सेल को नल होने का कारण कभी नहीं होता है। शून्य (0) सेल नल होने का कारण बनता है। यदि इनपुट डेटा द्विआधारी शून्य (सभी बिट्स स्पष्ट) है, तो: शून्य (ज़िरोस) सेल को रिक्त होने के कारण होता है शून्य (0) सेल को नल होने का कारण कभी नहीं। उदाहरण के लिए, यदि आपके लोड स्टेटमेंट में कॉल 1 डेट (yymmdd) नल (शून्य) है और तारीख 000000 है, तो आपको संकेत मिलता है कि 000000 को DATE (4) में परिवर्तित नहीं किया जा सकता है। डेटा 000000 है जब कॉल 1 में शून्य मान को सम्मिलित करने के लिए लोड प्राप्त करने के लिए, शून्य खंड को शून्य (000000) लिखें। या डेटा को बराबर बाइनरी शून्य में परिवर्तित कर सकते हैं और नल (ज़िरोस) का उपयोग करें। यदि किसी VARCHAR सेल की लंबाई शून्य है और सेल नल नहीं है, तो आपको शून्य-लंबाई वाला कक्ष मिलता है। अन्य सभी डेटा प्रकारों के लिए, यदि सेल की लंबाई शून्य है, तो Sybase IQ एक नल सम्मिलित करता है यह एएनएसआई व्यवहार है गैर-एएनएसआई उपचार के लिए शून्य-लंबाई वाले चरित्र डेटा के लिए, NonAnsiNullVarchar डेटाबेस विकल्प सेट करें। लोड-विनिर्देशन का एक अन्य महत्वपूर्ण हिस्सा FILLER विकल्प है। यह इंगित करता है कि आप स्रोत इनपुट फ़ाइल में किसी विशिष्ट फ़ील्ड को छोड़ना चाहते हैं। उदाहरण के लिए, इनपूट फाइलों में पंक्तियों या यहां तक ​​कि पूरे फ़ील्ड के अंत में वर्ण हो सकते हैं जिन्हें आप तालिका में जोड़ना नहीं चाहते हैं। कॉलम-स्पेक परिभाषा के साथ, फ़िलर आपको एएससीआईआई की निश्चित लंबाई बाइट्स, भिन्न लंबाई वाले अक्षरों को विभाजक द्वारा सीमांकित करता है, और PREFIX बाइट्स का उपयोग करके बाइनरी फ़ील्ड निर्दिष्ट करता है। filename-string फ़ाइल नाम-स्ट्रिंग को एक स्ट्रिंग के रूप में सर्वर पर भेजा गया है। स्ट्रिंग अन्य एसक्यूएल तारों के समान स्वरूपण आवश्यकताओं के अधीन है। विशेष रूप से: विंडोज सिस्टम में डायरेक्ट्री पथ को इंगित करने के लिए, बैकस्लैश कैरेक्टर दो बैकस्लैश के द्वारा प्रतिनिधित्व किया जाना चाहिए। इसलिए, कर्मचारी तालिका में फ़ाइल c: tempinput. dat से डेटा लोड करने के लिए कथन है: पथ नाम डेटाबेस सर्वर के सापेक्ष है, क्लाइंट अनुप्रयोग के लिए नहीं। यदि आप किसी अन्य कंप्यूटर पर डेटाबेस सर्वर पर कथन चला रहे हैं, तो निर्देशिका नाम सर्वर मशीन पर निर्देशिकाओं को संदर्भित करता है, ग्राहक मशीन पर नहीं। निम्नलिखित कथन के प्रत्येक खंड का वर्णन करता है: वर्ड स्कीप लोड को जारी रखने की अनुमति देता है, जब शब्द अनुक्रमणिका बनाते समय निर्दिष्ट सीमा से अधिक डेटा का सामना करता है। यदि कोई शब्द अधिकतम नहीं है क्योंकि एक शब्द अधिकतम अनुमत आकार से अधिक है, तो एक चेतावनी.iqmsg फ़ाइल में लिखा है। WORD आकार के उल्लंघनों को वैकल्पिक रूप से लॉग इन संदेश फ़ाइल में लॉग इन किया जा सकता है और LOAD TABLE कथन में निर्दिष्ट ROW LOG फ़ाइल में लॉग इन किए गए पंक्तियों को खारिज कर दिया जा सकता है। यदि विकल्प निर्दिष्ट नहीं है, तो लोड टेबल एक त्रुटि की रिपोर्ट करता है और उस शब्द की पहली घटना पर वापस रोल करता है जो निर्दिष्ट सीमा से अधिक लंबा है। संख्या बार की संख्या को निर्दिष्ट करता है कि शब्द अधिकतम अनुमति प्राप्त शब्द लंबाई से अधिक नहीं समर्थित त्रुटि को नजरअंदाज कर दिया गया है। 0 (शून्य) का मतलब है कि कोई सीमा नहीं है उद्धरण यह पैरामीटर वैकल्पिक है और डिफ़ॉल्ट चालू है। उद्धरण चालू होने के साथ, लोड टेबल को उम्मीद है कि इनपुट स्ट्रिंग को उद्धरण वर्णों में संलग्न किया जाना चाहिए। उद्धरण चरित्र या तो एक एपॉस्ट्रॉफ़ा (एकल उद्धरण) या उद्धरण चिह्न (दोहरे उद्धरण) है। स्ट्रिंग में आने वाला पहला ऐसा वर्ण स्ट्रिंग के लिए उद्धरण वर्ण के रूप में माना जाता है। स्ट्रिंग डेटा को एक मिलान उद्धरण के साथ समाप्त कर दिया जाना चाहिए। उद्धरण चिह्नों के साथ कॉलम या पंक्ति सीमांकक पात्रों को कॉलम मूल्य में शामिल किया जा सकता है। प्रमुख और समापन उद्धरण वर्णों को मूल्य का हिस्सा नहीं माना जाता है और लोड किए गए डेटा मूल्य से बाहर रखा गया है। QUOTES चालू के साथ एक मूल्य में उद्धरण वर्ण शामिल करने के लिए दो उद्धरणों का उपयोग करें उदाहरण के लिए, निम्न पंक्ति में तीसरे कॉलम में एक मान शामिल है जो एक एकल उद्धरण वर्ण है: STRIP चालू (डिफ़ॉल्ट) के साथ, खाली डालने से पहले रिक्त स्थान को मूल्य से छीन लिया जाता है। ट्रेलिंग रिक्त स्थान केवल गैर-उद्धृत तारों के लिए छीन लिया जाता है उद्धृत स्ट्रिंग उनके अनुगामी रिक्त स्थान को बनाए रखती हैं I जब रिक्त स्थान या टैब अक्षरों को QUOTES सेटिंग चालू है तो केवल तमिलित किया जाता है डेटा निष्कर्षण सुविधा उद्धरण (TempEXTRACTQUOTES. TEMPEXTRACTQUOTESALL और TEMPEXTRACTQUOTE) से निपटने के लिए विकल्प प्रदान करता है। अगर आप स्ट्रिंग फ़ील्ड के साथ निकाली हुई फ़ाइल को वापस लोड करने की योजना बनाते हैं, जिसमें स्तंभ या पंक्ति सीमांकक को डिफ़ॉल्ट ASCII निष्कर्षण के अंतर्गत होता है, तो निकालें और FORMAT बाइनरी के लिए TempEXTRACTBINARY विकल्प का उपयोग करें और LOAD TABLE के लिए उद्धरण विकल्प। विकल्प पर दिए गए विकल्प केवल स्तंभ-सीमांकित ASCII क्षेत्रों पर लागू होते हैं। उद्धरण चिह्नों के साथ एक स्तंभ सीमांकक या पंक्ति टर्मिनेटर का पहला अक्षर एक या दोहरे उद्धरण चिह्न नहीं हो सकता। कोटेशन विकल्प, बाइनरी बड़ी ऑब्जेक्ट (ब्लॉब) या कैरेक्टर बड़ी ऑब्जेक्ट (सीएलबी) डेटा को माध्यमिक फ़ाइल से लोड करने के लिए लागू नहीं होता है, इसके सेटिंग की परवाह किए बिना, एक अग्रणी या अनुगामी बोली CLOB डेटा के हिस्से के रूप में लोड किया गया है। उद्धरण चिह्नों के बीच दो लगातार उद्धरण, विकल्प पर विकल्प के साथ दो लगातार उद्धरण के रूप में लोड किए जाते हैं। अनुकूली सर्वर एंटरप्राइज़ BCP QUOTES विकल्प का समर्थन नहीं करता है। सभी फ़ील्ड डेटा को बोली ऑफ सेटिंग के बराबर या उससे बाहर कॉपी किया गया है। चूंकि सिबस आईक्यू लोड टेबल स्टेटमेंट के लिए कोटेशन की डिफ़ॉल्ट सेटिंग है, आपको एएसई डेटा को बीसीपी आउटपुट से साइबस आईक्यू टेबल पर आयात करते समय, कॉन्टफ़ॉर्म ऑफ को निर्दिष्ट करना होगा। यदि लोड तालिका में एक संलग्न फ़ील्ड के लिए समापन उद्धरण वर्ण के बाद किसी भी गैर-वीथ वर्णों का सामना करना पड़ता है, तो निम्न त्रुटि की सूचना दी जाती है और लोड ऑपरेशन वापस लाया जाता है: गैर-स्पेस पाठ को एक संलग्न फ़ील्ड के लिए उद्धरण वर्ण समाप्त होने के बाद मिला। SQLSTATE: QTA14 SQLCODE: -1005014 एल पर उद्धरण चिह्नों के साथ। यदि एक या दोहरे उद्धरण को स्तंभ सीमांकक के पहले अक्षर के रूप में निर्दिष्ट किया गया है, तो एक त्रुटि की सूचना दी गई है और लोड ऑपरेशन विफल रहता है: सिंगल या दोहरे उद्धरण चिह्न कॉलम सीमांकक या पंक्ति टर्मिनेटर का पहला अक्षर, विकल्प विकल्प के साथ नहीं हो सकता। SQLSTATE: QCA90 SQLCODE: -1013090 एल चेक कंसट्रिक्स यह विकल्प चालू पर डिफ़ॉल्ट है जब आप चेक कॉन्ट्रैक्ट्स को निर्दिष्ट करते हैं चेक बाधाओं का मूल्यांकन किया जाता है और आप इनका अनदेखा करने या उन्हें लॉग इन करने के लिए स्वतंत्र हैं। चेक कंसट्रेंट्स बंद करने से Sybase IQ को सभी चेक बाधा उल्लंघन को अनदेखा करने का कारण बनता है। यह उपयोगी हो सकता है, उदाहरण के लिए, डेटाबेस पुनर्निर्माण के दौरान। यदि एक तालिका में जांच की कमी है जो उपयोगकर्ता द्वारा परिभाषित फ़ंक्शन को कॉल करता है जो अब तक नहीं बनाए गए हैं, तो पुनर्निर्माण विफल रहता है जब तक कि यह विकल्प बंद नहीं होता है। यह विकल्प निम्नलिखित विकल्पों के लिए परस्पर अनन्य है। यदि इन विकल्पों में से कोई भी एक ही लोड में विनिर्दिष्ट होता है, तो त्रुटि परिणाम: IGNORE CONSTRIBE ALL IGNORE CONSTRAINT CHECK DEFAULTS यदि DEFAULTS विकल्प चालू है (डिफ़ॉल्ट) और कॉलम में एक डिफ़ॉल्ट मान है, तो उस मान का उपयोग किया जाता है अगर डिफॉल्ट्स विकल्प बंद है, तो कॉलम सूची में मौजूद कोई भी कॉलम मौजूद नहीं है। DEFAULTS विकल्प की सेटिंग AUTOINCREMENT सहित सभी स्तंभ DEFAULT मानों पर लागू होती है। भार और सम्मिलन के साथ कॉलम DEFAULT मानों के उपयोग के बारे में विस्तृत जानकारी के लिए, देखें अध्याय 9 में स्तंभ चूक का उपयोग करना, सिबेस ईक सिस्टम प्रशासन गाइड में डेटा इंटिग्रिटी सुनिश्चित करना। बचें यदि आप किसी इनपुट फ़ील्ड के लिए कॉलम-स्पेक परिभाषा छोड़ देते हैं और एस्केप्स (डिफ़ॉल्ट) चालू होता है, तो बैकस्लैश वर्णों के बाद वर्णों को मान्यता दी जाती है और डेटाबेस सर्वर द्वारा विशेष वर्णों के रूप में व्याख्या की जाती है। नए अक्षरों को संयोजन n के रूप में शामिल किया जा सकता है, अन्य पात्रों को हेक्सैडेसीमल एएससीआईआई कोड के रूप में डेटा में शामिल किया जा सकता है, जैसे टैब वर्ण के लिए x09। दो बैकस्लैश वर्णों का एक क्रम () एक बैकस्लैश के रूप में व्याख्या किया गया है। Sybase IQ के लिए, आपको इस विकल्प को बंद करना होगा। FORMAT Sybase IQ ASCII और बाइनरी इनपुट फ़ील्ड का समर्थन करता है प्रारूप को आमतौर पर ऊपर वर्णित कॉलम-स्पेक द्वारा परिभाषित किया गया है यदि आप एक कॉलम के लिए उस परिभाषा को छोड़ देते हैं, तो डिफ़ॉल्ट रूप से Sybase IQ इस विकल्प द्वारा परिभाषित स्वरूप का उपयोग करता है। इनपुट लाइनों को एस्की (डिफ़ॉल्ट) या बाइनरी फ़ील्ड, एक पंक्ति प्रति पंक्ति माना जाता है, कॉलम सीमांकक वर्ण द्वारा अलग किए गए मूल्यों के साथ। यदि आप कॉलम-स्पेक परिभाषा में एक स्तंभ सीमांकक छोड़ देते हैं, तो डिफ़ॉल्ट कॉलम सीमांकक चरित्र एक अल्पविराम है आप एक एकल एएससीआईआई वर्ण या हेक्साडेसिमल वर्ण प्रतिनिधित्व प्रदान करके एक वैकल्पिक स्तंभ सीमांकक निर्दिष्ट कर सकते हैं। डिलिफ़र्ड बाय क्लॉज निम्नानुसार है: नए पंक्ति को एक सीमांकक के रूप में उपयोग करने के लिए, आप विशिष्ट संयोजन n या इसकी एएससीआईआई मान x0a निर्दिष्ट कर सकते हैं। यद्यपि आप कॉलम-स्पेक सीमांकक-स्ट्रिंग में चार वर्ण तक निर्दिष्ट कर सकते हैं। आप DELIMITED BY क्लॉज स्ट्रिप में केवल एक ही अक्षर निर्दिष्ट कर सकते हैं, STRIP चालू (डिफ़ॉल्ट) के साथ, डालने वाले रिक्त स्थान को डालने से पहले मूल्यों से छीन लिया जाता है। यह केवल VARCHAR डेटा के लिए प्रभावी है, जो कि एएससीआईआई फिक्स-चौड़ाई आवेषण पर लागू नहीं होता है। STRIP विकल्प को बंद करने के लिए, खंड निम्नानुसार है: ट्रेलिंग रिक्त स्थान केवल गैररेक्टेड स्ट्रिंग्स के लिए छीन लिए गए हैं। उद्धृत स्ट्रिंग उनके अनुगामी रिक्त स्थान को बनाए रखती हैं I एक विकल्प के रूप में, FILLER विकल्प आपको बाइट्स की संख्या में सभी अनुगामी रिक्त स्थान के बजाय पट्टी में अधिक विशिष्ट होने की सुविधा देता है। Sybase IQ के लिए यह विकल्प अधिक सक्षम है, और यह खाली मानकों के साथ व्यवहार करते समय एएनएसआई मानक का पालन करता है। (चार डेटा हमेशा पैड होता है, इसलिए यह विकल्प केवल varchar डेटा को प्रभावित करता है।) चेकबॉक्स के साथ डिफ़ॉल्ट सेटिंग बंद है। यदि चालू है, तो एक चेकपॉइंट को सफलतापूर्वक पूरा करने और बयान दर्ज करने के बाद जारी किया गया है। यदि चेकबॉक्स के साथ निर्दिष्ट नहीं किया गया है, और बाद में वसूली की आवश्यकता है, तो रिकवरी को सफलतापूर्वक पूरा करने के लिए तालिका लोड करने के लिए उपयोग की जाने वाली डेटा फ़ाइल की आवश्यकता है यदि चेकपॉइंट चालू है, और वसूली के बाद की आवश्यकता है, यह चेकपॉइंट के बाद शुरू होता है, और डेटा फ़ाइल को उपस्थित नहीं होना चाहिए। ब्लॉक फैक्टर ब्लॉकिंग कारक निर्दिष्ट करता है, या एक टेप बनाई जाने पर उपयोग किए गए प्रति ब्लॉक रिकॉर्ड की संख्या। यह विकल्प वैरिएबल-लम्बाई इनपुट फ़ील्ड से आवेषण के लिए मान्य नहीं है इसके बजाय BLOCKSIZE विकल्प का उपयोग करें। हालांकि, यह तय-लंबाई इनपुट फ़ील्ड के साथ सभी फाइल आवेषण (डिस्क से) को प्रभावित करता है, और यह नाटकीय रूप से प्रदर्शन को प्रभावित कर सकता है। आप ब्लॉक विकल्प के साथ इस विकल्प को निर्दिष्ट नहीं कर सकते। डिफ़ॉल्ट 10,000 है ब्लॉक आकार बाइट्स में डिफ़ॉल्ट आकार निर्दिष्ट करता है जिसमें इनपुट पढ़ा जाना चाहिए। यह विकल्प केवल उन चरम लम्बाई इनपुट क्षेत्रों के लिए मान्य फ़ाइलों से पढ़ते हुए चर लंबाई इनपुट डेटा को प्रभावित करता है। यह ब्लॉक फैक्टर के समान है लेकिन आकार ब्लॉक करने के लिए रिकॉर्ड आकार के संबंध में कोई प्रतिबंध नहीं है। आप इस विकल्प को ब्लॉक फैक्टर विकल्प के साथ निर्दिष्ट नहीं कर सकते। डिफ़ॉल्ट 500,000 है बाइट ऑर्डर वाचने के दौरान बाइट आदेश निर्दिष्ट करता है। यह विकल्प सभी बाइनरी इनपुट फ़ील्ड्स पर लागू होता है यदि कोई भी परिभाषित नहीं है, तो इस विकल्प को अनदेखा किया गया है। Sybase IQ हमेशा बाइनरी डेटा को प्रारूप में मूल रूप से पढ़ता है मशीन पर चल रहा है (डिफ़ॉल्ट NATIVE है) आप यह भी निर्दिष्ट कर सकते हैं: उच्च जब multibyte मात्रा में उच्च आदेश बाइट पहले (सन, आईबीएम ऐक्स और एचपी जैसे बड़े एंडियन प्लेटफॉर्म के लिए) कम जब multibyte मात्रा कम आदेश बाइट पहले (विंडोज जैसे छोटे endian प्लेटफार्मों के लिए) है। LIMIT तालिका में सम्मिलित करने के लिए अधिकतम संख्या निर्दिष्ट करता है। कोई सीमा नहीं के लिए डिफ़ॉल्ट 0 है। अधिकतम 2 जीबी है - 1. नोटिफ़िकेशन निर्दिष्ट करता है कि हर बार निर्दिष्ट पंक्तियों की संख्या तालिका में सफलतापूर्वक सम्मिलित की जाती है। डिफ़ॉल्ट हर 100,000 पंक्तियाँ हैं इस विकल्प का मान NOTIFYMODULUS डेटाबेस विकल्प के मूल्य को ओवरराइड करता है। फाइल त्रुटि पर कार्रवाई निर्दिष्ट करती है Sybase IQ तब लेता है जब एक इनपुट फ़ाइल खोला नहीं जा सकती क्योंकि यह मौजूद नहीं है या आपको फ़ाइल पढ़ने की अनुमति नहीं है। आप निम्न में से एक निर्दिष्ट कर सकते हैं: रोलबैक पूरे लेनदेन (डिफ़ॉल्ट) को बंद कर देता है परिष्करण पहले से पूरा हो गया सम्मिलन पूरा करता है और लोड ऑपरेशन को समाप्त करता है। जारी रखें एक त्रुटि देता है, लेकिन केवल लोड ऑपरेशन को जारी रखने के लिए फ़ाइल को छोड़ देता है। आप आंशिक-चौड़ाई आवेषण के साथ इस विकल्प का उपयोग नहीं कर सकते फ़ाइल त्रुटि खंड पर केवल एक ही अनुमति है पूर्वावलोकन प्रत्येक स्तंभ के आरंभिक स्थिति, नाम और डेटा प्रकार सहित गंतव्य तालिका में इनपुट का लेआउट दिखाता है Sybase IQ लोड की प्रक्रिया की शुरुआत में यह जानकारी प्रदर्शित करता है। यदि आप लॉग फ़ाइल में लिख रहे हैं, तो यह जानकारी लॉग में भी शामिल है। यह विकल्प आंशिक-चौड़ाई आवेषण के साथ विशेष रूप से उपयोगी है I ROW द्वारा ऑफ़लाइन लंबाई में 4 बाइट तक एक स्ट्रिंग निर्दिष्ट करता है जो इनपुट रिकॉर्ड के अंत का संकेत करता है। आप इस विकल्प का उपयोग केवल तभी कर सकते हैं जब पंक्ति में सभी फ़ील्ड निम्न में से कोई भी हों: कॉलम टर्मिनेटर के साथ सीमित दिनांक DATE या DATETIME कॉलम-स्पेक विकल्प ASCII निश्चित लंबाई फ़ील्ड द्वारा निर्धारित किया गया है यदि आप कोई इनपुट फ़ील्ड में बायनेरी डेटा शामिल करते हैं तो आप इस विकल्प का उपयोग नहीं कर सकते इस विकल्प के साथ, एक पंक्ति टर्मिनेटर किसी भी लापता फ़ील्ड को नल पर सेट करने का कारण बनता है। सभी पंक्तियों में समान पंक्ति सीमांकक होना चाहिए, और यह सभी स्तंभ सीमांकक से अलग होना चाहिए। पंक्ति और फ़ील्ड सीमांकक स्ट्रिंग एक दूसरे का प्रारंभिक उपशीर्षक नहीं हो सकता। उदाहरण के लिए, आप फ़ील्ड सीमांकक के रूप में निर्दिष्ट नहीं कर सकते हैं और पंक्ति सीमांकक के रूप में, लेकिन आप उस पंक्ति सीमांकक के साथ फ़ील्ड डीलिमीटर के रूप में निर्दिष्ट कर सकते हैं। यदि एक पंक्ति में अपने सीमांकक गायब हैं, तो Sybase IQ एक त्रुटि देता है और पूरे लोड लेनदेन को वापस रोल करता है। एकमात्र अपवाद एक फ़ाइल का अंतिम रिकॉर्ड है जहां वह उस पंक्ति को वापस रोल करता है और एक चेतावनी संदेश देता है विंडोज़ पर, एक पंक्ति सीमांकक आमतौर पर कैरेज़ रिटर्न वर्ण के बाद नए लाइन के द्वारा इंगित किया जाता है। या तो यह विकल्प या फ़िलर के लिए आपको इसे डेलीमीटर-स्ट्रिंग के रूप में निर्दिष्ट करने की आवश्यकता हो सकती है (विवरण के लिए ऊपर देखें)। इस लोड के लिए इनपुट तालिकाओं की शुरुआत में आपको छोड़ने के लिए SKIP आपको कई पंक्तियों को परिभाषित करने देता है डिफ़ॉल्ट 0 है। START ROW ID Sybase IQ तालिका में एक पंक्ति की रिकॉर्ड पहचान संख्या निर्दिष्ट करती है जहां इसे डालने शुरू करनी चाहिए। यह विकल्प आंशिक-चौड़ाई आवेषण के लिए उपयोग किया जाता है, जो तालिका में स्तंभों के सबसेट में सम्मिलित होते हैं। डिफ़ॉल्ट रूप से, तालिका में जहां कहीं भी जगह होती है, नई पंक्तियां डाली जाती हैं, और प्रत्येक सम्मिलित एक नई पंक्ति शुरू होती है। आंशिक-चौड़ाई आवेषण को मौजूदा पंक्ति से शुरू करना होगा उन्हें स्रोत फ़ाइल से डेटा को स्तंभ के आधार पर स्थिति में डालने की ज़रूरत है, इसलिए आपको गंतव्य कॉलम को उसी क्रम में उनके संबंधित स्रोत कॉलम के रूप में निर्दिष्ट करना होगा। कॉलम-स्पेक के साथ प्रत्येक इनपुट कॉलम के प्रारूप को परिभाषित करें डिफ़ॉल्ट 0 है। आंशिक-चौड़ाई आवेषण के बारे में अधिक जानकारी के लिए अध्याय 7, Sybase IQ सिस्टम प्रशासन मार्गदर्शिका में डेटा इन और आउट डाटाबेस को स्थानांतरित कर देखें। केवल आंशिक-चौड़ाई आवेषण के लिए स्टार्ट आरओई आईडी विकल्प का उपयोग करें। यदि कॉलम लोड किए जा रहे हैं तो पहले से ही डेटा शामिल है, तो सम्मिलित विफल हो जाता है। यूएनडएड फॉरमेट निर्दिष्ट करता है कि फाइल में साइबेस आईक्यू के पूर्व संस्करण (संस्करण 12.0 से पहले) द्वारा बनाए गए प्रत्येक कॉलम के लिए सिबेस आईक्यू आंतरिक अनलोड प्रारूप हैं। इस लोड विकल्प में निम्न प्रतिबंध हैं: आप किसी भी कॉलम-स्पेक (जैसे एएससीआईआई या प्रीफीएक्स) को बिना किसी कॉलम के अन्य निर्दिष्ट कर सकते हैं। इसमें शून्य विनिर्देश शामिल हैं यदि आपको कॉलम के लिए शून्य मूल्यों को बाइनरी कॉलम-स्पेक का उपयोग करने की आवश्यकता है आप के साथ निर्दिष्ट करना होगा नल BYTE कीवर्ड या Sybase IQ त्रुटि देता है आप यूएनडएड फॉरमेट के साथ डिलीवर द्वारा या आरओई द्वारा उपयोग किए गए विकल्पों का उपयोग नहीं कर सकते। आंशिक इनपुट पंक्ति पर लोड के दौरान आंशिक इनपुट पंक्ति का सामना करने के दौरान कार्रवाई करने के लिए निर्दिष्ट करता है। आप निम्न में से कोई एक निर्दिष्ट कर सकते हैं: एक चेतावनी जारी रखता है और लोड ऑपरेशन जारी रहता है। यह डिफ़ॉल्ट है रोलबैक पूरे लोड ऑपरेशन को बंद करता है और त्रुटि की रिपोर्ट करता है। आंशिक इनपुट रिकॉर्ड EOF पर छोड़ दिया। SQLSTATE: QDC32 SQLSTATE: -1000232L इग्नोर कॉन्ट्रैक्ट निर्दिष्ट करता है कि क्या एक रोलबैक शुरू करने से पहले चेक, अद्वितीय, शून्य, डेटा मूल्य और विदेशी कुंजी एकनिष्ठ बाधा का उल्लंघन जो लोड के दौरान घटित होता है और उपेक्षा करने के लिए उल्लंघनों की अधिकतम संख्या को निर्दिष्ट करता है प्रत्येक कॉन्स्ट्रेंटिपे को निर्दिष्ट करना निम्नलिखित परिणाम है: चेक सीमा यदि सीमा शून्य निर्दिष्ट करती है, तो अनदेखा करने के लिए अद्वितीय बाध्यता उल्लंघन की संख्या अनंत है। यदि चेक निर्दिष्ट नहीं किया गया है, तो किसी भी चेक बाधा उल्लंघन की पहली घटना के कारण लोड स्टेटमेंट को वापस रोल किया जाता है। यदि सीमा नोजरोज़ा है, तो एक चेक बाधा उल्लंघन की सीमा 1 की घटना लोड को वापस रोल करने के लिए कारण है। अद्वितीय सीमा यदि सीमा शून्य निर्दिष्ट करती है, तो अनदेखा करने के लिए अद्वितीय बाध्यता उल्लंघन की संख्या अनंत है। यदि सीमा नोजरोज़ा है, तो एक अद्वितीय बाधा उल्लंघन की सीमा 1 की घटना से लोड को वापस रोल करने के लिए कारण होता है शून्य सीमा यदि सीमा शून्य निर्दिष्ट करती है, तो अनदेखी करने के लिए नल बाधा उल्लंघन की संख्या अनंत है। यदि सीमा नोजरोज़ा है, तो एक शून्य बाधा उल्लंघन की सीमा 1 की वजह से लोड को वापस रोल करने के लिए कारण होता है विदेशी कुंजी सीमा यदि सीमा शून्य निर्दिष्ट करती है, तो अनदेखा करने के लिए विदेशी कुंजी बाध्यता उल्लंघन की संख्या अनंत है। यदि सीमा नोजरोज़ा है, तो विदेशी कुंजी बाध्यता उल्लंघन की सीमा 1 की घटना लोड को वापस रोल करने का कारण बनती है। डेटा की सीमा सीमा यदि डेटाबेस विकल्प CONVERSIONERROR चालू है, तो एक त्रुटि की सूचना दी गई है और कथन वापस रोल करता है। यदि सीमा शून्य निर्दिष्ट करती है, तो अनदेखा करने के लिए आंकड़े VALUE बाधा का उल्लंघन (डेटा प्रकार रूपांतरण त्रुटियां) की संख्या अनंत है यदि सीमा नोजरोज़ा है, तो डेटा की सीमित सीमा 1 की आवृत्ति उल्लंघन के कारण भार को वापस रोल करने का कारण बनता है सभी सीमा यदि डेटाबेस विकल्प CONVERSIONERROR चालू है। एक त्रुटि की सूचना दी है और कथन वापस रोल करता है। यदि सीमा शून्य निर्दिष्ट करती है, तो अनदेखा करने के लिए सभी अखंडता बाधाओं के उल्लंघन की कुल संख्या अनंत है। यदि सीमा नोजरोज़ा है, तो फिर लोड रोल वापस हो जाता है, जब कुल मिलाकर कुल मिलाकर अनोखा, शून्य, डेटा मूल्य, और विदेशी कुंजी अखंडता बाधा का उल्लंघन सीमा के मूल्य से अधिक हो। उदाहरण के लिए, आप निम्न इग्नोर कॉन्ट्रैक्ट विकल्प को निर्दिष्ट करते हैं: अखंडता बाधा उल्लंघन की कुल संख्या 200 से अधिक नहीं हो सकती है, जबकि शून्य और अद्वितीय बाधा उल्लंघन की कुल संख्या क्रमशः 50 और 100 से अधिक नहीं हो सकती। जब भी इनमें से कोई सीमा पार हो गई है, तो लोड तालिका स्टेटमेंट वापस रोल करता है। एक पंक्ति में एक से अधिक अखंडता बाधा का उल्लंघन हो सकता है एक अखंडता बाधा उल्लंघन की हर घटना उस प्रकार की उल्लंघन की सीमा के लिए गिना जाती है। Sybase IGNORE CONSTRAINT विकल्प की सीमा को एक गैरजीरो मान की सशक्त रूप से अनुशंसा करता है यदि आप अनदेखा अखंडता बाधा उल्लंघन लॉगिंग कर रहे हैं। उल्लंघन की एक अत्यधिक संख्या लॉगिंग लोड के प्रदर्शन को प्रभावित करता है। अगर चेक, अद्वितीय, शून्य, या विदेशी कुंजी को IGNORE खंड खंड में निर्दिष्ट नहीं किया गया है, तो लोड इन एकता के सभी प्रकार की पहली बाध्यता पर वापस आती है। यदि डेटा मूल्य IGNORE खंड खंड में निर्दिष्ट नहीं है, तो लोड इस तरह की अखंडता बाधा उल्लंघन की पहली घटना पर वापस रोल, जब तक डेटाबेस विकल्प CONVERSIONERROR बंद। अगर कन्वर्सररर बंद हो किसी भी डेटा के लिए एक चेतावनी की रिपोर्ट बाधा प्रतिबंध है और लोड जारी है लोड पूर्ण होने पर,.iqmsg फ़ाइल में एकतागत बाधा उल्लंघन के बारे में एक सूचनात्मक संदेश लॉग होता है। इस संदेश में लोड के दौरान हुआ और पंक्तियों की संख्या जो छोड़े गए थे, के बीच हुई अखंडता बाधा उल्लंघन की संख्या शामिल है। संदेश लॉग इन फ़ाइलों के नाम निर्दिष्ट करता है जिसमें लॉग इन करने के लिए अखंडता बाधा का उल्लंघन और उल्लंघन के प्रकार के बारे में जानकारी दर्ज होती है। टाइमस्टैम्प जो लोड के आरंभ और पूरा होने को इंगित करता है, दोनों संदेश LOG और ROW LOG फ़ाइलों में लॉग इन हैं I दोनों संदेश लॉग और रो लॉग को निर्दिष्ट किया जाना चाहिए, या अखंडता के उल्लंघन के बारे में कोई जानकारी लॉग नहीं है। यदि एकमात्र LOG खंड निर्दिष्ट नहीं किया गया है, तो अखंडता बाधा उल्लंघन पर कोई जानकारी लॉग नहीं है लोड की शुरुआत और पूरा होने के संकेत केवल टाइमस्टैंप लॉग इन किए जाते हैं। अगर जानकारी WORD निर्दिष्ट होती है तो केवल एक LOG खंड में निर्दिष्ट सभी अखंडता बाधा-प्रकार के उल्लंघनों पर जानकारी या सभी शब्द अनुक्रमणिका-लंबाई उल्लंघनों पर जानकारी लॉग ऑन है। यदि बाध्यता उल्लंघन लॉग किया जा रहा है, तो एक अखंडता बाधा उल्लंघन की प्रत्येक घटना संदेश की LOG फ़ाइल में ठीक एक पंक्ति उत्पन्न करती है MESSAGE LOG फ़ाइल में पंक्तियों की संख्या (त्रुटि रिपोर्ट की गई) IGNORE CONSTRAINT विकल्प सीमा से अधिक हो सकती है, क्योंकि लोड समानांतर में चल रहे एकाधिक थ्रेड द्वारा किया जाता है। एक से अधिक थ्रेड रिपोर्ट कर सकता है कि बाध्यता उल्लंघन की संख्या निर्दिष्ट सीमा से अधिक हो गई है। यदि बाध्यता उल्लंघन लॉग किया जा रहा है, तो जानकारी की एक पंक्ति पंक्ति पंक्ति में होने वाली अखंडता बाधा के उल्लंघन की संख्या को ध्यान में रखते हुए पंक्ति पंक्ति के लिए आरओओ लॉग फ़ाइल में लॉग ऑन किया गया है। MESSAGE LOG फ़ाइल में भिन्न त्रुटियों की संख्या ROW LOG फ़ाइल में पंक्तियों की संख्या से बिल्कुल मेल नहीं खाती। पंक्तियों की संख्या में अंतर संदेश LOG के लिए ऊपर वर्णित लोड की समानांतर प्रसंस्करण के कारण है। संदेश LOG और ROW LOG फ़ाइलें कच्चे विभाजन नहीं हो सकते। यदि संदेश LOG या ROW LOG फ़ाइल पहले से मौजूद है, तो नई जानकारी को फ़ाइल में जोड़ा गया है। संदेश LOG या ROW LOG फ़ाइल के लिए एक अमान्य फ़ाइल नाम निर्दिष्ट करना एक त्रुटि उत्पन्न करता है संदेश LOG और ROW LOG फ़ाइलों के लिए एक ही फ़ाइल नाम निर्दिष्ट करना एक त्रुटि उत्पन्न करता है IGNORE कॉन्ट्रैक्ट और संदेश लॉग विकल्पों के विभिन्न संयोजनों के परिणामस्वरूप विभिन्न लॉगिंग क्रियाएं होती हैं, जैसा कि तालिका 6-11 में दर्शाया गया है तालिका 6-11: लोड टेबल लॉगिंग क्रियाएं निर्दिष्ट IGNORE CONSTRAINT कुछ भी नहीं लॉग है। पहली अखंडता बाधा उल्लंघन एक रोलबैक का कारण बनता है Sybase जोरदार करने की सिफारिश की IGNORE CONSTRAINT विकल्प सीमा एक nonzero मूल्य के लिए, यदि आप उपेक्षित अखंडता बाधा उल्लंघन प्रवेश कर रहे हैं अगर एक पंक्ति में एक से अधिक अखंडता बाधा का उल्लंघन होता है, तो प्रत्येक उल्लंघन के लिए एक पंक्ति को संदेश LOG फ़ाइल में लिखा जाता है। उल्लंघन की एक अत्यधिक संख्या लॉगिंग लोड के प्रदर्शन को प्रभावित करता है। LOG द्वारा ऑफ़लाइन ROW LOG फ़ाइल में डेटा मूल्य के बीच विभाजक निर्दिष्ट करता है। डिफ़ॉल्ट विभाजक एक अल्पविराम है साइड इफेक्ट SQL92 विक्रेता एक्सटेंशन। साइबेस लागू नहीं है अनुमतियाँ एक लोड तालिका वक्तव्य निष्पादित करने के लिए आवश्यक अनुमतियाँ डेटाबेस सर्वर - जीएल कमांड लाइन ऑप्शन पर निर्भर करती है, निम्नानुसार: यदि - जीएल ऑब्जेक्ट को सभी पर सेट किया गया है, तो आपको तालिका का स्वामी होना चाहिए, डीबीए प्राधिकरण है, या ALTER है अनुमति। यदि - जीएल विकल्प डीबीए पर सेट है, तो आपके पास डीबीए अधिकार होना चाहिए यदि - जीएल विकल्प को नहीं सेट किया गया है, तो लोड टेबल को अनुमति नहीं है। लोड टेबल को टेबल पर एक अनन्य लॉक की आवश्यकता होती है। एसएपी साइबेस आईक्यू अनस्ट्रक्चर डेटा एनालिटिक (यूडीए) ऑप्शंस हद तक एसएपी साइबेस आईक की क्षमताओं को पाठ विश्लेषण (डेटा खनन) करने के लिए है। यह विकल्प कैरेक्टर लार्ज ऑब्जेक्ट्स (सीएलओबी) और बाइनरी लार्ज ऑब्जेक्ट्स कॉलम का निर्माण करने की अनुमति देता है, जो द्विआधारी दस्तावेज़ों (जैसे एमएस एक्सेल, एमएस वर्ड, आदि) को स्टोर और हेरफेर करने के लिए उपयोग किया जाता है और लंबी पाठ कॉलम (बाइनरी ऑब्जेक्ट की फ़िल्टर्ड सामग्री)। उन CLOB से अंतर्दृष्टि प्राप्त करने के लिए, हमें उन कॉलमों को इंडेक्स करने और स्ट्रिंग फ़ंक्शंस का उपयोग करने के लिए जानकारी प्राप्त करने, उनकी तुलना और निकालने की आवश्यकता है। केस संवेदनशील डेटाबेस: जटिल प्रश्नों की आवश्यकता के आधार पर खनन प्रक्रिया में जटिलता जोड़ सकते हैं और संभवतः ऊपरी और निचले मामले के संयोजन संयोजन (गलत या नहीं) के कारण चूक को जगह दें। डेटा खनन के दौरान मामले संवेदनशीलता के प्रभाव को कम करने के लिए कई विकल्प हैं, उनमें से कुछ देखें: अपने प्रश्नों के पूर्वानुमान (बहुत सारी संभावनाएं, अनुशंसित नहीं) में ऊपरी और निचले मामले के हर संभव संयोजन का उपयोग करें। तुलनात्मक ऑपरेटर का उपयोग करने से पहले कॉलम की सामग्री को ऊपरी या निचले मामले में कनवर्ट करने के लिए प्रश्नों के पूर्वानुमान में फ़ंक्शन का उपयोग करें। MyUser. Mytable से चुनें जहां lcase (mycolum) की तरह lsquoterm8217 यह काम अच्छी तरह से स्ट्रिंग कॉलम के लिए है जो CLOB LCASE, UCASE, LOWER और UPPER फ़ंक्शन CLOB डेटा प्रकार कॉलम पर समर्थित नहीं हैं। Convert the pre filtered text to upper or lower case before storing it on the CLOB column use the same case in all the predicate of your queries. Create the database with the CASE IGNORE option this option can not be changed after the database is been created. If the SAP Sybase IQ database will be primary used for data mining and the case can be ignored, it is recommended to create the database with CASE IGNORE property by default all SAP Sybase IQ database are created with CASE RESPECT property. Chapter 7: Moving Data In and Out of Databases Bulk loading data using the LOAD TABLE statement The LOAD TABLE statement is used for efficient importing of data from a text or binary file into an existing database table. It loads data into any column indexes you have defined, as well as any created automatically. The permissions needed to execute a LOAD TABLE statement are set on the server command line, using the - gl option. Sybase recommends the - gl all setting, which allows any user to load or unload a table. This is the default setting set by startasiq . If the - gl option is set to ALL, you must be the owner of the table, have DBA authority, or have ALTER permission, in order to use the LOAD TABLE statement. You also need INSERT permission on the table. See the description of the ON FILE ERROR load option for what happens when input file errors occur during a load. Using command files to load data To load large amounts of data, most users create command files. To create a command file, follow the instructions in the chapter entitled Getting Started with DBISQL in the Introduction to Sybase IQ . Transaction processing and LOAD TABLE When you issue the LOAD TABLE statement for an IQ table, a savepoint occurs automatically before the data is loaded. If the load completes successfully, Sybase IQ releases the savepoint. If the load fails, the transaction rolls back to the savepoint. This approach gives you flexibility in committing transactions. For example, if you issue two LOAD TABLE commands, you can ensure that either both commit or neither. When you issue LOAD TABLE for a Catalog Store table, there is no automatic savepoint. If the load succeeds, it commits automatically. If the load fails, it rolls back. You cannot roll back a successful load of a Catalog Store table. Integrity constraints and LOAD TABLE LOAD TABLE allows you to control load behavior when integrity constraints are violated and to selectively log information about the violations. You can specify whether to ignore UNIQUE, NULL, DATA VALUE, andor FOREIGN KEY constraint violations that occur during a load and the maximum number of violations to ignore before initiating a rollback. You can also direct the load to log information about specific types of integrity constraint violations both per violation in a message log and per row in a row log. For information on the contents and format of the message and row logs, see Logging integrity constraint violations . Summary of LOAD TABLE syntax The basic form of the LOAD TABLE statement is: For usage and syntax details of all of the LOAD TABLE parameters, see LOAD TABLE statement in Chapter 6, SQL Statements of the Sybase IQ Reference Manual . Load specification The load-specification does the following: Lists each column to be loaded and describes the data in it. A column can contain fixed-length data, variable-length characters delimited by a separator, or data that uses a binary prefix to represent the number of bytes being read. Specifies FILLER format for any fields you want to skip. The syntax for load-specification is as follows: For each column, you can specify a column-spec . If you omit this option, the format information in the load-options applies to this column. The column-spec and load-options format information tell Sybase IQ what type of data to expect, and how to convert it into a compatible data format if necessary. Syntax for the column-spec is: You can specify the following types of data in the column-spec : Data with bytes of fixed length. Although specified by the keyword ASCII, any 8-bit characters may be used, and for 16-bit character sets, two 8-bit characters are used for each 16-bit character. No code conversion is performed for char and varchar fields except truncation, blank stripping, or blank padding. ASCII is also used to fill numeric data, time, and datetime fields. In each case, the conversion is the same if the value were first inserted as a character field, then cast to the data type of the column in the table. The input-width value is an integer value indicating the fixed width in bytes of the input field in every record. Binary fields that use a number of PREFIX bytes (1, 2, or 4) to specify the length of the binary input. The BINARY keyword indicates that data is already converted to the internal form (except for when the byte-order load option is specified. Note that if the data is unloaded using the extraction facility with the TEMPEXTRACTBINARY option set ON, then you must use the BINARY WITH NULL BYTE parameter for each column when you load the binary data. Variable-length characters delimited by a separator. You specify the delimiter-string as a string of one to four ASCII characters, or any 8bit hexadecimal ASCII code that represents a single, non-printing character. The delimiter-string must be enclosed in single quotes. For example, you specify: x09 to represent a tab as the terminator. x00 for a null terminator (no visible terminator as in C strings). x0a for a newline character as the terminator. You can also use the special character combination of n for newline. DATE or DATETIME string as ASCII characters. You must define the input-date-format or input-datetime-format of the string using one of the corresponding formats for the date and datetime data types supported by Sybase IQ. Use DATE for date values and DATETIME for datetime and time values. For information about these data types, see the Sybase IQ Reference Manual . The column-spec is for IQ tables only. If you specify a column-spec for a Catalog Store table, you get an error. The NULL portion of the column-spec indicates how to treat certain input values as NULL values when loading into the table column. These characters can include BLANKS, ZEROS, or any other list of literals you define. When you specify a NULL value or read a NULL value from the source file, the destination column must be able to contain NULLs. ZEROS are interpreted as follows: the cell is set to NULL if (and only if) the input data (before conversion, if ASCII) is all binary zeros (and not character zeros). If the input data is character zero, then: a) NULL(ZEROS) never causes the cell to be NULL b) NULL(0) causes the cell to be NULL If the input data is binary zero (all bits clear), then: a) NULL(ZEROS) causes the cell to be NULL b) NULL(0) never causes the cell to be NULL For example, if your LOAD statement includes col1 date(yymmdd) null(zeros) and the date is 000000, you will receive an error indicating that 000000 cannot be converted to a DATE(4). To get the load statement to insert a NULL value in col1 when the data is 000000, you must write the NULL clause as null(000000). or modify the data to equal binary zeros and use NULL(ZEROS). The FILLER clause indicates you want to skip over a specified field in the source input file. For example, there may be characters at the end of rows or even entire fields in the input files that you do not want to add to the table. As with the column-spec definition, FILLER allows you to specify ASCII fixed length of bytes, variable length characters delimited by a separator, and binary fields using PREFIX bytes. The maximum length of a variable-length FILLER column is 512 bytes. FILLER clause syntax is as follows: For more information on how to use data conversion options, see Converting data on insertion . Specifying files to load You specify one or more files from which to load data. In the FROM clause, you specify each filename-string . and separate multiple strings by commas. The files are read one at a time, and processed in a left-to-right order as specified in the FROM clause. Any SKIP or LIMIT value only applies in the beginning of the load, not for each file. If a load cannot complete, for example due to insufficient memory, the entire load transaction is rolled back. filename-string The filename-string is passed to the server as a string. The string is therefore subject to the same formatting requirements as other SQL strings. In particular: If a backslash () precedes the characters n. x. or it is considered an escape character. For this reason, to indicate directory paths in Windows systems, you must represent the backslash character by two backslashes if the next character is any of those listed. (It is always safe to double the backslashes.) Therefore, the statement to load data from the file c:newinput. dat into the employee table is: The pathname is relative to the database server, not to the client application. If you are running the statement on a database server on some other computer, the directory name refers to directories on the server machine, not on the client machine. The input file for the load must be on the server machine. Named pipes The file specification can be a named pipe. When you load from a named pipe (or FIFO) on Windows, the program writing to the pipe must close the pipe in a special way. The pipe writer must call FlushFileBuffers( ) and then DisconnectNamedPipe( ). (If you do not, Sybase IQ reports an exception from hosio::Read( ).) This issues a PIPENOTCONNECTED error, which notifies Sybase IQ that the pipe was shut down in an orderly manner rather than an uncontrolled disconnect. See Microsoft documentation for details on these calls. Specifying table-wide format options You can specify several options that describe the format of input data. FORMAT option You can specify a default format for table columns, which applies if you omit the column-spec . The same formats that can appear in the column-spec can appear here. If you also omit the FORMAT load option, the file is assumed to be binary. DELIMITED BY option If you omit a column delimiter in the column-spec definition, the default column delimiter character is a comma. You can specify an alternative column delimiter by providing a single ASCII character or the hexadecimal representation. In particular, to specify tab-delimited values use the hexadecimal ASCII code of the tab character (9), as follows: To use the newline character as a delimiter, you can specify either the special combination n or its ASCII value x0a. Although the delimiter-string in the column-spec may be a string of up to four characters, the DELIMITED BY option allows only a single ASCII character or its hexadecimal representation. STRIP option With STRIP turned on (the default), trailing blanks are stripped from values before they are inserted. This is effective only for VARCHAR data. To turn the STRIP option off, enter the clause as follows: Trailing blanks are stripped only for non-quoted strings. Quoted strings retain their trailing blanks. If you dont require blank sensitivity, you may use the FILLER option allows you to be more specific in the number of bytes to strip instead of just all the trailing spaces. This option does not apply to ASCII fixed-width inserts. For example, the STRIP option in the following statement is ignored: QUOTES option The QUOTES parameter is optional and the default is ON . With QUOTES turned on, LOAD TABLE expects input strings to be enclosed in quote characters. The quote character is either an apostrophe (single quote) or a quotation mark (double quote). The first such character encountered in a string is treated as the quote character for the string. String data must be terminated with a matching quote. With QUOTES ON . column or row delimiter characters can be included in the column value. Leading and ending quote characters are assumed not to be part of the value and are excluded from the loaded data value. With QUOTES OFF . Sybase IQ does not strip off apostrophes (single quotes) or quotation marks (double quotes). When it encounters these characters in your input file, it treats them as part of the data. With QUOTES OFF . you cannot include column delimiter characters in column values. QUOTES option example Consider a table defined as: with the following input data: The result of loading this data is displayed by running the following query: The following output displays the result of the query enclosed by lt and gt and the values of the LOAD TABLE options QUOTES and STRIP : Notes on the results: With QUOTES ON and STRIP ON . both leading space and trailing space for the non-enclosed field c2 row 1 are trimmed. With QUOTES ON and STRIP OFF . only the leading space for the non-enclosed field c2 row 1 is trimmed. With QUOTES OFF and STRIP ON . only the trailing space for the non-enclosed field c2 row 1 is trimmed. With QUOTES OFF and STRIP OFF . neither leading space nor trailing space for the non-enclosed field c2 row 1 is trimmed. With QUOTES ON and STRIP ON . both leading space and trailing space within quotes for the enclosed fields c2 and c3 row 3 are NOT trimmed. ESCAPES option Currently, you must specify ESCAPES OFF . The default of ESCAPES ON is provided for compatibility with Adaptive Server Anywhere this option may be supported in a future version. With ESCAPES turned on, if you omit a column-spec definition for an input field, characters following the backslash character are recognized and interpreted as special characters by the database server. Newline characters can be included as the combination n, and other characters can be included in data as hexadecimal ASCII codes, such as x09 for the tab character. A sequence of two backslash characters ( ) is interpreted as a single backslash. WORD SKIP option Allows the load to continue when it encounters data longer than the limit specified when the word index was created. For details, see LOAD TABLE statement, Chapter 6, SQL Statements, in the Sybase IQ Reference Manual. The following UNIX example specifies a BLOCK FACTOR of 50,000 records along with the PREVIEW option: Specifying load options You can specify a wide range of load options. These options tell Sybase IQ how to interpret and process the input file, and what to do when errors occur. You can specify load options in any order. Syntax for load-options is as follows: The syntax for the parameters is as follows: Each of these options is described briefly below. For details of all options of the LOAD TABLE statement, see the Sybase IQ Reference Manual . BLOCK FACTOR option Specifies blocking factor, or number of records per block, used when a source was created. This option is not valid for insertions from variable length input fields use the BLOCK SIZE option instead. However, it does affect all file inserts (including from disk) with fixed length input fields, and it can affect performance dramatically. The default setting for BLOCK FACTOR is 10,000. Higher block factors generally improve the speed of IO operations. However, consider the following when setting this option: If your source is a disk file, memory considerations will determine the best setting for your system. If your source is a tape, either use the same blocking factor that was used when creating the tape (for best performance) or a blocking factor that is evenly divisible into it. Sybase IQ rejects the insert operation if you specify a BLOCK FACTOR of zero. You cannot specify BLOCK FACTOR along with BLOCK SIZE or with any variable-width input fields. If you are loading very wide varchar data, reduce the BLOCK FACTOR to 10. ESCAPE CHARACTER option Specifies an alternative escape character. The default escape character for characters stored as hexadecimal codes and symbols is a backslash (), so that x0A is the linefeed character, for example. This can be changed using the ESCAPE CHARACTER clause. For example, to use the exclamation mark as the escape character, you would enter: Only one single-byte character can be used as an escape character. Because you must specify ESCAPES OFF in this version of Sybase IQ, the ESCAPE CHARACTER option has no effect. It is provided for compatibility with Adaptive Server Anywhere. WITH CHECKPOINT ON clause If this option is set to ON . a checkpoint is issued when the LOAD TABLE statement completes and is logged. In the event recovery is required, it is guaranteed even if the data file is then removed from the system. If WITH CHECKPOINT ON is not specified, the file used for loading must be retained in case recovery is required. BLOCK SIZE option Specifies the default size in bytes in which input should be read. This option only affects variable-length input data read from files it is not valid for fixed-length input fields. It is similar to BLOCK FACTOR . but there are no restrictions on the relationship of record size to block size. You cannot specify this option along with the BLOCK FACTOR option. The default setting for BLOCK SIZE is 500,000, which is high enough for input from disk files. For tape files, you should specify the same block size that was used when creating the tape. You cannot specify BLOCK SIZE along with BLOCK FACTOR or with any fixed width input fields. The following UNIX example specifies a BLOCK SIZE of 200,000 bytes: BYTE ORDER option Specifies the byte ordering during reads. This option applies to all binary input fields, including those defined as PREFIX 2 or PREFIX 4. If none are defined, this option is ignored. Sybase IQ always reads prefix binary data in the format native to the machine it is running on (default is NATIVE ). You can also specify: HIGH when multibyte quantities have the high order byte first (for big endian platforms like Sun, IBM AIX, and HP). LOW when multibyte quantities have the low order byte first (for little endian platforms like Windows). Here is a Windows example: LIMIT option Specifies the maximum number of rows to insert into the table. The default is 0 for no limit. The maximum is 2GB-1. LIMIT works together with the SKIP option. SKIP indicates where to begin reading from the input file, and LIMIT specifies how many of those rows to insert. SKIP takes precedence over LIMIT . If you specify multiple input files, these options only affect the first file . The following table shows how these options work together: Table 7-1: SKIP and LIMIT insert options If the SKIP value is Reads 10 rows and inserts 5 rows. If the input file has only 8 rows, then zero rows are inserted. In the following Windows example, no rows are skipped and up to 1,000,000 rows are inserted. NOTIFY option Specifies that you be notified with a message each time the specified number of rows is inserted successfully into the table. The default is every 100,000 rows. Very frequent notifications can slow down your insert operation. To turn off NOTIFY entirely, set NOTIFY 0. See Interpreting notification messages for an explanation of messages. ON FILE ERROR option Specifies the action Sybase IQ takes when an input file cannot be opened, either because it does not exist or because you have incorrect permissions to read the file. For all other reasons or errors, it aborts the entire insertion. You can specify one of the following: ROLLBACK aborts the entire transaction (the default). FINISH finishes the insertions already completed and ends the load operation. CONTINUE returns an error but only skips the file to continue the load operation. You cannot use this option with partial-width inserts. PREVIEW option Displays the layout of input into the destination table including starting position, name, and data type of each column. Sybase IQ displays this information at the start of the load process. If you are writing to a log file, this information is also included in the log. This option is especially useful with partial-width inserts. It can help you diagnose failed or skewed insertions due to incompatible data types, or destination column alignment that does not match source columns. Look at the expected column data type and starting position information to determine if you need to use an insert conversion option on a column andor where and how much filler to use. PREVIEW ON helps you determine if a load is correct. It does not stop the load from occurring. ROW DELIMITED BY option Specifies a string up to 4 bytes in length that indicates the end of an input record. You can use this option only if all fields within the row are any of the following: Delimited with column terminators Data defined by the DATE or DATETIME column-spec options ASCII fixed length fields The row delimiter can be any string of from 1 to 4 8-bit codes, including any combination of printable characters, andor any 8bit hexadecimal code that represents a non-printing character. For example, you specify x09 to represent a tab as the terminator. For a null terminator (no visible terminator as in C strings), you specify x00. To use the newline character as a row delimiter, you can specify either the special combination n or its ASCII value x0a. You cannot use this option if any input fields contain binary data. With this option, a row terminator causes any missing fields to be set to NULL. All rows must have the same row delimiters, and it must be distinct from all column delimiters. The row and field delimiter strings cannot be an initial subset of each other. For example, you cannot specify as a field delimiter and as the row delimiter, but you could specify as the field delimiter with that row delimiter. If a row is missing its delimiters, Sybase IQ returns an error and rolls back the entire load transaction. The only exception is the final record of a file where it rolls back that row and returns a warning message. On Windows, a row delimiter is usually indicated by the newline character followed by the carriage return character. You may need to specify this as the delimiter-string for either this option or FILLER. The following Windows example sets the column delimiter for the lorderkey column to tab, and the row delimiter to newline (x0a) followed by carriage return (x0d): SKIP option Lets you define a number of rows to skip at the beginning of the input file(s) for this load. The default is 0. This option works in conjunction with the LIMIT option, and takes precedence over it. In this UNIX example, Sybase IQ reads 9,000 rows from the input file, skips the first 5,000, and loads the next 4,000. If there are only 8,000 rows in the input file, then only 3,000 rows are loaded. START ROW ID option Specifies the id number of a row in the table where insertions should begin. This option is used for partial-width insertions . which insert into a subset of the columns in the table. If you are inserting data into an existing row, you must define the format of each input column with a column-spec . and use START ROW ID to identify the row where you want to insert it. The default is 0, which causes data to be inserted in a new row wherever there is space in the table. Be sure to read Partial-width insertions before using this option and performing partial-width inserts. UNLOAD FORMAT option Specifies that the data in the input file is in the format produced by the UNLOAD command in Sybase IQ 11.5.1, specifically for upgrading to Sybase IQ 12.x. This format places certain restrictions on other load options you specify: The format in the column specifications must be BINARY . the default. Specifying ASCII . PREFIX . FILLER . or string-delimiter causes an error. You must not use the load options DELIMITED BY and ROW DELIMITED BY . To allow NULLs in the data you must specify BINARY WITH NULL BYTE in the column specification. You cannot include NULL in the column-spec in any other way. For the sake of consistency with the data being loaded, you can specify BINARY WITH NULL BYTE even when loading into a table column that does not allow NULLs (as specified in CREATE TABLE or ALTER TABLE ). However, if you try to load any data into a column that does not allow NULLs, you receive an error. See the Sybase IQ Installation and Configuration Guide for more information on upgrading. ON PARTIAL INPUT ROW option Specifies the action to take when a partial input row is encountered during a load. You can specify one of the following: CONTINUE issues a warning and continues the load operation. यह डिफ़ॉल्ट है ROLLBACK aborts the entire load operation and reports the error IGNORE CONSTRAINT option Specifies whether to ignore UNIQUE, NULL, CHECK, DATA VALUE, andor FOREIGN KEY integrity constraint violations that occur during a load and the maximum number of violations to ignore before initiating a rollback. Specifying each constrainttype has the following result: UNIQUE limit If limit specifies zero, then the number of UNIQUE constraint violations to ignore is infinite. If limit is non-zero, then the limit 1 occurrence of a UNIQUE constraint violation causes the load to rollback. NULL limit If limit specifies zero, then the number of NULL constraint violations to ignore is infinite. If limit is non-zero, then the limit 1 occurrence of a NULL constraint violation causes the load to rollback. FOREIGN KEY limit If limit specifies zero, then the number of FOREIGN KEY constraint violations to ignore is infinite. If limit is non-zero, then the limit 1 occurrence of a FOREIGN KEY constraint violation causes the load to rollback. DATA VALUE limit If the database option CONVERSIONERROR ON, then an error is reported and the statement rolls back. If limit specifies zero, then the number of DATA VALUE constraint violations (data type conversion errors) to ignore is infinite. If limit is non-zero, then the limit 1 occurrence of a DATA VALUE constraint violation causes the load to rollback. ALL limit If the database option CONVERSIONERROR ON, then an error is reported and the statement rolls back. If limit specifies zero, then the cumulative total of all integrity constraint violations to ignore is infinite. If limit is non-zero, then load rolls back when the cumulative total of all ignored UNIQUE, NULL, DATA VALUE, and FOREIGN KEY integrity constraint violations exceeds the value of limit . For example, you specify the following IGNORE CONSTRAINT option: The total number of integrity constraint violations cannot exceed 200, while the total number of NULL and UNIQUE constraint violations cannot exceed 50 and 100, respectively. Whenever any of these limits is exceeded, the LOAD TABLE statement rolls back. A single row can have more than one integrity constraint violation. Every occurrence of an integrity constraint violation counts towards the limit of that type of violation. Sybase strongly recommends setting the IGNORE CONSTRAINT option limit to a non-zero value, if you are logging the ignored integrity constraint violations. Logging an excessive number of violations affects the performance of the load. CHECK limit If limit specifies zero, then the number of check constraint violations to ignore is infinite. If limit is non-zero, then the limit 1 occurrence of a CHECK constraint violation causes the load to roll back. A single row can have more than one integrity constraint violation. Every occurrence of an integrity constraint violation counts towards the limit of that type of violation. Sybase strongly recommends setting the IGNORE CONSTRAINT option limit to a non-zero value, if you are logging the ignored integrity constraint violations. Logging an excessive number of violations affects the performance of the load. If UNIQUE, NULL, CHECK, or FOREIGN KEY is not specified in the IGNORE CONSTRAINT clause, then the load rolls back on the first occurrence of each of these types of integrity constraint violation. If DATA VALUE is not specified in the IGNORE CONSTRAINT clause, then the load rolls back on the first occurrence of this type of integrity constraint violation, unless the database option CONVERSIONERROR OFF. If CONVERSIONERROR OFF, then a warning is reported for any DATA VALUE constraint violation and the load continues. When the load completes, an informational message regarding integrity constraint violations is logged in the. iqmsg file. This message contains the number of integrity constraint violations that occurred during the load and the number of rows that were skipped. MESSAGE LOG option Specifies the names of files in which to log information about integrity constraint violations and the types of violations to log. Timestamps indicating the start and completion of the load are logged in both the MESSAGE LOG and the ROW LOG files. Both MESSAGE LOG and ROW LOG must be specified, or no information about integrity violations is logged. If the ONLY LOG clause is not specified, then no information on integrity constraint violations is logged. Only the timestamps indicating the start and completion of the load are logged. Information is logged on all integrity constraint type violations specified in the ONLY LOG clause. If constraint violations are being logged, then every occurrence of an integrity constraint violation generates exactly one row of information in the MESSAGE LOG file. The number of rows (errors reported) in the MESSAGE LOG file can exceed the IGNORE CONSTRAINT option limit, because the load is performed by multiple threads running in parallel. More than one thread may report that the number of constraint violations has exceeded the specified limit. If constraint violations are being logged, then exactly one row of information is logged in the ROW LOG file for a given row, regardless of the number of integrity constraint violations that occur on that row. Note that the number of distinct errors in the MESSAGE LOG file may not exactly match the number of rows in the ROW LOG file. The difference in the number of rows is due to the parallel processing of the load described above for the MESSAGE LOG . The MESSAGE LOG and ROW LOG files cannot be raw partitions. If the MESSAGE LOG or ROW LOG file already exists, then new information is appended to the file. Specifying an invalid filename for the MESSAGE LOG or ROW LOG file generates an error. Specifying the same filename for the MESSAGE LOG and ROW LOG files generates an error. Various combinations of the IGNORE CONSTRAINT and MESSAGE LOG options result in different logging actions, as indicated in the following table: Nothing is logged. The first integrity constraint violation causes a rollback. Sybase strongly recommends setting the IGNORE CONSTRAINT option limit to a non-zero value, if you are logging the ignored integrity constraint violations. If a single row has more than one integrity constraint violation, a row for each violation is written to the MESSAGE LOG file. Logging an excessive number of violations affects the performance of the load. LOG DELIMITED BY option Specifies the separator between data values in the ROW LOG file. The default separator is a comma. For more details on the contents and format of the MESSAGE LOG and ROW LOG files, see Logging integrity constraint violations . LOAD TABLE adds rows The LOAD TABLE statement appends the contents of the file to the existing rows of the table it does not replace the existing rows in the table, unless you specify the START ROW ID load option. See Partial-width insertions for examples of how you use this option to insert data into existing rows. If you want to empty out an existing table and reload it, you can use the TRUNCATE TABLE statement to remove all the rows from a table. Simple LOAD TABLE example The following statement loads the data from the file dept. txt into all columns of the department table. This example assumes that no explicit data conversion is needed, and that the width of input columns matches the width of columns in the department table. Copyright 2006. Sybase Inc. All rights reserved.

No comments:

Post a Comment