次歃圳N醳 IBM(R) DB2(R) Universal Database 次歃圳N醳 次劑 7.2 / 次劑 7.1 FixPak 3 (C) Copyright International Business Machines Corporation 2000, 2001. All rights reserved. Note to U.S. government Users -- Documentation related ... ------------------------------------------------------------------------ 到 * 到 * w媥 DB2 Universal Database 次劑 7背 ------------------------------------------------------------------------ 蕶顢茫何 * 蕶顢茫何 o 1.1 DB2 UDB 次劑 7 戍酨灥蕶詫 + 1.1.1 俠祌枵碉矧 + 1.1.1.1 俠枵 + 1.1.1.2 俠澂貂 + 1.1.2 堉ず蕶詫 + 1.1.2.1 腦イ酮蜙 + 1.1.2.2 戠悚]肄襏 + 1.1.2.3 潲カ + 1.1.3 搨翭i + 1.1.4 儭纇N戍虎委詫 + 1.1.5 養酨灥戍麩 o 1.2 衣閭戍澱繐 Solaris 柳歃 o 1.3 Supported CPUs on DB2 Version 7 for Solaris o 1.4 s柱躒貂牁釬定戍齶ガ o 1.5 騥齔繾熪擁戍砷 o 1.6 Red Flag Linux 戍珫砰躨蜸儘獛搨 o 1.7 愩刖養齁搨忪忘鼭冀s鼪耍屑 DB2 揅壧|珫跛 o 1.8 碉媽珫 Linux 蓔 DB2 for Linux 戍衣閭砰躨裼]肄 o 1.9 Microsoft Internet Explorer 柼戍嚭珫眃齶ガ o 1.10 彀 Windows 蓔洐u鬞悚到扯z獛搨赳瓬 Sybase 祌繾戍虎委 o 1.11 嚭珫眃閱泊噬 o 1.12 Netscape CD 廈衣腺 DB2 UDB o 1.13 XML Readme 戍砷 o 1.14 Linux for S/390 柼養戍泊噬 o 1.15 Windows 2000 柼戍 DB2 UDB * 哎柼麩 (HTML耑PDF 烈赴j餬赳) o 2.1 Windows 2000 鏼~鑶袑蓔儭戍 Web 鈕檍 o 2.2 彀 Solaris 鑶豜Uj餬 DB2 s哎鬞 o 2.3 炵黈 NetQuestion for OS/2 鄧媥 TCP/IP o 2.4 鼖韥 Netscape 擁戍砷鬞昔 o 2.5 UNIX 鑶豜W Adobe Acrobat Reader 戍歧呃茫臡 o 2.6 SQL Reference 譧虪柜譇 PDF ------------------------------------------------------------------------ 揅壧烈歧呃 * 柜揅壧鬞 o 3.1 柰詻嗀儭戍 DB2 雚膼鬫抖w壧和麩 o 3.2 彀 Windows 2000 柼揅壧 DB2 o 3.3 腺蘞浀▽H蕶顢皈酨鱦肄霿戍騥齶ガ o 3.4 Windows 2000 戍 IPX/SPX q埔灨肄儭 o 3.5 DB2 容柜次祌容樺欘 DB2 獛 o 3.6 礔洄揅壧擂 DB2 恙耍巷彀揅壧 DB2 祌鸉 db2iupdt o 3.7 ]肄 Linux 蒝H鸉 DB2 嚭珫眃 o 3.8 DB2 Universal Database Enterprise Edition 瓬 DB2 Connect Enterprise Edition for Linux on S/390 o 3.9 DB2 Universal Database Enterprise - Extended Edition for UNIX t枵 o 3.10 HP-UX 戍 shmseg 眃囓 o 3.11 騥 IBM Visual 暖嚭定 o 3.12 酨灥暖嚭定 * DB2 Data Links Manager t枵 o 4.1 Dlfm 戍鼖韥噬韖鬞昔胃灥隳 afsfid 戠藃熪擁砷 o 4.2 ]肄樵奚酨戍 Tivoli Storage Manager ю顢 o 4.3 DFS 雚膼虀裲祔{搨戍忪忘繾茫臡 o 4.4 忌誾b AIX 戍膣扯z獛搨抑獛 o 4.5 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 DCE-DFS 裱犌 オ鴉揅壧圳N醳 o 4.6 噬韖戍 "dlfm add_prefix" 銻 o 4.7 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 媥 db2setup 洢 擋獛搨彀 AIX 柼揅壧 DB2 Data Links Manager o 4.8 揅壧碉歧呃 DB2 Data Links Manager for AIX胃DCE-DFS 鑅揅壧鏼 ~ o 4.9 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 媥 Smit 閞韥 揅壧 DB2 Data Links Manager o 4.10 揅壧碉歧呃 DB2 Data Links 戍 DFS 雚膼虀裲祔{搨 o 4.11 揅壧碉歧呃 DB2 Data Links Manager for Solaris o 4.12 黳 AIX 柼戍 DB2 Data Links Manager 樵妄 o 4.13 黳 Solaris 鏼~蓔W戍 DB2 Data Links Manager 樵 妄 o 4.14 黳 Windows NT 柼戍 DB2 Data Links Manager 樵妄 o 4.15 樵 AIX 柼戍韄到鑶 o 4.16 彀 Windows NT 柼膣珫戍 Administrator 顪殥M擋v o 4.17 醨 Data Links File System Filter (DLFF) 揅壧戍韄瘐 + 4.17.1 彀揅壧韄鬞昔 o 4.18 媥 SMIT 鬙揅壧 DLFM 祅麩養|颳オ鴉戍鐖 o 4.19 礤絛祌容/讘肄遭q巰投 o 4.20 媥 DLFM胃雚 DB2 定鵛鞥 DB2 Data Links Manager 戍M 韥鏼 o 4.21 DLFM1001E (s戍砷鬞昔) o 4.22 DLFM ]肄歧呃醳 o 4.23 彀 AIX 柼鸉 Data Links/DFS Script dmapp_prestart 熪擁 砷 o 4.24 Tivoli Space Manager 烈 Data Links 鬷幏 + 4.24.1 閱貙 o 4.25 4 揅壧碉歧呃 DB2 Data Links Manager for AIX + 4.25.1 柜揅壧圳N醳 + 4.25.1.1 雚 DB2 File Manager 次劑 5.2 騥 DB2 Data Links Manager 次劑 7 * 揅壧烈歧呃銬 o 5.1 5 彀 UNIX 鏼~鑶豜W揅壧 DB2 雚膼 + 5.1.1 HP-UX 眃獛搨歧呃囓 o 5.2 12 鸉鞮椻洳戍睦擋獛搨 + 5.2.1 媥 Run-Time Client s膣定洢擋獛搨 + 5.2.2 UNIX 雚膼蠮媥 ODBC 酨灥 DB2 o 5.3 24 ]鑅皖幏鑶釱靲s灥愫薿僬 + 5.3.1 皖幏鑶 + 5.3.1.1 貙 + 5.3.2 揅壧 DB2 Relational Connect + 5.3.2.1 彀 Windows NT 再齗柼揅壧 DB2 Relational Connect + 5.3.2.2 彀 AIX耑Linux 瓬 Solaris 鏼~蜙再齗柼揅壧 DB2 Relational Connect o 5.4 26 酨灥 Oracle 僬 + 5.4.1 麩砷 o 5.5 酨灥 Sybase 僬 (s柱躒) + 5.5.1 s柱 Sybase 僬待皖幏再齗 + 5.5.1.1 纙J 1胃]肄虋鶔s]肄熡到 + 5.5.1.2 纙J 2胃醨 DB2 膣 Sybase 雚膼襴n (譧 AIX 烈 Solaris) + 5.5.1.3 纙J 3胃薿s媥 DB2 + 5.5.1.4 纙J 4胃擔虋]肄祊貘 + 5.5.1.5 纙J 5胃擔鴉柳 + 5.5.1.6 纙J 6胃擋戍胃]肄 DB2_DJ_COMM + 5.5.1.7 纙J 7胃擔再齗 + 5.5.1.8 擋戍胃纙J 8胃]肄 CONNECTSTRING 再齗醳 + 5.5.1.9 纙J 9胃擔媥蛈稗杯 + 5.5.1.10 纙J 10胃擔式烈蘞浀’妞砯W + 5.5.2 肄 Sybase 戠俄贄 o 5.6 媥 ODBC 酨灥 Microsoft SQL Server 僬 (s柱躒) + 5.6.1 s柱 Microsoft SQL Server 僬待皖幏再齗 + 5.6.1.1 纙J 1胃]肄 (譧 AIX) + 5.6.1.2 纙J 2胃鸉 Shell Script (譧 AIX) + 5.6.1.3 纙J 3胃擋戍胃]肄 DB2_DJ_COMM + 5.6.1.4 纙J 4胃薿s媥 DB2 (譧 AIX) + 5.6.1.5 纙J 5胃擔鴉柳 + 5.6.1.6 纙J 6胃擔再齗 + 5.6.1.7 纙J 7胃擔媥蛈稗杯 + 5.6.1.8 纙J 8胃擔式烈蘞浀’妞砯W + 5.6.1.9 纙J 9胃擋戍胃隳 ODBC 鷲 + 5.6.2 泥 Microsoft SQL Server 戠俄贄 ------------------------------------------------------------------------ 扯z * Administration Guide: Planning (潲珫次) o 6.1 Chapter 8. Physical Database Design + 6.1.1 Partitioning Keys o 6.2 Designing Nodegroups o 6.3 Chapter 9. Designing Distributed Databases + 6.3.1 Updating Multiple Databases o 6.4 Chapter 13. High Availability in the Windows NT Environment + 6.4.1 Need to Reboot the Machine Before Running DB2MSCS Utility o 6.5 Chapter 14. DB2 and High Availability on Sun Cluster 2.2 o 6.6 Veritas Support on Solaris o 6.7 Appendix B. Naming Rules + 6.7.1 Notes on Greater Than 8-Character User IDs and Schema Names + 6.7.2 User IDs and Passwords o 6.8 Appendix D. Incompatibilities Between Releases + 6.8.1 Windows NT DLFS Incompatible with Norton's Utilities + 6.8.2 SET CONSTRAINTS Replaced by SET INTEGRITY o 6.9 Appendix E. National Language Support + 6.9.1 National Language Versions of DB2 Version 7 + 6.9.1.1 Control Center and Documentation Filesets + 6.9.2 Locale Setting for the DB2 Administration Server + 6.9.3 DB2 UDB Supports the Baltic Rim Code Page (MS-1257) on Windows Platforms + 6.9.4 Deriving Code Page Values + 6.9.5 Country Code and Code Page Support + 6.9.6 Character Sets * Administration Guide: Implementation(潲珫次) o 7.1 Adding or Extending DMS Containers (New Process) o 7.2 Chapter 1. Administering DB2 using GUI Tools o 7.3 Chapter 3. Creating a Database + 7.3.1 Creating a Table Space + 7.3.1.1 Using Raw I/O on Linux + 7.3.2 Creating a Sequence + 7.3.3 Comparing IDENTITY Columns and Sequences + 7.3.4 Creating an Index, Index Extension, or an Index Specification o 7.4 Chapter 4. Altering a Database + 7.4.1 Adding a Container to an SMS Table Space on a Partition + 7.4.2 Altering an Identity Column + 7.4.3 Altering a Sequence + 7.4.4 Dropping a Sequence + 7.4.5 Switching the State of a Table Space + 7.4.6 Modifying Containers in a DMS Table Space o 7.5 Chapter 5. Controlling Database Access + 7.5.1 Sequence Privileges + 7.5.2 Data Encryption o 7.6 Chapter 8. Recovering a Database + 7.6.1 How to Use Suspended I/O + 7.6.2 Incremental Backup and Recovery + 7.6.2.1 Restoring from Incremental Backup Images + 7.6.3 Parallel Recovery + 7.6.4 Backing Up to Named Pipes + 7.6.5 Backup from Split Image + 7.6.6 On Demand Log Archive + 7.6.7 Log Mirroring + 7.6.8 Cross Platform Backup and Restore Support on Sun Solaris and HP + 7.6.9 DB2 Data Links Manager Considerations/Backup Utility Considerations + 7.6.10 DB2 Data Links Manager Considerations/Restore and Rollforward Utility Considerations + 7.6.11 Restoring Databases from an Offline Backup without Rolling Forward + 7.6.12 Restoring Databases and Table Spaces, and Rolling Forward to the End of the Logs + 7.6.13 DB2 Data Links Manager and Recovery Interactions + 7.6.14 Detection of Situations that Require Reconciliation o 7.7 Appendix C. User Exit for Database Recovery o 7.8 Appendix D. Issuing Commands to Multiple Database Partition Servers o 7.9 Appendix I. High Speed Inter-node Communications + 7.9.1 Enabling DB2 to Run Using VI * Administration Guide: Performance (潲珫次) o 8.1 Chapter 3. Application Considerations + 8.1.1 Specifying the Isolation Level + 8.1.2 Adjusting the Optimization Class + 8.1.3 Dynamic Compound Statements o 8.2 Chapter 4. Environmental Considerations + 8.2.1 Using Larger Index Keys o 8.3 Chapter 5. System Catalog Statistics + 8.3.1 Collecting and Using Distribution Statistics + 8.3.2 Rules for Updating Catalog Statistics + 8.3.3 Sub-element Statistics o 8.4 Chapter 6. Understanding the SQL Compiler + 8.4.1 Replicated Summary Tables + 8.4.2 Data Access Concepts and Optimization o 8.5 Chapter 8. Operational Performance + 8.5.1 Managing the Database Buffer Pool + 8.5.2 Managing Multiple Database Buffer Pools o 8.6 Chapter 9. Using the Governor o 8.7 Chapter 13. Configuring DB2 + 8.7.1 Sort Heap Size (sortheap) + 8.7.2 Sort Heap Threshold (sheapthres) + 8.7.3 Maximum Percent of Lock List Before Escalation (maxlocks) + 8.7.4 Configuring DB2/DB2 Data Links Manager/Data Links Access Token Expiry Interval (dl_expint) + 8.7.5 MIN_DEC_DIV_3 Database Configuration Parameter + 8.7.6 Application Control Heap Size (app_ctl_heap_sz) + 8.7.7 Database System Monitor Heap Size (mon_heap_sz) + 8.7.8 Maximum Number of Active Applications (maxappls) + 8.7.9 Recovery Range and Soft Checkpoint Interval (softmax) + 8.7.10 Track Modified Pages Enable (trackmod) + 8.7.11 Change the Database Log Path (newlogpath) + 8.7.12 Location of Log Files (logpath) + 8.7.13 Maximum Storage for Lock List (locklist) o 8.8 Appendix A. DB2 Registry and Environment Variables + 8.8.1 Table of New and Changed Registry Variables o 8.9 Appendix C. SQL Explain Tools * Administering Satellites Guide and Reference(潲珫次) o 9.1 Setting up Version 7.2 DB2 Personal Edition and DB2 Workgroup Edition as Satellites + 9.1.1 Prerequisites + 9.1.1.1 Installation Considerations + 9.1.2 Configuring the Version 7.2 System for Synchronization + 9.1.3 Installing FixPak 2 or Higher on a Version 6 Enterprise Edition System + 9.1.3.1 Upgrading Version 6 DB2 Enterprise Edition for Use as the DB2 Control Server + 9.1.4 Upgrading a Version 6 DB2 Control Center and Satellite Administration Center * Command Reference(潲珫次) o 10.1 db2batch - Benchmark Tool o 10.2 db2cap (new command) + db2cap - CLI/ODBC Static Package Binding Tool o 10.3 db2ckrst (new command) + db2ckrst - Check Incremental Restore Image Sequence o 10.4 db2gncol (new command) + db2gncol - Update Generated Column Values o 10.5 db2inidb - Initialize a Mirrored Database o 10.6 db2look - DB2 Statistics Extraction Tool o 10.7 db2updv7 - Update Database to Version 7 Current Fix Level o 10.8 New Command Line Processor Option (-x, Suppress printing of column headings) o 10.9 True Type Font Requirement for DB2 CLP o 10.10 ADD DATALINKS MANAGER o 10.11 ARCHIVE LOG (new command) + Archive Log o 10.12 BACKUP DATABASE + 10.12.1 Syntax Diagram + 10.12.2 DB2 Data Links Manager Considerations o 10.13 BIND o 10.14 CALL o 10.15 DROP DATALINKS MANAGER (new command) + DROP DATALINKS MANAGER o 10.16 EXPORT o 10.17 GET DATABASE CONFIGURATION o 10.18 GET ROUTINE (new command) + GET ROUTINE o 10.19 GET SNAPSHOT o 10.20 IMPORT o 10.21 LIST HISTORY o 10.22 LOAD o 10.23 PING (new command) + PING o 10.24 PUT ROUTINE (new command) + PUT ROUTINE o 10.25 RECONCILE o 10.26 REORGANIZE TABLE o 10.27 RESTORE DATABASE + 10.27.1 Syntax + 10.27.2 DB2 Data Links Manager Considerations o 10.28 ROLLFORWARD DATABASE o 10.29 Documentation Error in CLP Return Codes * Data Movement Utilities Guide and Reference(潲珫次) o 11.1 Chapter 2. Import + 11.1.1 Using Import with Buffered Inserts o 11.2 Chapter 3. Load + 11.2.1 Pending States After a Load Operation + 11.2.2 Load Restrictions and Limitations + 11.2.3 totalfreespace File Type Modifier o 11.3 Chapter 4. AutoLoader + 11.3.1 rexecd Required to Run Autoloader When Authentication Set to YES * Replication 峪烈囓楯銳 o 12.1 纋柞瓬唏 IBM 再齗 o 12.2 彀 Windows 2000 柼戍纋柞 o 12.3 暖酨 SQL 戍洄何砷 o 12.4 DB2 @ o 12.5 Web 柼戍 Data Difference Utility o 12.6 3 纋柞髕削 + 12.6.1 纋柞髕 o 12.7 5 纋柞W + 12.7.1 式瓬托巰投 + 12.7.2 DATALINK 纋柞 + 12.7.3 LOB 貙 + 12.7.4 W李磟g o 12.8 6 ]肄纋柞 + 12.8.1 廈B鶔s (Update-anywhere) 樺讘麩 + 12.8.2 ]肄纋柞 o 12.9 8 齶ガ顣跛 o 12.10 9 AS/400 戍跌灥獛搨碉矧擋獛搨 o 12.11 10 OS/390 戍跌灥獛搨碉矧擋獛搨 + 12.11.1 DB2 DataPropagator for OS/390 戍樺讘麩 + 12.11.2 OS/390 柼戍 UNICODE 碉 ASCII 哀俄妄 + 12.11.2.1 哀俄妄 + 12.11.2.2 ]肄哀俄妄 o 12.12 11 UNIX 樹鬧戍跌灥獛搨碉矧擋獛搨 + 12.12.1 彀 UNIX 碉 Windows 柼]肄赴跌灥獛搨赳碉赴矧擋獛搨赳 戍 o 12.13 14 式膣呃 o 12.14 15 跌灥獛搨碉矧擋獛搨鬞昔 o 12.15 衣到 A. 雚睦擋獛搨洇鼖韥跌灥獛搨碉矧擋獛搨 * System Monitor Guide and Reference(潲珫次) o 13.1 db2ConvMonStream * Troubleshooting Guide(潲珫次) o 14.1 Starting DB2 on Windows 95, Windows 98, and Windows ME When the User Is Not Logged On o 14.2 Chapter 2. Troubleshooting the DB2 Universal Database Server * 彀 64 祅戍樹鬧柼媥 DB2 Universal Database o 15.1 5 歧呃 + 15.1.1 LOCKLIST + 15.1.2 shmsys:shminfo_shmmax o 15.2 6 貙 * XML Extender Administration and Programming(潲珫次) * MQSeries o 17.1 揅壧烈歧呃 DB2 MQSeries Function + 17.1.1 揅壧 MQSeries + 17.1.2 揅壧 MQSeries AMI + 17.1.3 鼖擋 DB2 MQSeries Function o 17.2 MQSeries 鬞皇搨 o 17.3 鬞昔膣呃 o 17.4 MQSeries 閱[ + 17.4.1 貙 + 17.4.2 砷俄 o 17.5 擋妄髕銳 + 17.5.1 劑鬞 + 17.5.2 鷫鬞昔 + 17.5.3 跌灥鬞昔 + 17.5.4 睦擋獛搨睦擋獛搨s鼪 + 17.5.4.1 Request/Reply q埔 + 17.5.4.2 熪闟/繘酀 o 17.6 enable_MQFunctions + enable_MQFunctions o 17.7 disable_MQFunctions + disable_MQFunctions ------------------------------------------------------------------------ 扯z泚爩 * 嚭珫眃 o 18.1 扯z DB2 Server for VSE & VM 再齗柮 o 18.2 Java 1.2 儭嚭珫眃 o 18.3 彀 Windows 鏼~鑶豜U媥蚴u柼祗腦戍赴潲嚪尚赳砷 o 18.4 OS/2 鑶豜U戍 Java 嚭珫眃 o 18.5 彀 Windows 鏼~鑶豜蘞蘧眐矩照洄蘠歈泚鏼戍赴賊緮酨 灥赳砷 o 18.6 愫鑅鶔s鵃灚s鼪 o 18.7 DB2 for OS/390 戍嚭珫眃 o 18.8 OS/390 嚭珫眃澱繐戍儘獛搨 o 18.9 赴擔繾柳赳戍鶔 o 18.10 DB2 嚭珫眃戍序鬙 o 18.11 UNIX 鑶郩夒珫眃戍序鬙 o 18.12 OS/2 養戍 Infopop 齶ガ o 18.13 jdk11_path 歧呃囓戍祗腦 o 18.14 媥蚼uScript 珫眃赳詰赴蘧眐矩赳熪擁戍 Solaris 鑶蚳砷 (SQL10012N) o 18.15 DPREPL.DFT 戍祗腦 o 18.16 鼖韥愫譇嚭珫眃 applet o 18.17 嚭珫眃鄧 Applet 鸉戍哎柼祗腦 o 18.18 彀 Applet 研搨 (Windows 95) 柰鸉嚭珫眃 o 18.19 媥豜j戍泥欒膣刖 * 鬞珫眃 o 19.1 彀 Windows 鏼~鑶豜U戍赴潲嚪尚赳砷 o 19.2 Netscape 洄礤鼖耍彀 Netscape Navigator 珫礤鼖鴉 Web 膣(UNIX 鑶) o 19.3 鼖韥赴鬞珫眃赳戍齶ガ * F o 20.1 彀擔定F]肄趁銬毠洟 o 20.2 MQSeries 茨饎F o 20.3 OLE DB 茨饎F ------------------------------------------------------------------------ Business Intelligence * Business Intelligence 鵏 o 21.1 鑌L繘戍 Business Intelligence 鵏 * 暖珫眃扯z銳 o 22.1 序鬙 o 22.2 ]鑅 Excel 長暖僬 o 22.3 肄霿瓬鸉獛 o 22.4 鋇鴶翷 o 22.5 長 Submit OS/390 JCL 泚鏼泊獛搨 (VWPMVS) 肄霿襏 o 22.6 鶔暖削膃蝔 o 22.7 暖珫眃鬞昔 o 22.8 彀 DB2 OLAP Integration Server 珫擔歧虋枵 o 22.9 醨 Classic Connect 烈暖珫眃f黂媥 o 22.10 暖珫眃蜪呃 o 22.11 媥 Invert 黈獛搨 o 22.12 鄧 DB2 次劑 7 暖鋅z獛搨酨灥 DB2 次劑 5 + 22.12.1 騥 DB2 次劑 5 再齗 + 22.12.2 鶔鋅z獛搨歧呃 + 22.12.2.1 UNIX 暖鋅z獛搨 + 22.12.2.2 Microsoft Windows NT耑Windows 2000 碉 OS/2 暖鋅z獛搨 o 22.13 IBM ERwin 鴶翷灥鋇獛搨 + 22.13.1 洇委 + 22.13.2 n茫臡 + 22.13.3 獛搨 + 22.13.4 擔癸砰躨 + 22.13.5 枵癸砰躨赴暖珫眃赳 + 22.13.6 枵癸砰躨赴鬞悚到扯z獛搨赳 + 22.13.7 序鬙 + 22.13.8 ERwin 烈 DB2 暖珫眃戍杯 + 22.13.8.1 ERwin 烈鬞悚到扯z獛搨戍杯 o 22.14 肛赴暖珫眃赳戍巰投烈鶐 + 22.14.1 + 22.14.1.1 劑繐臡 + 22.14.1.2 Trillium n鑶豜鷑 + 22.14.1.3 醨赴Trillium 歃鑶蚼v烈赴暖珫眃赳f黂 媥 + 22.14.1.4 枵 Trillium 鴶翷 + 22.14.1.5 杯鴶翷 + 22.14.1.6 貙 + 22.14.2 紂柞 Trillium 歃鑶 JCL + 22.14.3 彀 UNIX 碉 Windows 柼紂柞 Trillium 歃鑶 Script + 22.14.4 肄霿 Trillium 歃鑶釱BJ + 22.14.5 媥蚼uTrillium 歃鑶蚼v媥蛈瑏w霿獛搨 + 22.14.6 砷Bz鎈搨 + 22.14.6.1 砷廌剽俄 + 22.14.6.2 矩 o 22.15 MQ Series 烈赴暖珫眃赳戍鬷幏 + 22.15.1 擔 MQSeries 鬞昔戍蘞浀 + 22.15.1.1 劑繐臡 + 22.15.1.2 貙 + 22.15.1.3 擔 MQSeries 鬞昔戍蘞浀 + 22.15.2 枵 MQSeries 鬞昔碉 XML 鴶翷 + 22.15.2.1 劑繐臡 + 22.15.2.2 貙 + 22.15.2.3 枵 MQSeries 鬞昔烈 XML 鴶翷 + 22.15.2.4 媥 MQSeries 媥蛈瑏w霿獛搨 + 22.15.2.5 砷廌剽俄 + 22.15.2.6 砷矩 o 22.16 Microsoft OLE DB 烈赴蘧狾A髕赳儭 + 22.16.1 擔 OLE DB 式戍蘞浀 + 22.16.2 擔 DTS 霄戍蘞浀 o 22.17 柱皪 COMMIT f黂 replace 媥 o 22.18 祅麩鷲巰 o 22.19 AIX 瓬 Solaris 鏼~蓔W Sybase 僬垢艛n戍 OPEN CLIENT o 22.20 削蜪n到鶔儘 o 22.21 3 ]肄暖僬 + 22.21.1 杯 Microsoft Access 珫戍鶗到暖僬 o 22.22 10 @暖定 + 22.22.1 膣式 DB2 UDB RUNSTATS 獛搨戍纙J歃ю悚 o 22.23 w]暖嚭定 o 22.24 暖嚭定扯z甇 o 22.25 鶔鏼擋珫暖嚭定 o 22.26 擔碉鱌絛]肄暖嚭定 o 22.27 擔次劑戍 SQL 纙J o 22.28 彀赴獛研悚赳甇珫耍鶔僬姜袛癸 o 22.29 s柱祗腦赴暖珫眃赳旨麩 o 22.30 鸉赴削蓔妝e赳 o 22.31 哀 Create DDL SQL 闉z搨 o 22.32 騥 Visual Warehouse 鸆~照 o 22.33 擔癸式瓬遭繐 o 22.34 媥 Merant ODBC X韥獛搨 o 22.35 s ODBC X韥獛搨 o 22.36 肄霿 OS/2 定珫戍暖僬姜袛癸 o 22.37 忌趜暖嚭定戍扛你 o 22.38 媥 SQL 茨饎獛搨烈 TBC_MD 削裱定 o 22.39 媥 FormatDate o 22.40 鶔砰躨]肄 o 22.41 媥蚼u擁襏式赳黈獛搨 o 22.42 @定s鼪 o 22.43 ]肄茗抑赴暖珫眃赳雚膼 o 22.44 肄霿 DB2 for VM 暖僬 o 22.45 肄霿 DB2 for VM 詰 DB2 for VSE 癸式 o 22.46 鼖擋嗀肄襶戍ル顢戠儭 o 22.47 Data Joiner 砷鋇s膣齶ガ o 22.48 暖珫眃]肄碉鸉纋柞 o 22.49 序鬙鍻Z o 22.50 酨灥僬姜M癸 o 22.51 儭戍唏 IBM 定僬咻杖s柱醳 o 22.52 彀暖珫眃珫韥擔僬 o 22.53 媥 Common Warehouse Metadata Interchange (CWMI) 枵瓬 鋇鴶翷 + 22.53.1 媽祊 + 22.53.2 枵鴶翷 + 22.53.3 彀鸉枵洢擋獛搨祌鶔s鴶翷 + 22.53.4 鋇鴶翷 o 22.54 OS/390 Runstats 洢擋獛搨纙J o 22.55 OS/390 枵洢擋獛搨纙J o 22.56 Common Warehouse Metamodel (CWM) XML 儭 o 22.57 Bz研悚擁齗 o 22.58 找研悚擁齗 o 22.59 澱繐枵 o 22.60 赴暖珫眃赳熪妮鬧閭鎣閱 o 22.61 媴尳纙J鬞 * Data Warehouse Center Application Integration Guide(潲珫次) o 23.1 Additional metadata templates + 23.1.1 Commit.tag + 23.1.1.1 Tokens + 23.1.1.2 Examples of values + 23.1.2 ForeignKey.tag + 23.1.2.1 Tokens + 23.1.2.2 Examples of values + 23.1.3 ForeignKeyAdditional.tag + 23.1.3.1 Tokens + 23.1.3.2 Examples of values + 23.1.4 PrimaryKey.tag + 23.1.4.1 Tokens + 23.1.4.2 Examples of values + 23.1.5 PrimaryKeyAdditional.tag + 23.1.5.1 Tokens + 23.1.5.2 Examples of values * 暖珫眃哎柼祗腦 o 24.1 肄霿纋柞戍式詰蘞浀 o 24.2 鸉爩嗀 AS/400 鋅z獛搨戍 Essbase VWPs o 24.3 媥豜挖G暖珫眃鴶翷甇瓬洄膣幏戍洇委甇 o 24.4 鴉鉞 o 24.5 纋柞翭韄劑 o 24.6 枵癸砰躨 o 24.7 s柱戍膣 o 24.8 枵式 o 24.9 RUNSTATS 碉 REORGANIZE TABLE 哎柼祗腦鐖幏 o 24.10 赴q何赳贄貘耍赴暖洇委赳烈赴獛赳翭韄劑 o 24.11 赴鋅z獛搨抑赳翭韄劑戍鋅z獛搨研 * DB2 OLAP Starter Kit o 25.1 OLAP Server 霠 o 25.2 儭戍鏼~鑶蛈A髕獛搨瞉 o 25.3 蘠歈 DB2 OLAP Starter Kit 彀 UNIX 柼戍揅壧 o 25.4 歧呃 OLAP Starter Kit 戍 ODBC + 25.4.1 彀 UNIX 鑶蛌[呃僬 + 25.4.1.1 歧呃 ODBC + 25.4.1.2 哀 odbc.ini + 25.4.1.3 s柱僬持 odbc.ini + 25.4.1.4 ODBC 戍 DB2 ]肄襏削 + 25.4.1.5 ODBC 戍 Oracle ]肄襏削 + 25.4.2 彀 UNIX 鑶豜W歧呃 OLAP 鴶翷悚到 + 25.4.3 彀 Windows 鑶豜W歧呃僬 + 25.4.4 彀 Windows 鑶豜W歧呃 OLAP 鴶翷悚到 + 25.4.5 彀鞮歧呃僬峙鶖 o 25.5 雚 OLAP Starter Kit 柼扯z獛搨熡枵 + 25.5.1 Starter Kit 熡枵削 o 25.6 椻擔碉歧呃 OLAP Starter Kit 戍削裱定 o 25.7 騥睦擋獛搨 OLAP Starter Kit 次劑 7.2 o 25.8 洄何齶ガ烈貙 o 25.9 OLAP 灚式柱褵鐖 EQD 噬 * 鬞悚到扯z獛搨扯z銳 o 26.1 鬞悚到扯z獛搨鱌絛]肄洢擋獛搨 + 26.1.1 + 26.1.2 次v齶ガ + 26.1.3 揅壧齶ガ o 26.2 鄧 DB2 次劑 7 鬞悚到扯z獛搨酨灥 DB2 次劑 5 鬞悚到 o 26.3 ]鑅鬞悚到 o 26.4 烈擂恙黈鴶翷 o 26.5 媥 flgnxoln 銻黈鴶翷 o 26.6 媥 MDISDGC 銻黈鴶翷 o 26.7 碰駒獛搨 * Information Catalog Manager Programming Guide and Reference(潲珫次) o 27.1 Information Catalog Manager Reason Codes * 鬞悚到扯z獛搨媥豜銳 * 鬞悚到扯z獛搨胃哎柼鬞昔 o 29.1 鬞昔 FLG0260E o 29.2 鬞昔 FLG0051E o 29.3 鬞昔 FLG0003E o 29.4 鬞昔 FLG0372E o 29.5 鬞昔 FLG0615E * 鬞悚到扯z獛搨胃哎柼祗腦 o 30.1 Web 鬞悚到扯z獛搨 * DB2 Warehouse Manager 揅壧銳 o 31.1 暖黈獛搨戍n茫臡 o 31.2 SAP R/3 Connector + 31.2.1 揅壧樺讘麩 o 31.3 Web Connector + 31.3.1 揅壧樺讘麩 * Query Patroller Administration Guide(潲珫次) o 32.1 DB2 Query Patroller Client is a Separate Component o 32.2 Migrating from Version 6 of DB2 Query Patroller Using dqpmigrate o 32.3 Enabling Query Management o 32.4 Location of Table Space for Control Tables o 32.5 New Parameters for dqpstart Command o 32.6 New Parameter for iwm_cmd Command o 32.7 New Registry Variable: DQP_RECOVERY_INTERVAL o 32.8 Starting Query Administrator o 32.9 User Administration o 32.10 Creating a Job Queue o 32.11 Using the Command Line Interface o 32.12 Query Enabler Notes o 32.13 DB2 Query Patroller Tracker may Return a Blank Column Page o 32.14 Query Patroller and Replication Tools o 32.15 Appendix B. Troubleshooting DB2 Query Patroller Clients ------------------------------------------------------------------------ 睦擋獛搨礤熪 * Administrative API Reference (潲珫次) o 33.1 db2ArchiveLog (new API) + db2ArchiveLog o 33.2 db2ConvMonStream o 33.3 db2DatabasePing (new API) + db2DatabasePing - Ping Database o 33.4 db2HistData o 33.5 db2HistoryOpenScan o 33.6 db2XaGetInfo (new API) + db2XaGetInfo - Get Information for Resource Manager o 33.7 db2XaListIndTrans (new API that supercedes sqlxphqr) + db2XaListIndTrans - List Indoubt Transactions o 33.8 db2GetSnapshot - Get Snapshot o 33.9 Forget Log Record o 33.10 sqlaintp - Get Error Message o 33.11 sqlbctcq - Close Tablespace Container Query o 33.12 sqlubkp - Backup Database o 33.13 sqlureot - Reorganize Table o 33.14 sqlurestore - Restore Database o 33.15 Documentation Error Regarding AIX Extended Shared Memory Support (EXTSHM) o 33.16 SQLFUPD + 33.16.1 locklist o 33.17 SQLEDBDESC o 33.18 SQLFUPD Documentation Error * 睦擋獛搨礤熪銳 o 34.1 1 媽祊 + 34.1.1 儭n + 34.1.2 削蜪{搨 o 34.2 3 礤熪 DB2 睦擋獛搨戍柜鬞 + 34.2.1 礤熪耑make 碉砷照泥戍洢擋獛搨 o 34.3 4 礤熪 Java Applets 碉睦擋獛搨 + 34.3.1 ]肄 + 34.3.1.1 OS/2 柼戍 JDK 柳歃 + 34.3.1.2 HP-UX 柼戍 Java2 o 34.4 5 礤熪 SQL 獛 + 34.4.1 ]肄 SQL 獛 + 34.4.2 ]肄哀鏵 + 34.4.3 椻繘哀纁銻 + 34.4.4 奚蟂珫繾 + 34.4.5 樵碉駻鑅 + 34.4.6 擔 SQL 獛 + 34.4.7 碰駒暖酨獛 + 34.4.8 牁鷫洄哀籉 SQL 獛 o 34.5 7 礤熪 HP-UX 睦擋獛搨 + 34.5.1 HP-UX C + 34.5.2 HP-UX C++ o 34.6 9 礤熪 OS/2 睦擋獛搨 + 34.6.1 VisualAge C++ for OS/2 次劑 4.0 o 34.7 10 礤熪 PTX 睦擋獛搨 + 34.7.1 ptx/C++ o 34.8 12 礤熪 Solaris 睦擋獛搨 + 34.8.1 SPARCompiler C++ o 34.9 13 鑅 Windows 32 祅鏼~鑶蛈孚擋獛搨 + 34.9.1 VisualAge C++ 次劑 4.0 * Application Development Guide(潲珫次) o 35.1 Chapter 2. Coding a DB2 Application + 35.1.1 Activating the IBM DB2 Universal Database Project and Tool Add-ins for Microsoft Visual C++ o 35.2 Chapter 6. Common DB2 Application Techniques + 35.2.1 Generating Sequential Values + 35.2.1.1 Controlling Sequence Behavior + 35.2.1.2 Improving Performance with Sequence Objects + 35.2.1.3 Comparing Sequence Objects and Identity Columns o 35.3 Chapter 7. Stored Procedures + 35.3.1 DECIMAL Type Fails in Linux Java Routines + 35.3.2 Using Cursors in Recursive Stored Procedures + 35.3.3 Writing OLE Automation Stored Procedures o 35.4 Chapter 12. Working with Complex Objects: User-Defined Structured Types + 35.4.1 Inserting Structured Type Attributes Into Columns o 35.5 Chapter 13. Using Large Objects (LOBs) + 35.5.1 Large object (LOBs) support in federated database systems + 35.5.1.1 How DB2 retrieves LOBs + 35.5.1.2 How applications can use LOB locators + 35.5.1.3 Restrictions on LOBs + 35.5.1.4 Mappings between LOB and non-LOB data types + 35.5.2 Tuning the system o 35.6 Part 5. DB2 Programming Considerations + 35.6.1 IBM DB2 OLE DB Provider o 35.7 Chapter 20. Programming in C and C++ + 35.7.1 C/C++ Types for Stored Procedures, Functions, and Methods o 35.8 Chapter 21. Programming in Java + 35.8.1 Java Method Signature in PARAMETER STYLE JAVA Procedures and Functions + 35.8.2 Connecting to the JDBC Applet Server o 35.9 Appendix B. Sample Programs * CLI Guide and Reference(潲珫次) o 36.1 Binding Database Utilities Using the Run-Time Client o 36.2 Using Static SQL in CLI Applications o 36.3 Limitations of JDBC/ODBC/CLI Static Profiling o 36.4 ADT Transforms o 36.5 Chapter 3. Using Advanced Features + 36.5.1 Writing Multi-Threaded Applications + 36.5.2 Scrollable Cursors + 36.5.2.1 Server-side Scrollable Cursor Support for OS/390 + 36.5.3 Using Compound SQL + 36.5.4 Using Stored Procedures + 36.5.4.1 Writing a Stored Procedure in CLI + 36.5.4.2 CLI Stored Procedures and Autobinding o 36.6 Chapter 4. Configuring CLI/ODBC and Running Sample Applications + 36.6.1 Configuration Keywords o 36.7 Chapter 5. DB2 CLI Functions + 36.7.1 SQLBindFileToParam - Bind LOB File Reference to LOB Parameter + 36.7.2 SQLNextResult - Associate Next Result Set with Another Statement Handle + 36.7.2.1 Purpose + 36.7.2.2 Syntax + 36.7.2.3 Function Arguments + 36.7.2.4 Usage + 36.7.2.5 Return Codes + 36.7.2.6 Diagnostics + 36.7.2.7 Restrictions + 36.7.2.8 References o 36.8 Appendix D. Extended Scalar Functions + 36.8.1 Date and Time Functions o 36.9 Appendix K. Using the DB2 CLI/ODBC/JDBC Trace Facility * 鬞昔囓楯銳 o 37.1 灥隳鬞昔烈 SQLSTATE 祗腦 o 37.2 彀 DB2 Connect 鶔戍 SQLCODE 薿s杯 o 37.3 s戍烈鶔戍鬞昔 + 37.3.1 碰駒柳歃祊貘 (CLI) 鬞昔 + 37.3.2 DB2 鬞昔 + 37.3.3 DBI 鬞昔 + 37.3.4 暖珫眃 (DWC) 鬞昔 + 37.3.5 SQL 鬞昔 o 37.4 鶔儘 SQLSTATES * SQL Reference(潲珫次) o 38.1 SQL Reference is Provided in One PDF File o 38.2 Chapter 3. Language Elements + 38.2.1 Naming Conventions and Implicit Object Name Qualifications + 38.2.2 DATALINK Assignments + 38.2.3 Expressions + 38.2.3.1 Syntax Diagram + 38.2.3.2 OLAP Functions + 38.2.3.3 Sequence Reference o 38.3 Chapter 4. Functions + 38.3.1 Enabling the New Functions and Procedures + 38.3.2 Scalar Functions + 38.3.2.1 ABS or ABSVAL + 38.3.2.2 DECRYPT_BIN and DECRYPT_CHAR + 38.3.2.3 ENCRYPT + 38.3.2.4 GETHINT + 38.3.2.5 IDENTITY_VAL_LOCAL + 38.3.2.6 LCASE and UCASE (Unicode) + 38.3.2.7 MQPUBLISH + 38.3.2.8 MQREAD + 38.3.2.9 MQRECEIVE + 38.3.2.10 MQSEND + 38.3.2.11 MQSUBSCRIBE + 38.3.2.12 MQUNSUBSCRIBE + 38.3.2.13 MULTIPLY_ALT + 38.3.2.14 REC2XML + 38.3.2.15 ROUND + 38.3.2.16 WEEK_ISO + 38.3.3 Table Functions + 38.3.3.1 MQREADALL + 38.3.3.2 MQRECEIVEALL + 38.3.4 Procedures + 38.3.4.1 GET_ROUTINE_SAR + 38.3.4.2 PUT_ROUTINE_SAR o 38.4 Chapter 5. Queries + 38.4.1 select-statement/syntax diagram + 38.4.2 select-statement/fetch-first-clause o 38.5 Chapter 6. SQL Statements + 38.5.1 Update of the Partitioning Key Now Supported + 38.5.1.1 Statement: ALTER TABLE + 38.5.1.2 Statement: CREATE TABLE + 38.5.1.3 Statement: DECLARE GLOBAL TEMPORARY TABLE PARTITIONING KEY (column-name,...) + 38.5.1.4 Statement: UPDATE + 38.5.2 Larger Index Keys for Unicode Databases + 38.5.2.1 ALTER TABLE + 38.5.2.2 CREATE INDEX + 38.5.2.3 CREATE TABLE + 38.5.3 ALTER SEQUENCE + ALTER SEQUENCE + 38.5.4 ALTER TABLE + 38.5.5 Compound SQL (Embedded) + 38.5.6 Compound Statement (Dynamic) + Compound Statement (Dynamic) + 38.5.7 CREATE FUNCTION (Source or Template) + 38.5.8 CREATE FUNCTION (SQL Scalar, Table or Row) + 38.5.9 CREATE METHOD + CREATE METHOD + 38.5.10 CREATE SEQUENCE + CREATE SEQUENCE + 38.5.11 CREATE TRIGGER + CREATE TRIGGER + 38.5.12 CREATE WRAPPER + 38.5.13 DECLARE CURSOR + 38.5.14 DELETE + 38.5.15 DROP + 38.5.16 GRANT (Sequence Privileges) + GRANT (Sequence Privileges) + 38.5.17 INSERT + 38.5.18 SELECT INTO + 38.5.19 SET ENCRYPTION PASSWORD + SET ENCRYPTION PASSWORD + 38.5.20 SET transition-variable + SET Variable + 38.5.21 UPDATE o 38.6 Chapter 7. SQL Procedures now called Chapter 7. SQL Control Statements + 38.6.1 SQL Procedure Statement + SQL Procedure Statement + 38.6.2 FOR + FOR + 38.6.3 Compound Statement changes to Compound Statement (Procedure) + 38.6.4 RETURN + RETURN + 38.6.5 SIGNAL + SIGNAL o 38.7 Appendix A. SQL Limits o 38.8 Appendix D. Catalog Views + 38.8.1 SYSCAT.SEQUENCES * IBM DB2 暖酨獛鑅齗 o 39.1 Java 1.2 儭暖酨獛鑅齗 o 39.2 DB2 暖酨獛戍茗抑 o 39.3 彀 Windows耑OS/2 詰 UNIX 樹鬧柼礤熪 SQL 獛 o 39.4 彀 Solaris 樹鬧媥 DB2 暖酨獛鑅齗 o 39.5 洄何齶ガ烈貙 o 39.6 彀甥珫砰躨蓔U媥 DB2 暖酨獛鑅齗 o 39.7 UNIX (AIX耑Sun Solaris耑Linux) 揅壧烈暖酨獛鑅齗 o 39.8 鑅 OS/390 戍 SQL 暖酨獛 o 39.9 SQL 暖酨獛 o 39.10 鋇 Java 暖酨獛 o 39.11 彀 OS/390 柼麰枵暖酨獛 o 39.12 彀泚鏼霠再齗珫]肄 SQL 暖酨獛戍鑅醳 o 39.13 椻韥駻s OS/390 柼暖酨獛鑅戍 WLM 鶐繾 o 39.14 彀 OS/390 礤熪 Java 暖酨獛 o 39.15 長 MQ Series 烈 OLE DB 鑅 DB2 式媥蛈瑏w霿閱 (UDF) * Unicode 鶔s o 40.1 媽祊 + 40.1.1 DB2 Unicode 定瓬睦擋獛搨 + 40.1.2 麩鶔s o 40.2 SQL Reference(潲珫次) + 40.2.1 Chapter 3 Language Elements + 40.2.1.1 Promotion of Data Types + 40.2.1.2 Casting Between Data Types + 40.2.1.3 Assignments and Comparisons + 40.2.1.4 Rules for Result Data Types + 40.2.1.5 Rules for String Conversions + 40.2.1.6 Expressions + 40.2.1.7 Predicates + 40.2.2 Chapter 4 Functions + 40.2.2.1 Scalar Functions o 40.3 CLI Guide and Reference(潲珫次) + 40.3.1 Chapter 3. Using Advanced Features + 40.3.1.1 Writing a DB2 CLI Unicode Application + 40.3.2 Appendix C. DB2 CLI and ODBC + 40.3.2.1 ODBC Unicode Applications o 40.4 Data Movement Utilities Guide and Reference(潲珫次) + 40.4.1 Appendix C. Export/Import/Load Utility File Formats ------------------------------------------------------------------------ s鼪遭q鑶 * s鼪裱銬 o 41.1 彀 VM 蓔U揅壧睦擋獛搨再齗 o 41.2 CLI/ODBC/JDBC 歧呃 PATCH1 碉 PATCH2 ]肄襏 ------------------------------------------------------------------------ 柜鬞 * 柜鬞 o 42.1 DB2 Universal Database Business Intelligence t o 42.2 DB2 Everywhere 洄長 DB2 Everyplace o 42.3 悖薋D o 42.4 灚嵅q DB2 Run-time Client s膣癚赴s膣赳砷 o 42.5 Search 厴豯 (Search Discovery) o 42.6 HP-UX 11 戍韄鯬甇 o 42.7 dlfm client_conf 噬媥蛈瘐蘧秝@ o 42.8 戍麩胃盎鎈鏮獛搨彀 dlfm 欘鑭嗀欘 o 42.9 鬙揅壧 DB2 DFS 雚膼虀裲祔{搨 o 42.10 Windows NT 雚膼蠮蟴ъ o 42.11 彀擔氡獛 AutoLoader 養|♂ o 42.12 DATALINK 駻鑅 o 42.13 Windows NT (CS/NT) 戍 IBM Communications 再齗肄霿媥蛈 ID 碉q俄 + 42.13.1 躒貂肄霿 o 42.14 皖幏鑶蛈攻蹠 o 42.15 DataJoiner 貙 o 42.16 Windows NT 戍鏶閞鬞悚到扯z獛搨 o 42.17 Microsoft SNA Server 碉 SNA 愫霠鶔s (藶沮俊肄) 儭 o 42.18 鼖韥 Windows 祌潲妄鼖韥 DB2 戍 SNA SPM o 42.19 DB2 扯z再齗戍砰躨裼]肄 o 42.20 嚪尚潲 o 42.21 Windows NT 瓬 Windows 2000 柼戍 DB2 再髕鎟茫臡 o 42.22 彀次劑 6 珫擔戍 Query Patroller 媥蛈瑔蝨h柅 EXECUTE 鄾擋 v o 42.23 Query Patroller 貙 o 42.24 茫繐俊肄詻嗀|彀暖珫眃(DWC)珫媥蛈杜媥蛈瑏w霿獛搨 o 42.25 暖珫眃祺銻鋇戍s醳 o 42.26 Backup Services APIs (XBSA) o 42.27 OS/390 鋅z獛搨 + 42.27.1 揅壧[ + 42.27.2 揅壧腦 + 42.27.3 ]鑅オ鴉戍鋅z獛搨 + 42.27.4 擋熪獛搨獛暖纙J (XTClient) + 42.27.5 黈獛搨 + 42.27.6 酨灥 DB2 鑶媴祌鴉戍定 + 42.27.7 鸉 DB2 for OS/390 洢擋獛搨 + 42.27.8 纋柞 + 42.27.9 鋅z獛搨韄 o 42.28 Windows NT 柼戍雚膼鬻薏灥 o 42.29 Enterprise Edition UNIX CD-ROM 戍灚擋恙 o 42.30 DB2 Connect Enterprise Edition UNIX CD-ROM 戍灚擋恙 o 42.31 鵛鞥 Data Links Manager o 42.32 媥 SMIT 鬙揅壧 DLFM 祅麩養|颳オ鴉戍鐖 o 42.33 彀 Windows 2000 柼媥 CLP 熪擁砷 SQL1035N o 42.34 SQL 茨饎獛搨戍閭鎣閱 o 42.35 Linux 柼戍 DB2 戍 Gnome 碉 KDE 貘鬷幏 o 42.36 彀 Windows 2000 Terminal Server 扯z研搨柰鸉 DB2 o 42.37 樵烈駻鑅銻戍哎柼祗腦 o 42.38 "Warehouse Manager" 睦長 "DB2 Warehouse Manager" ------------------------------------------------------------------------ 衣閭鬞 * 衣閭鬞 o 43.1 DB2 Universal Database 碉 DB2 Connect 哎柼儭 o 43.2 DB2 Magazine ------------------------------------------------------------------------ 衣到 * 衣到 A. 圳N醳 o A.1 鸆癸 ------------------------------------------------------------------------ w媥 DB2 Universal Database 次劑 7背 : ]肄戠悚長櫯鄧堉照赴次歃圳N醳赳耶 DB2 Universal Database 烈 DB2 Connect 儭霠|肄齔鶔s耶 巷灛胃 http://www.ibm.com/software/data/db2/udb/winos2unix/support耍鄧灥隳稒s戍 鬞耶 劑霄鰗柰媴戍恙鬞胚彀 DB2 戍銳尳盎耍腮潲妄灥隳o倌鬖材鬞胃 IBM DB2 Universal Database Personal Edition耍次劑 7.2 IBM DB2 Universal Database Workgroup Edition耍次劑 7.2 IBM DB2 Universal Database Enterprise Edition耍次劑 7.2 IBM DB2 Data Links Manager耍次劑 7.2 IBM DB2 Universal Database Enterprise - Extended Edition耍次劑 7.2 IBM DB2 Query Patroller耍次劑 7.2 IBM DB2 Personal Developer's Edition耍次劑 7.2 IBM DB2 Universal Developer's Edition耍次劑 7.2 IBM DB2 Data Warehouse Manager耍次劑 7.2 IBM DB2 Relational Connect耍次劑 7.2 駙嗀柜譇赴次歃圳N醳赳長 READCON.TXT耍 o譇虪柰媴恙戍鬞胃 IBM DB2 Connect Personal Edition耍次劑 7.2 IBM DB2 Connect Enterprise Edition耍次劑 7.2 赴s蕶詫祊悜v柜岩珫霄鰗倌鬖 DB2 次劑 7.2 遭繐柱閭戍[耶礔鞮鑭嗀赴s蕶 詫祊悜v戍次劑 7.2耍 巷 http://www.ibm.com/software/data/db2/udb/winos2unix/support 照詰柰耶 : 彀贄貘齒欓戍繘媴 (|) 板式欑椻赴次劑圳N醳赳柜次祌彀殛柳歃 珫嗀Qs柱詰耶 ------------------------------------------------------------------------ 蕶顢茫何 ------------------------------------------------------------------------ 蕶顢茫何 ------------------------------------------------------------------------ 1.1 DB2 UDB 次劑 7 戍酨灥蕶詫 DB2 UDB 鑶媴恙霄服柅柜徾韥堉柤毖委媥蛈抆S詫耶o蕶詫板胃 * 腺枵碉矧戍俠蕶詫 * 柱鎣洇委ず戍蕶詫 * 謷碉瞉祌醳 * 儭纇N戍虎委詫 * 鏼~鑶蛌磡e戍酨灥蕶詫 * 養酨灥麩祌搨 1.1.1 俠祌枵碉矧 1.1.1.1 俠枵 骷繐媥袢俠堉養鄧鵩鏼 DB2 嚭珫眃耶 閱式醳碉嚭醳虪酨灥耍檛媥 舌養鄧托鼪雚俠鼖韥嚭醳詰灥欣柜閱式醳耶 彀嚭醳詰板閱式洇鋇{戍 酨灥熰嗀載哎耍鄧堉纈謰戍ル耶 1.1.1.2 俠澂貂 彀 UNIX 鏼~鑶豜妣A俠澂貂戍鑅鄧囍埂ず耍ず甇洇欑鱦B腺鏼擋珫耍 媥蛈犌妙|擁洋T耶 1.1.2 堉ず蕶詫 DB2 嚭珫眃嗀柜蕶詫耍養鄧柱鎣媥蛈瘐鐨餼A鄧瓬瑹宙媥蛈稗q媥蛈 柮耶 o柱鎣戍閱儭腦イ鄏杉]肄襏耍鄧瓬長朗皪薷w鷽戍戠悚洇委耶 1.1.2.1 腦イ酮蜙 嚭珫眃祊貘儭墨鏼~鑶袑蜧虪戍腦イ酮蜙郃醳耶 媥蛈瑔i鄧]肄甓鴽カ 碉容鴽カ耍媥歆軝鎣薈戍洃耶 1.1.2.2 戠悚]肄襏 嚭珫眃祊貘秏\媥蛈睚篨\式碉甇洇灥戠戍カ耑毠洟碉戠悚耶 1.1.2.3 潲カ 媥蛈瘐茫繐颳牁カ鄧媥軝恙戍嵧醳閱耶 1.1.3 搨翭i 媥蛈瑔i鄧登謷瞉詰瞉耶 1.1.4 儭纇N戍虎委詫 DB2 嚭珫眃祊貘碉些伸齗睦擋獛搨虎委耍蜙pzL登謷酨灥耶 彀睦擋獛搨研搨 洇耍嚭珫眃祊貘嗀柜蕶詫耍養鄧盞饎般媥蛈碖o些麾餀W戍鬞耶 1.1.5 養酨灥戍麩 DB2 鑶媴恙祌麩長 HTML 搨耶 o養檛媥蛈瑔H鈕檍珫戍摴n]肄鈮趷 麩耶 擂柛委\些伸齗碉擂灨饎纇N戍媥蚼C ------------------------------------------------------------------------ 1.2 衣閭戍澱繐 Solaris 柳歃 柅媴彀DB2 for UNIX t枵銳洇戍獛搨祌鴉耍 蛟媴柅 DB2 Universal Database 次劑 7 for Solaris 次劑 2.6 詻茫繐戍 106285-02 詰鶔s戍 獛搨耶 ------------------------------------------------------------------------ 1.3 Supported CPUs on DB2 Version 7 for Solaris UltraSparc 祌容戍 CPU 次劑虋儭耶 ------------------------------------------------------------------------ 1.4 s柱躒貂牁釬定戍齶ガ 彀s柱躒貂牁釬定耍礔殛定嗀柜譇詰愫譇贄毠洟唏w]襏苗4 KB英戍鑶 蚻啀式繾耍 鞮養|隳砷鬞昔胃 "SQL6073N s柱躒貂鏼~噬韖"碉柜譇 SQLCODE耶|熪擁o餼灉板廅長彀擔躒貂耍骷嗀 IBMDEFAULTBP 咸揧板鄧 4 KB 戍贄毠洟酨彀耶 蜙p耍鞮養鄧媥 db2start 銻耍s柱躒貂容戍牁釬定珫耶 DB2START NODENUM 2 ADDNODE HOSTNAME newhost PORT 2 愩刖牁釬定戍皈式繾祌贄毠洟長w]襏耍膣刖|廌柰媴戍鬞昔胃 SQL6075W 礤絛定扯z獛搨鏼~洄鐀顟蘠歈s柱躒貂耶 殛躒貂繐瞉詻嗀戍躒貂欘耍潒柎嫀鼖韥浂嗀鏼擋耶 椷板耍愩刖牁釬定戍鑶蚻啀式繾祌贄毠洟唏w]襏耍屑廌戍鬞昔板胃 SQL6073N s柱躒貂鏼~噬韖耶SQLCODE = "<-902>" 駙柜譇虎戍削蒤A擋s躒貂祗腦韥鶔s db2nodes.cfg 祌耍 鞮養鄧媥 ADD NODE 銻耶 彀哀欑虋牁釬定 (鑶蚻啀式繾長w]贄貘毠洟) 鸉 ADD NODE 銻祌耍 |廌柰媴鬞昔胃 DB20000I ADD NODE 銻鐀顟蘠歈耶 椷板耍愩刖牁釬定戍鑶蚻啀式繾祌贄毠洟唏w]襏耍屑廌戍鬞昔板胃 SQL6073N s柱躒貂鏼~噬韖耶SQLCODE = "<-902>" 長柅鞻熪擁柼翷戍齶ガ耍巷鸉胃 DB2SET DB2_HIDDENBP=16 彀熪鋇 db2start 詰 ADD NODE 銻祌容耶 殛熡到| DB2 黂鑅 16 贄戍傳 咸揧耍椴臠柜贄詻媥蛈攻譪j洟虋唏w]襏耶 o養 ADD NODE 鏼~鐀顟蘠歈耶 駙柜譇養鞻oю齶ガ熪擁戍妄耍 板 ADD NODE 詰 db2start 銻肄 WITHOUT TABLESPACES 氡魅耶 彀殛祌耍鞮澱鏺顟擋 CREATE BUFFERPOOL 闉z搨鉈擔咸 揧耍 虋遮顟擋 ALTER TABLESPACE 闉z搨醨鑶蚻啀式繾碉咸揧虎皖耶 彀s柱躒貂{酨躒貂顪憍耍礔殛躒貂顪槷柜譇詰愫譇贄毠洟唏w]襏 (4 KB) 戍式繾耍 鞮養|隳砷鬞昔胃"SQL0647N 咸揧 "" 容彀鏼擋珫耶"耶 |熪擁o餼灉板廅長擔彀s躒貂遮贄毠洟唏w]襏戍咸揧虋冀長式繾鼖 韥耶 蜙p耍鞮養鄧媥 ALTER NODEGROUP 闉z搨s柱躒貂躒貂顪摮G DB2START CONNECT TO mpp1 ALTER NODEGROUP ng1 ADD NODE (2) 愩刖躒貂顪槷贄毠洟長w]襏戍式繾耍膣刖|廌柰媴戍鬞昔胃 SQL1759W 薿s牁黂躒貂顪敺鏺鶔躒貂顪 "" 洇旨麩戍肄耍 鄧枵s柱躒貂耍 詰鵛鞥躒貂耶 椷板耍愩刖躒貂顪憒圻〝繾祌贄毠洟唏w]襏耍屑廌戍鬞昔板胃 SQL0647N 咸揧 "" 容彀鏼擋珫耶 柜譇養鞻殛齶ガ戍妄板長臠柜譇贄毠洟擔咸揧耍 虋彀熪鋇 ALTER NODEGROUP 闉z搨祌容耍薿ss鼪定胃 DB2START CONNECT TO mpp1 CREATE BUFFERPOOL bp1 SIZE 1000 PAGESIZE 8192 CONNECT RESET CONNECT TO mpp1 ALTER NODEGROUP ng1 ADD NODE (2) 柫譇鞻齶ガ戍妄耍巷鸉胃 DB2SET DB2_HIDDENBP=16 熪鋇 db2start 銻鄧瓬 CONNECT 碉 ALTER NODEGROUP 闉z搨祌容耶 媥 ALTER TABLESPACE 闉z搨s柱式繾躒貂耍駙柜譇齶ガ|熪擁耶 蜙p胃 DB2START CONNECT TO mpp1 ALTER NODEGROUP ng1 ADD NODE (2) WITHOUT TABLESPACES ALTER TABLESPACE ts1 ADD ('ts1') ON NODE (2) o柜鑶媴銻碉闉z搨|擁砷鬞昔 SQL0647N苗椴唏w齔鬞昔 SQL1759W英耶 儵儘俊廇蘠歈殛鶔耍澱鏺彀 ALTER NODEGROUP... WITHOUT TABLESPACES 闉z搨祌 耍薿ss鼪定耶 DB2START CONNECT TO mpp1 ALTER NODEGROUP ng1 ADD NODE (2) WITHOUT TABLESPACES CONNECT RESET CONNECT TO mpp1 ALTER TABLESPACE ts1 ADD ('ts1') ON NODE (2) 駙柜譇鞻齶ガ戍妄耍巷鸉胃 DB2SET DB2_HIDDENBP=16 熪鋇 db2start 銻鄧瓬 CONNECT耑 ALTER NODEGROUP 碉 ALTER TABLESPACE 闉z搨 祌容耶 ------------------------------------------------------------------------ 1.5 騥齔繾熪擁戍砷 騥齔繾耍饓惄騥歈閱耍砷醳砏|鋇{彀 db2diag.log 洇 苗定冀 英耶殛耍養牉鄧落洐C ------------------------------------------------------------------------ 1.6 Red Flag Linux 戍珫砰躨蜸儘獛搨 愩刖鞮媥蚼u媽珫芯匣 Linux 再齗次劑 1.1赳耍 巷直欒赴芯匣赳鄧灥隳媽 珫砰躨蜸儘獛搨耶鑭嗀次劑 1.1 戍媽珫砰躨蜸儘獛搨耍 DB2 餪潲妄 ル媽珫戍戠俄贄板 1386耶 ------------------------------------------------------------------------ 1.7 愩刖養齁搨忪忘鼭冀s鼪耍屑 DB2 揅壧|珫跛 彀揅壧 DB2 戍齔繾耍愩刖q戍養齁搨忪忘鼭冀s鼪耍 屑彀灥揅壧ю悚祌耍 揅壧獛搨養|珫跛耶 礔繐鬙讘殛齶ガ耍彀鸉揅壧獛搨肄 -a 醳胃 setup.exe -a ------------------------------------------------------------------------ 1.8 碉媽珫 Linux 蓔 DB2 for Linux 戍衣閭砰躨裼]肄 ♂z繐彀詰媽珫 Linux 鑶豜W媥 Java GUI 泚爩苗蜙p赴嚭珫眃赳英 耍 屑茫繐オ鴉戍砰躨裼]肄耶 礔鑭嗀o醳]肄屑潲妄儘俊ず詰珫戠 祅耶 巷彀鞮戍媥蛈稕]肄斖閭枵柰媴]肄耍 詰舌彀臠譇赴嚭珫眃赳碰駒祌容雚 銻鸉殛]肄耶 黳鑶蚼G export LC_ALL=ja_JP 黳媽珫鑶蚼G export LC_ALL=zh_CN ------------------------------------------------------------------------ 1.9 Microsoft Internet Explorer 柼戍嚭珫眃齶ガ o板 Internet Explorer 揅曄詫醳]肄詻y歈戍齶ガ耶 赴嚭珫眃赳媥袛甭壝p 戍 jar耍廅殛酨灥鑶釬鬞Q揅曄扯z獛搨欘擋柅耶 礔繐o譇齶ガ耍巷薿s黂鑅 IE 戍揅曄詫醳耍愩柰詻胃 1. 灥照閱式 (IE4) 詰泚爩閱式 (IE5) 柼戍 Internet 醳耶 2. 彀赴揅曄詫赳贄貘耍灥埔戍霠鱦耶 3. 柜柰s柱霠...耶 4. 醨赴嚭珫眃 Web 再齗赳s柱埔戍霠M耶 愩刖嚭珫眃 Web 再 齗彀虎嵥戍珫耍養骷鏺繐醨 Web 再齗巰投閭枵饓養 (鰗巰投)耶 蜙p胃 http://ccWebServer.ccWebServerDomain http://ccWebServer 5. 柜柰俊肄耶 6. 柜柰]肄...耶 7. 巃韥柰戍 Java --> Java v貙耍嫀灥椻繘耶 8. 柜柰 Java 椻繘]肄...耶 9. 灥赴哀\養v赳贄貘耶 10. 巃韥柰戍赴冀⑨巰戍洇委 --> 鸉冀⑨巰戍洇委 --> 擂冀⑨巰戍\養v --> 鑶釬鬞赳耍嫀灥鼖韥耶 11. 柜柰臠譇礤鼖甇戍俊肄耶 ------------------------------------------------------------------------ 1.10 彀 Windows 蓔洐u鬞悚到扯z獛搨赳瓬 Sybase 祌繾戍虎委 赴鬞悚到扯z獛搨赳次劑 7 碉 Sybase Open Client 揅壧彀嵥柜鬧 Windows NT 詰 Windows 2000 鼭齗|y歈砷耍 遮 Sybase 洢擋獛搨|欘B鏼耶|鋇{ю柰媴 戍砷鬞昔胃 潲妄鱌絛 LIBTCL.DLL耶巷俊肄 SYBASE 洄儘俊]肄耶 鞻o餼膃彷妄板雚 Windows 裲布珫醨裲布 LC_ALL 颳耶 LC_ALL 板 柜譇砰躨膇ю囓耶 砰躨膇ю板劑殶鎈搨詻媥蛈孛あ攸`耍 鄧肄 獛搨繐媥蛈妖y躨裱鬞戍倌鰣C 砰躨 戍板廇鱦(詰奄)耍獛搨戍欣 貘養黳廇鱦椻繘耶 砰躨膋糒鱦霄服耍 蜙p齔搨詰f襶戍ず 搨耶 LC_ALL |洋T詻嗀戍砰躨蜦S肄長 (詻嗀ю)耶 愩刖鞮醨 LC_ALL 裲布颳耍o皇 ICM 餪養碉 Sybase 嵥酨彀 Windows NT 樹 鬧柼耍 柰媴鼭|潲妄B鏼胃 * 鬞悚到媥蛈 * 鬞悚到扯z舌 * 鬞悚到扯z獛搨 ------------------------------------------------------------------------ 1.11 嚭珫眃閱泊噬 養醨 FixPak 2 矧擋 DB2 再齗耍 屑腺順次戍嚭珫眃雚膼鱄A睦欑|嗀殛 B詻鴶翷戍齶ガ耶潒椴耍彀 DB2 次劑 7.2耍 順次嚭珫眃雚膼艬X鄭噬颳柅詻嗀戍 閱耶 o斖詻祗戍順次板摃次劑 6 FixPak 6 鄧容戍雚膼鱄A 鄧瓬摃次劑 7 FixPak 2 鄧容戍雚膼鱄C次劑 5 戍雚膼蠮ж洋T耶 戍儘搨板摃洋T戍雚膼鱄C次劑 6 雚膼鷑鏺 FixPak 6 詰鶔s次劑耍 次劑 7 雚膼鷑鏺 FixPak 2 詰鶔s次劑耶 ------------------------------------------------------------------------ 1.12 Netscape CD 廈衣腺 DB2 UDB Netscape CD 嫀廈衣腺 DB2 UDB耶巷雚 http://www.netscape.com耍灥 Netscape 恙耶 ------------------------------------------------------------------------ 1.13 XML Readme 戍砷 彀 DB2 XML Extender 次劑 7.1 README.TXT 戍赴圳N醳赳珫胃 3. DB2 UDB 戍w]次劑板 DB2 UDB 次劑 7.1耶礔鞮繐彀 AIX 烈 Solaris 媥 DB2 UDB 次劑 6.1耍 巷俊肄鞮睦欑烈 DB2 UDB 次劑 6.1 蓔 DB2 UDB 次劑 6.1 定柜鱌鸉耶 o板儘俊戍耶DB2 XML Extender 譧彀 DB2 次劑 7.1 烈 7.2 Q儭耶 readme.aix耑readme.nt 烈 readme.sun 詻媴戍n茫臡長胃 * DB2 UDB 6.1 (FP1_U465423) 詰鄧柼 (AIX) * DB2 Universal Database 次劑 6.1 詰鄧柼 (揅壧 FixPak 3) (NT) * DB2 UDB 次劑 6.1 (FixPak FP1_U465424) 詰鄧柼 (Sun) o板儘俊戍耶DB2 XML Extender 茫繐 DB2 次劑 7.1 詰 7.2耶 ------------------------------------------------------------------------ 1.14 Linux for S/390 柼養戍泊噬 礔彀 Linux for S/390 (洄揅壧 2.2 鑶媴眃獛搨) 媥 DB2耍欑 Linux q柼戍 養擋 RAM 皪貙醨|洟腺 1 GB耶貙 RAM 1 GB 鞻廅 Linux 眃獛搨 砷y歈戍養詫 DB2 泊噬耶 o骷熪擁腺 DB2 彀 Linux for S/390耍熪擁腺 Linux on Intel耶 鞮養雚 http://www10.software.ibm.com/developerworks/opensource/linux390/alpha_src.html 灥隳眃獛搨鄧 RAM 養媥酚WL 1 GB耶 ------------------------------------------------------------------------ 1.15 Windows 2000 柼戍 DB2 UDB 彀鬷譇赴次劑圳N醳赳珫耍柌譂擋腺 Windows NT 戍囓楯 (唏駙嗀肄) 腮 譂擋腺 Windows 2000耶 ------------------------------------------------------------------------ 哎柼麩 (HTML耑PDF 烈赴j餬赳) ------------------------------------------------------------------------ 2.1 Windows 2000 鏼~鑶袑蓔儭戍 Web 鈕檍 纈謰鞮彀 Windows 2000 柼媥 Microsoft Internet Explorer耶 礔鞮媥 Netscape耍巷圳N柰媴醳胃 * 媥 Netscape | Windows 2000 柼戍 DB2 s哎鬞j餬鍗耶 Netscape 醨媥袑蜙養擋戍 CPU 垠A虋遮鄭板腦俊廇鸉耶 ∥獀 廌j餬膣刖耍纈謰鞮彀鋇j餬祌耍彀駙柜譇甇柼柜柰鄧鶔澂 貂耶 鼪緺|彀幏z戍繾皪斖廌j餬膣刖耶 * 鞮養|圳N胃♂z繐臡戍祗腦儘俊廇ず彀柜譇 Netscape 鈕檍甇洇耍 潒椴耍愩刖鈕檍甇柜托礤鼖緺耍遮獠柎雚嵥戍赴嚭珫眃赳倌瓘n臡祗 腦耍 屑鈕檍斖|嗀摃耶 礔甽s檍甇虋嫀歃繐臡祗腦耍醨|鋇 {儘俊戍祗腦耶 鞮養zL 2.4, 鼖韥 Netscape 擁戍砷鬞昔 斖戍柰媴纙 J僦儘o譇齶ガ耶 鞮柛養鄧彀繐臡赴嚭珫眃赳祗腦祌容甽s檍甇耍 鄧鞻o譇齶ガ耶 * 繐臡赴嚭珫眃赳戍祗腦耍詰舌赴鬞珫眃赳戍遭ガ耍鞮養|搌砷鬞 昔耶 繐儘o譇齶ガ耍巷芋駽 2.4, 鼖韥 Netscape 擁戍砷鬞昔 斖戍纙 J耶 ------------------------------------------------------------------------ 2.2 彀 Solaris 鑶豜Uj餬 DB2 s哎鬞 愩刖鞮嗀彀 Solaris 鑶豜Uj餬 DB2 s哎鬞戍齶ガ耍 巷照泥鑶軝b /etc/system 洇戍眃獛搨囓耶鄧柰板 DB2 j餬鑶袑蒟磼眃獛搨囓戍瘐p襏耍 NetQuestion胃 semsys:seminfo_semmni 256 semsys:seminfo_semmap 258 semsys:seminfo_semmns 512 semsys:seminfo_semmnu 512 semsys:seminfo_semmsl 50 shmsys:shminfo_shmmax 6291456 shmsys:shminfo_shmseg 16 shmsys:shminfo_shmmni 300 儵]肄眃獛搨囓耍彀 /etc/system 祌s柱柰媴銻胃 set = value 儵媥摃s詰鶔戍襏擁耍鞮澱鏺薿s鼖韥鑶蚼C ------------------------------------------------------------------------ 2.3 炵黈 NetQuestion for OS/2 鄧媥 TCP/IP 炵黈g NetQuestion 鄧彀 OS/2 鑶豜W媥 TCP/IP 戍蘠鬷耶 o戍 *.cfg 鑅板 NetQuestion 揅壧到戍歃到耶 鞮養鄧枵柰媴珫柜醳 銻僓M肄 NetQuestion 揅壧到胃 echo %IMNINSTSRV% //譂擋 SBCS 揅壧 echo %IMQINSTSRV% //譂擋 DBCS 揅壧 ------------------------------------------------------------------------ 2.4 鼖韥 Netscape 擁戍砷鬞昔 ♂z鼖韥 Netscape 耍愩刖鞮熪{柰媴戍砷鬞昔胃 <尚>祌 (詰板珫戍祅麩)耶 照泥虋俊肄尚碉巰戍儘俊詫耍鄧瓬詻嗀澱繐戍定長嗀詫耶 潲妄礤鼖 "D:\Program Files\SQLLIB\CC\..\doc\html\db2help\XXXXX.htm" 鞮睦欑鸉柰媴纙J耍鄧鶔儘彀 Windows NT耑95 詰 98 柼戍o譇齶ガ (巷囓酀鄧柰 纙J耍鄧柅鬙愩摃彀 Windows 2000 柼鸉)胃 1. 雚赴礤絛赳閱式耍灥赴獛搨鐖赳-->赴Windows 琛扯赳耶饓養礤鼖 赴Windows 琛扯赳耶 2. 雚赴Windows 琛扯赳灥赴照赳-->赴蘮醳赳耶饓養礤鼖赴蘮 醳赳翭韄劑耶 3. 柜柰ю悚癸蒤C礤鼖赴ю悚赳贄耶 4. 彀熡到ю悚珫灥 Netscape Hypertext Document耍虋柜柰赴哀赳 耶 饓養礤鼖赴哀赳ю悚甇耶 5. 灥韥鏼珫戍礤鼖耶 6. 柜柰哀盭耶ю悚甇戍哀韥鏼礤鼖耶 7. 灥媥 DDE 戍耶 8. 彀擋僤鬾韥鏼戍睦擋獛搨珫耍 巷俊肄 "%1" 鋇{彀戠戍獀貘 (霄服 矧襶鄧瓬柜譇矧襶祌容戍)耶 礔彀 Windows 2000 柼熪{砷鬞昔耍鞮睦欑鸉柰媴纙J胃 1. 雚礤絛閱式耍灥 Windows 琛扯耶饓養礤鼖赴Windows 琛扯赳耶 2. 雚赴Windows 琛扯赳耍灥泚爩 --> 蘮醳耶饓養礤鼖赴蘮 醳赳翭韄劑耶 3. 柜柰ю悚癸蒤C 4. 彀赴ю悚赳贄柼耑洄熡到戍ю悚 珫耍鎣怠ず胃HTM Netscape Hypertext Document耍嫀柜柰灁藶 耶饓養礤鼖赴哀ю悚赳甇耶 5. 鎣怠ず韥鏼珫戍赴礤鼖赳耶 6. 柜柰哀盭耶饓養礤鼖赴哀ю悚戍韥鏼赳甇耶 7. 灥媥 DDE 戍耶 8. 彀擋僤鬾韥鏼戍睦擋獛搨珫耍 巷俊肄 "%1" 鋇{彀戠戍獀貘 (霄服 矧襶鄧瓬柜譇矧襶祌容戍)耶 9. 柜柰俊肄耶 10. 黳 HTML Netscape Hypertext Document 碉 SHTML Netscape Hypertext Document ю悚薿纙J 4 8耶 ------------------------------------------------------------------------ 2.5 UNIX 鑶豜W Adobe Acrobat Reader 戍歧呃茫臡 彀 UNIX 悚樹鬧耍Acrobat Reader 骷虪禭次耶儵鄧禭鄧鴉戍砰躨蜑}鼖 PDF 耍 鑶釳|廌砷鬞昔耶鬞昔鋇 PDF 戍戠悚酨灥詰鬙琳擁砷耍椷 板耍舫柼板廅長禭次戍 Acrobat Reader 潲妄彀唏禭砰躨膃 UNIX 珫鸉 耶 儵照殛 PDF 耍鼖韥禭次戍 Acrobat Reader 容耍樺鸉柰媴珫柜醳纙J耍 炵黈禭戍砰躨蒤G * 哀 Acrobat Reader 戍鼖韥 script耍彀鼖韥 script 洇耍 #!/bin/sh 闉z搨 祌s柱柰媴銻胃 LANG=C;export LANG o皇戍耍 Acrobat Reader Q擂戍睦擋獛搨鼖韥耍愩Q Netscape 矧齗 詰睦擋獛搨祗腦閱式鼖韥耍|擁儘俊戍長耶 * 彀祺銻洇枵 LANG=C耍醨 Acrobat Reader 戍睦擋獛搨裼]肄長禭耶 灁柜纙鬞耍巷s哎 Adobe 鑶 (http://www.Adobe.com)耶 ------------------------------------------------------------------------ 2.6 SQL Reference 譧虪柜譇 PDF 臠劑岩y戍赴媥 DB2 定赳衣到珫耍鋇 SQL Reference 長 PDF 搨遮嗀 銳耶This is incorrect. 潒媴尳戍岩y嗀銳耍椴遮銳虎睦戍岩襶儘俊耍椷板骷嗀柜譇 PDF 耍擂 霄鰗柅銳耶PDF 巰板 db2s0x70耶 ------------------------------------------------------------------------ 揅壧烈歧呃 倌鷎到 * 柜揅壧鬞 o 3.1 柰詻嗀儭戍 DB2 雚膼鬫抖w壧和麩 o 3.2 彀 Windows 2000 柼揅壧 DB2 o 3.3 腺蘞浀▽H蕶顢皈酨鱦肄霿戍騥齶ガ o 3.4 Windows 2000 戍 IPX/SPX q埔灨肄儭 o 3.5 DB2 容柜次祌容樺欘 DB2 獛 o 3.6 礔洄揅壧擂 DB2 恙耍巷彀揅壧 DB2 祌鸉 db2iupdt o 3.7 ]肄 Linux 蒝H鸉 DB2 嚭珫眃 o 3.8 DB2 Universal Database Enterprise Edition 瓬 DB2 Connect Enterprise Edition for Linux on S/390 o 3.9 DB2 Universal Database Enterprise - Extended Edition for UNIX t枵 o 3.10 HP-UX 戍 shmseg 眃囓 o 3.11 騥 IBM Visual 暖嚭定 o 3.12 酨灥暖嚭定 * DB2 Data Links Manager t枵 o 4.1 Dlfm 戍鼖韥噬韖鬞昔胃灥隳 afsfid 戠藃熪擁砷 o 4.2 ]肄樵奚酨戍 Tivoli Storage Manager ю顢 o 4.3 DFS 雚膼虀裲祔{搨戍忪忘繾茫臡 o 4.4 忌誾b AIX 戍膣扯z獛搨抑獛 o 4.5 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 DCE-DFS 裱犌 オ鴉揅壧圳N醳 o 4.6 噬韖戍 "dlfm add_prefix" 銻 o 4.7 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 媥 db2setup 洢 擋獛搨彀 AIX 柼揅壧 DB2 Data Links Manager o 4.8 揅壧碉歧呃 DB2 Data Links Manager for AIX胃DCE-DFS 鑅揅壧鏼 ~ o 4.9 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 媥 Smit 閞韥 揅壧 DB2 Data Links Manager o 4.10 揅壧碉歧呃 DB2 Data Links 戍 DFS 雚膼虀裲祔{搨 o 4.11 揅壧碉歧呃 DB2 Data Links Manager for Solaris o 4.12 黳 AIX 柼戍 DB2 Data Links Manager 樵妄 o 4.13 黳 Solaris 鏼~蓔W戍 DB2 Data Links Manager 樵 妄 o 4.14 黳 Windows NT 柼戍 DB2 Data Links Manager 樵妄 o 4.15 樵 AIX 柼戍韄到鑶 o 4.16 彀 Windows NT 柼膣珫戍 Administrator 顪殥M擋v o 4.17 醨 Data Links File System Filter (DLFF) 揅壧戍韄瘐 + 4.17.1 彀揅壧韄鬞昔 o 4.18 媥 SMIT 鬙揅壧 DLFM 祅麩養|颳オ鴉戍鐖 o 4.19 礤絛祌容/讘肄遭q巰投 o 4.20 媥 DLFM胃雚 DB2 定鵛鞥 DB2 Data Links Manager 戍M 韥鏼 o 4.21 DLFM1001E (s戍砷鬞昔) o 4.22 DLFM ]肄歧呃醳 o 4.23 彀 AIX 柼鸉 Data Links/DFS Script dmapp_prestart 熪擁 砷 o 4.24 Tivoli Space Manager 烈 Data Links 鬷幏 + 4.24.1 閱貙 o 4.25 4 揅壧碉歧呃 DB2 Data Links Manager for AIX + 4.25.1 柜揅壧圳N醳 + 4.25.1.1 雚 DB2 File Manager 次劑 5.2 騥 DB2 Data Links Manager 次劑 7 * 揅壧烈歧呃銬 o 5.1 5 彀 UNIX 鏼~鑶豜W揅壧 DB2 雚膼 + 5.1.1 HP-UX 眃獛搨歧呃囓 o 5.2 12 鸉鞮椻洳戍睦擋獛搨 + 5.2.1 媥 Run-Time Client s膣定洢擋獛搨 + 5.2.2 UNIX 雚膼蠮媥 ODBC 酨灥 DB2 o 5.3 24 ]鑅皖幏鑶釱靲s灥愫薿僬 + 5.3.1 皖幏鑶 + 5.3.1.1 貙 + 5.3.2 揅壧 DB2 Relational Connect + 5.3.2.1 彀 Windows NT 再齗柼揅壧 DB2 Relational Connect + 5.3.2.2 彀 AIX耑Linux 瓬 Solaris 鏼~蜙再齗柼揅壧 DB2 Relational Connect o 5.4 26 酨灥 Oracle 僬 + 5.4.1 麩砷 o 5.5 酨灥 Sybase 僬 (s柱躒) + 5.5.1 s柱 Sybase 僬待皖幏再齗 + 5.5.1.1 纙J 1胃]肄虋鶔s]肄熡到 + 5.5.1.2 纙J 2胃醨 DB2 膣 Sybase 雚膼襴n (譧 AIX 烈 Solaris) + 5.5.1.3 纙J 3胃薿s媥 DB2 + 5.5.1.4 纙J 4胃擔虋]肄祊貘 + 5.5.1.5 纙J 5胃擔鴉柳 + 5.5.1.6 纙J 6胃擋戍胃]肄 DB2_DJ_COMM + 5.5.1.7 纙J 7胃擔再齗 + 5.5.1.8 擋戍胃纙J 8胃]肄 CONNECTSTRING 再齗醳 + 5.5.1.9 纙J 9胃擔媥蛈稗杯 + 5.5.1.10 纙J 10胃擔式烈蘞浀’妞砯W + 5.5.2 肄 Sybase 戠俄贄 o 5.6 媥 ODBC 酨灥 Microsoft SQL Server 僬 (s柱躒) + 5.6.1 s柱 Microsoft SQL Server 僬待皖幏再齗 + 5.6.1.1 纙J 1胃]肄 (譧 AIX) + 5.6.1.2 纙J 2胃鸉 Shell Script (譧 AIX) + 5.6.1.3 纙J 3胃擋戍胃]肄 DB2_DJ_COMM + 5.6.1.4 纙J 4胃薿s媥 DB2 (譧 AIX) + 5.6.1.5 纙J 5胃擔鴉柳 + 5.6.1.6 纙J 6胃擔再齗 + 5.6.1.7 纙J 7胃擔媥蛈稗杯 + 5.6.1.8 纙J 8胃擔式烈蘞浀’妞砯W + 5.6.1.9 纙J 9胃擋戍胃隳 ODBC 鷲 + 5.6.2 泥 Microsoft SQL Server 戠俄贄 ------------------------------------------------------------------------ 柜揅壧鬞 ------------------------------------------------------------------------ 3.1 柰詻嗀儭戍 DB2 雚膼鬫抖w壧和麩 礔繐柰詻嗀儭戍 DB2 雚膼鬫抖w壧和麩耍霄服詻嗀次劑 7 祌容戍雚膼鱄A 巷s 哎 IBM DB2 Client Application Enabler Pack 戍贄耍鶐長胃 http://www.ibm.com/software/data/db2/db2tech/clientpak.html ------------------------------------------------------------------------ 3.2 彀 Windows 2000 柼揅壧 DB2 彀 Windows 2000 柼耍揅壧彀容次 DB2 祌柼耍詰板薿s揅壧{次劑耍 巷俊肄 醨詻嗀 DB2 再髕戍廌駻醳]肄長赴Take No Action赳耶 ------------------------------------------------------------------------ 3.3 腺蘞浀▽H蕶顢皈酨鱦肄霿戍騥齶ガ 定騥祌耍愩刖蕶顢皈酨鱦 USER 詰 CURRENT SCHEMA Q擋鉊w霿蘞浀’ 耍屑蘞浀↙|歈潲妄媥蚼C 蜙p胃 create view v1 (c1) as values user 彀次劑 5耍USER 碉 CURRENT SCHEMA 戍ю悚板 CHAR(8)耶 椻次劑 6 鱌耍擂謰Q 肄霿長 VARCHAR(128)耶 劑削蓔洐A愩刖蘞浀〞O墨次劑 5 詻擔耍托 cl 戍 ю悚屑長 CHAR耶 騥祌媥釳蘞浀#A擂|彀鸉繾哀繾A椷板耍擂|廅長 ю悚椴噬韖耶 鬙讘板舅鞥虋薿s擔欑蘞浀#C 彀鵛鞥蘞浀+鶖e耍泥欒 SYSCAT.VIEWS 悚到 蘞浀↗銃^灥擋鉈擔蘞浀’妖y妄耶 蜙p胃 select text from syscat.views where viewname='<>' ------------------------------------------------------------------------ 3.4 Windows 2000 戍 IPX/SPX q埔灨肄儭 殛鬞板囓酯ut枵赳柜岩戍赴揅壧赳o柜戍赴養戍遭雚s鼪髕赳o柜 躒耶 洄洢闟戍q埔灨肄儭埵↗ж蘠曄儘俊耶 儭媥 IPX/SPX s鼪 OS/2 詰 UNIX 悚再齗戍 Windows 2000 雚膼鱄C 柛儭媥 IPX/SPX s鼪 Windows 2000 再齗戍 OS/2 詰 UNIX 悚雚膼鱄C ------------------------------------------------------------------------ 3.5 DB2 容柜次祌容樺欘 DB2 獛 殛鬞板囓酯uDB2 for Windows t枵赳柜岩珫戍騥鬞耶 礔鞮繐彀 Windows 鼭齗柼鸉戍容柜次 DB2耍 揅壧獛搨詻虪戍翭i霄鰗柅醨 DB2 DLL 奚蟂彀韄鯬戍獛媴耶 彀殛耍鞮養鄧醨媴斖戍獛鄧韥搨欘 耍詰舌徾w壧獛搨椻韥饁o獛耶 鞮彀揅壧祌容韥欘詻嗀 DB2 獛 耍鄧鞻泊噬耶 繐俊肄 DB2 獛彀鸉珫戍稙豜搨板zL赴Windows 再 髕赳熰貘鈮趷鑶蛈扳{耶 彀赴Windows 再髕赳熰貘珫耍巷俊肄鑭嗀鸉 DB2 再 髕耑 OLAP 再髕耑詰暖再髕耶 : Windows 樹鬧柼柜歃骷鸉柜次劑戍 DB2耶 蜙p耍鞮潲妄彀嵥皇戍 Windows 鼭齗柼嵥鸉 DB2 次劑 7 碉 DB2 次劑 6耶礔鞮繐醨 DB2 次劑 7 揅壧彀洄揅壧 DB2 次劑 6 戍鼭齗柼耍 揅壧獛搨|彀揅壧齔繾飁 DB2 次劑 6耶巷囓僨A’李t枵銳耍 鄧灥隳雚 DB2 戍容柜次僣騥戍虎鬞耶 ------------------------------------------------------------------------ 3.6 礔洄揅壧擂 DB2 恙耍巷彀揅壧 DB2 祌鸉 db2iupdt 柰媴鬞彀鞮戍赴t枵赳揅壧麩珫洄虪耶 彀 UNIX 悚鑶豜W揅壧 DB2 UDB 次劑 7 耍礔洄揅壧 DB2 恙耍 鞮茫繐鸉 db2iupdt 銻耍鄧鶔s鞮繐媥袛茨恙s蕶詫戍蒤C嗀蕶詫繐彀鸉o譇銻祌 浂媥蚼C ------------------------------------------------------------------------ 3.7 ]肄 Linux 蒝H鸉 DB2 嚭珫眃 殛鬞洇鰗腺赴t枵赳柜岩戍赴揅壧 DB2 嚭珫眃赳o柜耶 塒礤 Linux 戍 DB2 揅壧獛搨虋廌抑鼭甇祌耍 巷枵柰媴銻耑]肄儘俊戍 蒤A鄧鸉 DB2赴嚭珫眃赳胃 su -l <蜙W投> export JAVA_HOME=/usr/jdk118 export DISPLAY=<鼭齗巰投>:0 潒耍礤鼖駙柜譇抑鼭甇虋枵胃 su root xhost +<鼭齗巰投> 金僣抑鼭甇耍羽廌鞮熡枵長蜰嗀舌 ID 戍抑鼭耍 虋枵銻胃 db2cc 鄧鼖韥赴嚭珫眃赳耶 ------------------------------------------------------------------------ 3.8 DB2 Universal Database Enterprise Edition 瓬 DB2 Connect Enterprise Edition for Linux on S/390 DB2 Universal Database Enterprise Edition 瓬 DB2 Connect Enterprise Edition {彀養彀 Linux/390 柼媥豜F耶 彀揅壧 Linux S/390 鼭齗柼祌容耍 鞮睦欑繐N ルn瓬獞戍茫臡胃 獞 S/390 9672 Generation 5 詰鄧柼耍Multiprise 3000耶 n * SuSE Linux v7.0 for S/390 詰 Turbolinux Server 6 for zSeries 瓬 S/390 * 眃柳歃 2.2.16耍鰗 S/390 獛搨 (巷柰翷) * glibc 2.1.3 * libstdc++ 6.1 Linux/390 茫繐柰媴獛搨胃 * 殛茫繐獛搨耶 礔茫稒s戍鶔s鬞耍巷 http://www.software.ibm.com/data/db2/linux 霠耶 : 1. 骷儭 32 祅戍 Intel-based Linux 瓬 Linux/390耶 2. Linux/390 戍 DB2 次劑 7 冀虪柰媴醳胃 o DB2 UDB Enterprise - Extended Edition o DB2 Extenders o Data Links Manager o DB2 Administrative Client o 鶔q俄儭 o LDAP 儭 ------------------------------------------------------------------------ 3.9 DB2 Universal Database Enterprise - Extended Edition for UNIX t枵 5 赴彀 Linux 柼揅壧碉歧呃 DB2 Universal Database赳鋇 Linux EEE 費鐖 珫戍臠柜譇躒貂澱鏺爩虎嵥戍 kernel耑glibc 瓬 libstdc++ 柳歃耶 DB2 EEE for Linux 灚擋次養雚柰媴霠柰胃 http://www6.software.ibm.com/dl/db2udbdl/db2udbdl-p ------------------------------------------------------------------------ 3.10 HP-UX 戍 shmseg 眃囓 鞮戍赴t枵赳柜岩珫虪嗀鶔s HP-UX 眃歧呃囓戍鬞儘俊耶 睦欑落 HP-UX 戍 shmseg 眃囓戍襏耶 睦擋w]戍 HP-UX 襏 (120)耶 ------------------------------------------------------------------------ 3.11 騥 IBM Visual 暖嚭定 DB2 Universal Database for Windows t枵虪嗀 Windows NT 碉 Windows 2000 灁 DB2 Universal Database 次劑 7 悚揅壧齔繾耍愩摃騥鏼擋珫暖嚭 定戍鬞耶愩刖繐騥柜譇鄧柼戍暖嚭定耍 屑澱鏺媥郬暖嚭 定扯z甇灁衣閭定戍騥耶柜歃骷嗀柜譇暖嚭定鏼擋耶薿s熡枵 暖珫眃耍愩刖柼柜譇定板鞮繐媥蛈材定耍 屑澱鏺媥郬暖嚭 定扯z甇僳i熡韄鞮詻繐媥蛈材定耶 ------------------------------------------------------------------------ 3.12 酨灥暖嚭定 腺 Windows NT 揅壧 DB2 次劑 7耍擔 DB2 次劑 7 暖嚭定碉暖再齗耶 愩刖鞮嗀巰長 Visual Warehouse 戍暖嚭定耍 巷醨鰗嗀暖嚭定戍 DB2 再齗 DB2 次劑 7耍暖嚭定戍鴶翷|騥耍 鄧虪 DB2 次劑 7 暖珫眃詻媥蚼C儵~媥蛈蜀 7耍巷騥詻嗀戍暖嚭定耶 DB2 次 劑 7 揅壧齔繾耍鏼擋珫戍暖嚭定戍鴶翷|騥次劑 7耶儵騥衣閭 暖嚭定戍鴶翷耍巷媥郬暖嚭定騥洢擋獛搨耶腺 Windows NT耍 灥礤絛 --> 獛搨鐖 --> IBM DB2 --> 暖嚭定扯z耍灁鼖韥耶嗀暖嚭 定戍騥耍巷囓酀Windows DB2 Universal Database t枵 ------------------------------------------------------------------------ DB2 Data Links Manager t枵 ------------------------------------------------------------------------ 4.1 Dlfm 戍鼖韥噬韖鬞昔胃灥隳 afsfid 戠藃熪擁砷 黳彀 DCE-DFS 裱稘鬾戍 Data Links Manager耍愩刖 dlfm 廅柰媴砷鼖韥噬 韖耍 巷直欒 IBM 再髕珫眃胃 灥隳 afsfid 戠藃熪擁砷 ↗媥 "dlfm add_prefix" 熡韄 Data Links Manager 戍 DFS 鐖Q飁耍 醨|熪擁砷耶 ------------------------------------------------------------------------ 4.2 ]肄樵奚酨戍 Tivoli Storage Manager ю顢 儵肄樵奚酨媥釱彷@譇 TSM 扯zю顢耍巷]肄 DLFM_TSM_MGMTCLASS DB2 熡到 醳柜譇譂’壯噠zю顢巰投耶 ------------------------------------------------------------------------ 4.3 DFS 雚膼虀裲祔{搨戍忪忘繾茫臡 DFS 雚膼虀裲祔{搨長擋戍祅麩耍鞮養鄧彀 DB2 Universal Database 雚膼鷒軝 再齗揅壧齔繾鏼耶 潒 DFS 雚膼虀裲祔{搨鸉虋茫繐 DB2 UDB 雚膼鷒 再齗耍 椷板耍揅壧 DFS 雚膼虀裲祔{搨祌容鞮澱鏺揅壧 DB2 Universal Database 雚膼鱄C 柅 DFS 雚膼虀裲祔{搨戠俄茫繐 2 MB 戍忪忘繾鴉耍 彀揅壧 DFS 雚 膼虀裲祔{搨長 DB2 鸉繾雚膼攥w壧戍柜倌鰫耍 鞮睦欑駙鴉奚蟂 40 MB 戍オ 鴉忪忘繾耶 揅壧 DFS 雚膼虀裲祔{搨長 DB2 扯z雚膼鷒 DB2 再齗揅壧祌柜 倌鰫耍鞮茫繐鶔愫戍忪忘繾耶 嗀 DB2 Universal Database 恙詻茫繐戍忪忘 繾耍欏僝鬞巷囓酀 DB2 for UNIX t枵銳耶 ------------------------------------------------------------------------ 4.4 忌誾b AIX 戍膣扯z獛搨抑獛 dlfm see 銻戍鋇嗀鶔耶 熪鋇殛銻鄑窌誾b AIX 戍膣扯z獛搨 抑獛耍膣刖烈柰媴詻ю胃 PID PPID PGID RUNAME UNAME ETIME DAEMON NAME 17500 60182 40838 dlfm root 12:18 dlfm_copyd_(dlfm) 41228 60182 40838 dlfm root 12:18 dlfm_chownd_(dlfm) 49006 60182 40838 dlfm root 12:18 dlfm_upcalld_(dlfm) 51972 60182 40838 dlfm root 12:18 dlfm_gcd_(dlfm) 66850 60182 40838 dlfm root 12:18 dlfm_retrieved_(dlfm) 67216 60182 40838 dlfm dlfm 12:18 dlfm_delgrpd_(dlfm) 60182 1 40838 dlfm dlfm 12:18 dlfmd_(dlfm) DLFM SEE 繐臡歈閱耶 服躲洇戍巰投長 dlfm 膃抖W投耍劑蜙W投長 "dlfm"耶 ------------------------------------------------------------------------ 4.5 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 DCE-DFS 裱犌序B鴉揅壧圳 N醳 彀赴揅壧樺讘麩赳鱦沮斖耍睦欑s柱戍s鬞胃 鞮柛澱鏺揅壧 e-fix for DFS 3.1耍詰舌 PTF 鐖 1 (歈養擋)耶 養彀鄧柰霠 e-fix 戍鬞胃 http://www.transarc.com/Support/dfs/datalinks/efix_dfs31_main_page.html 鄧瓬胃 澱鏺彀揅壧 Data Links Manager 祌容鸉 dfs 雚膼鱄C 媥 db2setup 詰 smitty耶 彀赴Keytab 赳鱦沮斖耍嗀譇砷睦欑鶔儘長胃 鰗嗀遭碉q俄鬞戍 keytab 耍睦欑投長 datalink.ktb 碉 .... 儘俊戍巰投胃datalink.ktb 板擋彀柰貘戍削蓔洐C 赴Keytab 赳鱦沮睦欑齍 赴DCE-DFS 鑅揅壧鏼~赳祌柰耍 廅長 DLMADMIN 蒡擔耍o譇浂擔耶 彀赴Data Links File Manager 再齗烈雚膼鱄v珫耍 巷圳N耍澱鏺彀 Data Links Manager 雚膼龢鶖e樺揅壧 Data Links Manager 再齗耶 睦欑s柱赴樵到赳躒胃 礔樵妄板黳劑抑鑶蚼A o澱鏺板 DFS 鑶釬犌屁到耶 巷俊肄 DFS 扯z舌洄擔殛 DFS 鐖耶 殛鐖睦欑板 DMLFS 鐖耶 ------------------------------------------------------------------------ 4.6 噬韖戍 "dlfm add_prefix" 銻 黳彀 DCE/DFS 裱稘鬾戍 Data Links Manager耍 dlfm add_prefix 銻養| 噬韖耍椴廌剽俄長 -2061 (樵噬韖)耶礔熪擁殛扛如耍巷鸉柰媴纙J胃 1. 熪鋇 dlfm stop 銻僤鵜 Data Links Manager 戍鎈鏮獛搨獛耶 2. 熪鋇 dlfm stopdbm 銻僤鵜 DB2 獛耶 3. 熪鋇 dce_login root 銻僓隳 dce root 砸ъ耶 4. 熪鋇 dlfm startdbm 銻僔裲 DB2 獛耶 5. 熪鋇 dlfm add_prefix銻馰n韄 Data Links Manager 戍鐖耶 6. 熪鋇 dlfm start 銻僔裲 Data Links Manager 鎈鏮獛搨獛耶 ------------------------------------------------------------------------ 4.7 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 媥 db2setup 洢擋獛搨彀 AIX 柼揅壧 DB2 Data Links Manager 彀赴洄擔 DB2 定 DLFM_DB赳鱦沮珫耍DLFM_DB 虋板擔彀 DCE_DFS 珫耶澱鏺鄧鑅揅壧纙J僤鬾耶 彀赴DMAPP 戍 DCE-DFS w樺鼖韥熡到赳鱦沮珫耍纙J 2 睦欑鶔愩柰胃 2. s柱銻 /opt/dcelocal/tcl/user_cmd.tcl耍鄧俊肄 DFS 鼖韥柛鼖韥柅 DMAPP耶 ------------------------------------------------------------------------ 4.8 揅壧碉歧呃 DB2 Data Links Manager for AIX胃DCE-DFS 鑅揅壧鏼~ 睦欑s柱柰媴赴蘠歈 Data Links Manager 揅壧赳躒胃 彀 Data Links Manager 再齗柼耍澱鏺鸉柰媴纙J耍鄧蘠歈揅壧胃 1. 彀赴揅壧碉歧呃 DB2 Data Links Manager for AIX赳o戍赴DCE-DFS 膃 オ鴉揅壧圳N醳赳o躒斖耍 醨 keytab 擔長赴Keytab 赳祌柰戍 繐耶 2. 鄧 root 蟴楹A枵柰媴銻鄧鼖韥 DMAPP胃 stop.dfs all start.dfs all 3. 愩柰媴纙J耍媥 dce root 砸ъ僤鬾 "dlfm setup"耶 a. 鄧 Data Links Manager 戍 DLMADMIN 扯z舌熡枵耶 b. 鄧 root 蟴楹A熪鋇 dce_login耶 c. 枵銻胃dlfm setup耶 彀 Data Links Manager 雚膼龢W耍澱鏺鸉柰媴纙J耍鄧蘠歈揅壧胃 1. 彀赴揅壧碉歧呃 DB2 Data Links Manager for AIX赳o戍赴DCE-DFS 膃 オ鴉揅壧圳N醳赳o躒斖耍 醨 keytab 擔長赴Keytab 赳祌柰戍 繐耶 2. 鄧 root 蟴楹A枵柰媴銻鄧鼖韥 DMAPP胃 stop.dfs all start.dfs all ------------------------------------------------------------------------ 4.9 揅壧碉歧呃 DB2 Data Links Manager for AIX胃 媥 Smit 閞韥揅壧 DB2 Data Links Manager 拚鶅赴SMIT 鑅揅壧鏼~赳躒耍纙J 7 鄧鋇 "dce_login root" 銻澱鏺 彀 "dlfm setup" 祌容熪鋇耶 茫繐纙J 11耶 彀纙J 6 (dlfm server_conf) 碉纙 J 8 (dlfm client_conf) 蘠歈耍|椻韥鸉殛纙J耶 柛巷齁纙J 12 (dlfm start)耶 礔繐蘠歈揅壧耍巷鸉柰媴纙J胃 1. 彀赴揅壧碉歧呃 DB2 Data Links Manager for AIX赳o戍赴DCE-DFS 膃 オ鴉揅壧圳N醳赳o躒斖耍 醨 keytab 擔長赴Keytab 赳祌柰戍 繐耶 2. 鄧 root 蟴楹A枵柰媴銻鄧鼖韥 DMAPP胃 stop.dfs all start.dfs all ------------------------------------------------------------------------ 4.10 揅壧碉歧呃 DB2 Data Links 戍 DFS 雚膼虀裲祔{搨 彀赴歧呃 DFS 雚膼虀裲祔{搨赳躒斖耍醨柰媴鬞閭纙J 2胃 鸉 "secval" 銻q鎈|蘠歈歧呃耶 L耍柛養茫繐薿s鼖韥鼭齗耶 礔彀酨灥 READ PERMISSION DB 熪{齶ガ耍 巷薿s鼖韥揅壧 DB2 DFS 雚膼虀裲祔{搨戍鼭齗耶 ------------------------------------------------------------------------ 4.11 揅壧碉歧呃 DB2 Data Links Manager for Solaris 彀揅壧 DB2 Data Links Manager for Solaris 祌澱鏺鸉柰媴韥鏼胃 1. 醨柰媴柧s柱 /etc/system 胃 set dlfsdrv:glob_mod_pri=0x100800 set dlfsdrv:glob_mesg_pri=0xff set dlfsdrv:ConfigDlfsUid=UID 珫 UID 鋅式 id dlfm 戍媥蛈 ID耶 2. 薿s礤鼭耍鄧鶔擁耶 ------------------------------------------------------------------------ 4.12 黳 AIX 柼戍 DB2 Data Links Manager 樵妄 柅 Disk Copy 碉 XBSA 祌鴉耍鞮柛養鄧媥 Tivoli Storage Manager (TSM) 僯 樵腺 Data Links 再齗斖戍耶 礔繐醨 Tivoli Storage Manager 鏼長奚酨再齗胃 1. 彀 Data Links 再齗柼揅壧 Tivoli Storage Manager耶 欏僝鬞耍巷囓楯 Tivoli Storage Manager戍恙麩耶 2. 鄧 Tivoli Storage Manager 再齗馰n到 Data Links 再齗雚膼鷛擋獛 搨耶 欏僝鬞耍巷囓楯 Tivoli Storage Manager戍恙麩耶 3. 醨柰媴s柱 Data Links Manager 扯z舌戍 db2profile 詰 db2cshrc script 胃 (黳 Bash耑Bourne 詰 Korn shell) export DSMI_DIR=/usr/tivoli/tsm/client/api/bin export DSMI_CONFIG=$HOME/tsm/dsm.opt export DSMI_LOG=$HOME/dldump export PATH=$PATH:$DSMI_DIR (黳 C shell) setenv DSMI_DIR /usr/tivoli/tsm/client/api/bin setenv DSMI_CONFIG ${HOME}/tsm/dsm.opt setenv DSMI_LOG ${HOME}/dldump setenv PATH=${PATH}:$DSMI_DIR 4. 巷俊肄 dsm.sys TSM 鑶蚳醳腺 $DSMI_DIR 到斖耶 5. 巷俊肄 dsm.opt TSM 媥蛈犐醳腺 INSTHOME/tsm 到斖耍 彀殛 INSTHOME 板 Data Links Manager 扯z舌戍鱌絛到耶 6. 醨 PASSWORDACCESS 醳]肄長擁耍彀 /usr/tivoli/tsm/client/api/bin/dsm.sys Tivoli Storage Manager 鑶蚳醳 斖耶 7. 媥釹擁醳彀柜歃鼖韥 Data Links 扯z獛搨祌容耍 熡到 TSM q 俄耶 媥釤o譇妄耍 Data Links 扯z獛搨礤絛 TSM 再齗戍s哎 耍鞮茫繐虪q俄耶 欏僝鬞耍巷囓楯 TSM 戍恙麩耶 8. 醨 DLFM_BACKUP_TARGET 熡到]肄 TSM耶 彀殛裱碖N落 DLFM_BACKUP_DIR_NAME 熡到戍襏耶 o皇|鼖韥 Tivoli Storage Manager 戍樵醳耶 : 1. 礔鞮彀鸉繾斖耍鶔 TSM 碉忪忘祌繾戍 DLFM_BACKUP_TARGET 熡到 ]肄耍鞮睦欑嬿樵奚酨|齍犌亢肄戍奚酨鑅耶蜙p耍礔 鞮鄧]肄 TSM 戍 DLFM_BACKUP_TARGET 熡到襏僔裲 Data Links 扯z獛搨耍 虋醨熡到襏鶔忪忘鑅耍屑詻嗀犌亢O酨戍醨暖酨彀 忪忘戍s鑅斖耶樺容奚酨 TSM 戍醨|齍s戍忪忘鑅耶 2. 礔繐鑅黈w]戍 TSM 扯zю顢耍養鄧媥豜@譇投長 DLFM_TSM_MGMTCLASS 戍s熡到耶礔殛熡到彀冀]肄戍扛你耍鼪緺醨|媥釸w]戍 TSM 扯zю顢耶 9. 枵 dlfm stop 銻僤鵜 Data Links 扯z獛搨耶 10. 枵 dlfm start 銻僔裲 Data Links 扯z獛搨耶 ------------------------------------------------------------------------ 4.13 黳 Solaris 鏼~蓔W戍 DB2 Data Links Manager 樵妄 柅 Disk Copy 碉 XBSA 祌鴉耍鞮柛養鄧媥 Tivoli Storage Manager (TSM) 僯 樵腺 Data Links 再齗斖戍耶 礔繐醨 Tivoli Storage Manager 鏼長奚酨再齗胃 1. 彀 Data Links 再齗柼揅壧 Tivoli Storage Manager耶 欏僝鬞耍巷囓楯 Tivoli Storage Manager戍恙麩耶 2. 鄧 Tivoli Storage Manager 再齗馰n到 Data Links 再齗雚膼鷛擋獛 搨耶 欏僝鬞耍巷囓楯 Tivoli Storage Manager戍恙麩耶 3. 醨柰媴s柱 Data Links Manager 扯z舌戍 db2profile 詰 db2cshrc script 胃 (黳 Bash耑Bourne 詰 Korn shell) export DSMI_DIR=/opt/tivoli/tsm/client/api/bin export DSMI_CONFIG=$HOME/tsm/dsm.opt export DSMI_LOG=$HOME/dldump export PATH=$PATH:/opt/tivoli/tsm/client/api/bin (黳 C shell) setenv DSMI_DIR /opt/tivoli/tsm/client/api/bin setenv DSMI_CONFIG ${HOME}/tsm/dsm.opt setenv DSMI_LOG ${HOME}/dldump setenv PATH=${PATH}:/opt/tivoli/tsm/client/api/bin 4. 巷俊肄 dsm.sys TSM 鑶蚳醳腺 /opt/tivoli/tsm/client/api/bin 到 斖耶 5. 巷俊肄 dsm.opt TSM 媥蛈犐醳腺 INSTHOME/tsm 到斖耍 彀殛 INSTHOME 板 Data Links Manager 扯z舌戍鱌絛到耶 6. 醨 PASSWORDACCESS 醳]肄長擁耍彀 /opt/tivoli/tsm/client/api/bin/dsm.sys Tivoli Storage Manager 鑶蚳醳 斖耶 7. 媥釹擁醳彀柜歃鼖韥 Data Links 扯z獛搨祌容耍 熡到 TSM q 俄耶 媥釤o譇妄耍 Data Links 扯z獛搨礤絛 TSM 再齗戍s哎 耍鞮茫繐虪q俄耶 欏僝鬞耍巷囓楯 TSM 戍恙麩耶 8. 醨 DLFM_BACKUP_TARGET 熡到]肄 TSM耶 彀殛裱碖N落 DLFM_BACKUP_DIR_NAME 熡到戍襏耶 o皇|鼖韥 Tivoli Storage Manager 戍樵醳耶 : 1. 礔鞮彀鸉繾斖耍鶔 TSM 碉忪忘祌繾戍 DLFM_BACKUP_TARGET 熡到 ]肄耍 鞮睦欑嬿樵奚酨|齍犌亢肄戍奚酨鑅耶蜙p耍礔 鞮鄧]肄 TSM 戍 DLFM_BACKUP_TARGET 熡到襏僔裲 Data Links 扯z獛搨耍 虋醨熡到襏鶔忪忘鑅耍屑詻嗀犌亢O酨戍醨暖酨彀 忪忘戍s鑅斖耶樺容奚酨 TSM 戍醨|齍s戍忪忘鑅耶 2. 礔繐鑅黈w]戍 TSM 扯zю顢耍養鄧媥豜@譇投長 DLFM_TSM_MGMTCLASS 戍s熡到耶礔殛熡到彀冀]肄戍扛你耍鼪緺醨|媥釸w]戍 TSM 扯zю顢耶 9. 枵 dlfm stop 銻僤鵜 Data Links 扯z獛搨耶 10. 枵 dlfm start 銻僔裲 Data Links 扯z獛搨耶 ------------------------------------------------------------------------ 4.14 黳 Windows NT 柼戍 DB2 Data Links Manager 樵妄 臠 DATALINK 襏麰枵爩嗀 DATALINK 托戍式 (肄霿長廌駻)耍 |揅 Data Links 再齗戍虎睦 DATALINK 耍鄧樵奚酨再齗耶容鉒限ADisk Copy (w]妄) 碉 Tivoli Storage Manager 板儭樵奚酨再齗戍醳耶 冀鄏 DB2 Data Links Manager for Windows NT 次歃醨儭擂虪睦鸆戍樵韔 碉n耶 Disk Copy (w]妄) 彀 DB2 再齗柼枵 backup 銻耍 o譇銻養俊肄定斖戍膣| 彀 Data Links 再齗柼樵 DLFM_BACKUP_DIR_NAME 詻肄戍 到耶 o譇戍w]襏板 c:\dlfmbackup耍 彀殛 c:\ 式 Data Links Manager 戍樵揅壧忪忘鼭耶 礔繐醨殛]肄 c:\dlfmbackup耍巷枵柰媴銻胃 db2set -g DLFM_BACKUP_DIR_NAME=c:\dlfmbackup DLFM_BACKUP_DIR_NAME 肄戍鑅 腺媥 Data Links赴 鑶釸L酣齗赳戍鑶豜W耍椴茫繐戍繾養擋腺鞮肄聤樵戍到斖耶 嵥耍巷俊肄 DLFM_BACKUP_TARGET 鑌墨枵柰媴銻洄]肄長 LOCAL胃 db2set -g DLFM_BACKUP_TARGET=LOCAL ]肄詰鶔o祌耍巷媥 dlfm stop 碉 dlfm start 銻僤鵜虋薿 s鼖韥 Data Links 扯z獛搨耶 Tivoli Storage Manager 礔繐醨 Tivoli Storage Manager 鏼長奚酨再齗胃 1. 彀 Data Links 再齗柼揅壧 Tivoli Storage Manager耶 欏僝鬞耍巷 囓楯 Tivoli Storage Manager戍恙麩耶 2. 鄧 Tivoli Storage Manager 再齗馰n到 Data Links 再齗雚膼鷛 擋獛搨耶 欏僝鬞耍巷囓楯 Tivoli Storage Manager戍恙麩耶 3. 柜柰礤絛耍潒灥]肄 --> 嚭鬧 --> 鑶蚼C 饓|礤鼖赴鑶豜 委赳甇耶 灥蒗蒤A 虋枵柰媴碉睦襏胃 襏 DSMI_DIR c:\tsm\baclient DSMI_CONFIG c:\tsm\baclient\dsm.opt DSMI_LOG c:\tsm\dldump 4. 巷俊肄 dsm.sys TSM 鑶蚳醳腺 c:\tsm\baclient 到斖耶 5. 巷俊肄 dsm.opt TSM 媥蛈犐醳腺 c:\tsm\baclient 到斖耶 6. 醨 PASSWORDACCESS 醳]肄長擁耍 彀 c:\tsm\baclient\dsm.sys Tivoli Storage Manager 鑶蚳醳斖耶 7. 媥釹擁醳彀柜歃鼖韥 Data Links 扯z獛搨祌容耍 熡到 TSM q俄耶 媥釤o譇妄耍 Data Links 扯z獛搨礤絛 TSM 再齗 戍s哎耍鞮茫繐虪q俄耶 欏僝鬞耍巷囓楯 TSM 戍恙麩耶 8. 媥豜U媴銻醨 DLFM_BACKUP_TARGET ]肄 TSM胃 db2set -g DLFM_BACKUP_TARGET=TSM 彀殛裱碖N落 DLFM_BACKUP_DIR_NAME 戍襏耶 o皇|鼖韥 Tivoli Storage Manager 戍樵醳耶 : 1. 礔鞮彀鸉繾斖耍鶔 TSM 碉 LOCAL 祌繾戍 DLFM_BACKUP_TARGET ]肄耍鞮睦欑嬿樵奚酨| 犌亢肄戍奚酨鑅耶蜙p耍礔鞮鄧]肄 TSM 戍 DLMF_BACKUP_TARGET 僔裲 Data Links 扯z獛搨耍 虋醨襏鶔 LOCAL耍屑詻嗀犌亢O酨戍醨暖酨彀忪忘戍s 鑅斖耶樺容奚酨 TSM 戍醨|齍s戍忪忘鑅耶 2. 礔繐鑅黈w]戍 TSM 扯zю顢耍養鄧媥豜@譇投長 DLFM_TSM_MGMTCLASS 戍s耶礔殛彀冀]肄戍扛 你耍鼪緺醨|媥釸w]戍 TSM 扯zю顢耶 9. 枵 dlfm stop 銻僤鵜 Data Links 扯z獛搨耶 10. 枵 dlfm start 銻僔裲 Data Links 扯z獛搨耶 ------------------------------------------------------------------------ 4.15 樵 AIX 柼戍韄到鑶 岩珫祗腦澱鏺欘 Data Links Manager耍 椴塒哎樵睦欑祼曋鑶釱鉒s鏼耶 柰 媴妄颳欘 Data Links Manager 戍茫臡耍 遭繐黳茫繐囍養擋詫戍媥蛈猺C 1. 酨灥 CLI 僬奐 quiesce.c 瓬 Shell Script online.sh耶o腺 /samples/dlfm 到耶 2. 哀 quiesce.c胃 xlC -o quiesce -L$HOME/sqllib/lib -I$HOME/sqllib/include -c quiesce.c 3. 鄧 root 蟴楹A彀爩嗀 DLFS 鑶蛈材`貂柼鸉 Script耶 shell script online.sh 糶]鞮彀 Data Link Manager 躒貂柼爩嗀悚到熡到 (黳 鄧 Data Link Manager 馰n到戍臠譇定)耶柛糶] /etc/filesystems 爩嗀 DLFS 鑶蛈李鬷熡到耶shell script 鸉柰媴韥鏼胃 * 愛定斖戍詻嗀式耍o定鄧 Data Links Manager 馰n到耶o皇| 欘詻嗀s戍狎韥耶 * 醨鑶袛H鸅朵鑶釱僝企壧詰薿s壧耶 * 鸉鑶釤樵耶 * 醨鑶袛H伸/柞枵鑶釱僝企壧詰薿s壧耶 * 薿] DB2 式胚柛餪板耍鬙愛扛你耶 澱鏺 Script 鄧譂幏鞮戍蒤A愩柰詻胃 1. 灥樵銻耍虋舅鑅腺 script 戍 do_backup 耶 2. ]肄 Script 洇戍柰媴胃 o DLFM_INST胃]肄o譇 DLFM 蜙W投耶 o PATH_OF_EXEC胃]肄o譇 "quiesce" 養鸉詻彀戍尚耶 鄧柰媴銻碰駒 script胃 online.sh ------------------------------------------------------------------------ 4.16 彀 Windows NT 柼膣珫戍 Administrator 顪殥M擋v 彀 Windows NT 柼耍腺毠倔椰杜耍柜譇萎竀 Adminstrator 顪憒杜媥蛈 腺媥 DataLink 鉲膣戍碉 UNIX 柼戍 root 媥蛈睚虎嵥戍鄾擋v耶 柰貘戍 式醨舌鷽柅洃耶 鏼~ Unix (root) Windows NT (Administrator) 鶔巰 板 板 茫韄養酨灥 板 板 飁 板 騶 (巷表柰貘戍祗腦) 鶔s 板 騶 (巷表柰貘戍祗腦) : NTFS 秏\o鏼~彀鸅朵柼鸉耶 Administrator 媥蛈瑔i鄧鐀顟蘠歈 o鏼~耍 妄長鼖擋戍柞枵\養v耶 ------------------------------------------------------------------------ 4.17 醨 Data Links File System Filter (DLFF) 揅壧戍韄瘐 鞮養鄧鶔 dlfs_cfg 耍 醨 Data Links File System Filter (DLFF) 揅壧戍韄 瘐耶dlfs_cfg | strload 鎈搨僝枵X韥獛搨瓬歧呃囓耶 戍鑅彀 /usr/lpp/db2_07_01/cfg/ 到耶 zL襶膣耍柛養彀 /etc 到 o譇耶 dlfs_cfg 戍搨愩柰胃 d 'driver-name' 'vfs number' 'dlfm id' 'global message priority' 'global module priority' - 0 1 珫胃 d d 囓肄繐枵X韥獛搨耶 driver-name driver-name 板繐枵戍X韥獛搨戍蘠鬷尚耶蜙p耍 DB2 次劑 7 戍蘠鬷尚 板 /usr/lpp/db2_07_01/bin/dlfsdrv耶X韥獛搨巰投板 dlfsdrv耶 vfs number o板 DLFS 彀 /etc/vfs 珫戍 vfs 醳耶 dlfm id o板 DataLinks Manager 扯z舌戍媥蛈 ID耶 global message priority o板毗鬞昔暉樺鐀 global module priority o板毗研撌u樺鐀 0 1 0 1 板擋鉈擔殛X韥獛搨唏盎躒貂戍洟戠耶 躒貂巰投板醨洟戠衣 閭Q盎戍X韥獛搨躒貂巰投鉈擔戍耶 養聤櫹L 5 譇鄧柼戍洟戠 (0-4)耶 {珫戍削蒝i愩柰胃 d /usr/lpp/db2_07_01/bin/dlfsdrv 14,208,255,-1 - 0 1 |韄戍鬞昔板祼 global message priority 瓬 global module priority 戍]肄 襏椴肄耶 礔繐醨韄瘐耍鞮養鄧鶔 global message priority 戍襏耶 嗀 4 譇鬞昔暉樺鐀養鄧媥蚼G #define LOG_EMERGENCY 0x01 #define LOG_TRACING 0x02 #define LOG_ERROR 0x04 #define LOG_TROUBLESHOOT 0x08 毠倌 DLFF 珫戍鬞昔媥 LOG_TROUBLESHOOT 鏼長鬞昔暉樺鐀耶 o斖板柜儱鋅 歧呃削蒤G 愩刖鞮襁戍茫繐(emergency)鬞昔瓬砷鬞昔耍 巷醨 dlfs_cfg 黂鑅珫戍毗 鬞昔暉樺鐀]肄長 5 (1+4)胃 d /usr/lpp/db2_07_01/bin/dlfsdrv 14,208,5,-1 - 0 1 愩刖骷茫繐砷鬞昔耍巷醨毗鬞昔暉樺鐀]肄長 4胃 d /usr/lpp/db2_07_01/bin/dlfsdrv 14,208,4,-1 - 0 1 愩刖鞮茫繐 DLFS 韄耍 屑醨毗鬞昔暉樺鐀]肄長 0胃 d /usr/lpp/db2_07_01/bin/dlfsdrv 14,208,0,-1 - 0 1 4.17.1 彀揅壧韄鬞昔 愩刖鞮彀揅壧祌茫繐韄耑砷瓬序鬙鬞昔耍 鞮澱鏺 dlfs_cfg 耶 dlfs_cfg 戍鑅彀/usr/lpp/db2_07_01/cfg 到耶 毗鬞昔暉樺鐀澱 鏺]肄長 255 (瘐j暉樺鐀) | 13 (8+4+1)耶 醨暉樺鐀]肄長 13 (8+4+1) | 韄耑砷瓬序鬙鬞耶 彀]肄毗鬞昔暉樺鐀祌耍鬙壧 DLFS L酣鑶蚼A 虋薿s枵 dlfsdrv X韥獛搨鄧彀枵媥釳s戍暉樺鐀襏耶 彀薿s枵 dlfsdrv X韥獛搨祌耍 澱 鏺薿s壧 DLFS L酣鑶蚼C : 托嫀鶔 dlfs_cfg 耍 摃戍 dlfsdrv X韥獛搨枵|媥蛌縥P dlfs_cfg ]肄襏耶 ------------------------------------------------------------------------ 4.18 媥 SMIT 鬙揅壧 DLFM 祅麩養|颳オ鴉戍鐖 彀雚揅壧 Data Links Manager 戍 AIX 鼭齗柼鬙揅壧 DB2 (次劑 5耑6 詰 7) 祌 容耍 巷芋駽柰媴纙J胃 1. 鄧 root 戍蟴楹A媥豜U媴銻樵 /etc/vfs胃 cp -p /etc/vfs /etc/vfs.bak 2. 鬙揅壧 DB2耶 3. 鄧 root 戍蟴楹A擋纙J 1 詻鷽戍樵灥鋅 /etc/vfs胃 cp -p /etc/vfs.bak /etc/vfs ------------------------------------------------------------------------ 4.19 礤絛祌容/讘肄遭q巰投 鞮澱鏺讘肄臠柜鬧 DB2 再齗瓬膣再齗戍巰投耶鞮澱鏺繐何Do遭q巰 投耍浂ъ揅壧鏼~耶 彀s鼪赴DB2 Data Links 扯z獛搨赳耍DB2 UDB 再齗|洇哥鷫柰媴鬞 DLFM胃 * 定巰投 * 蜙W投 * 遭q巰投 潒 DLFM |醨殛鬞烈擂戍洇郎〝鏼洃耍 鄧讘肄板騶委\s哎歈擔耶骷嗀 定巰投耑蜙W投碉遭q巰投戍槷X洄媥 dlfm add_db 銻銳 DLFM 耍 s哎浂|歈擔耶彀 dlfm add_db 銻珫媥蛈屁Dq巰投澱鏺碉 DB2 UDB 再齗 詻 洇哥鷫戍遭q巰投蘠曄虎耶 媥袛H柰媴搨詻隳戍遭q巰投胃 1. 彀 DB2 再齗柼枵 hostname 銻耶蜙p耍殛銻養|廌 db2server耶 2. 拚鶅鞮戍樹鬧耍鸉柰媴珫柜醳胃 o 彀 AIX 柼耍枵 host db2server 銻耍珫 db2server 板樺容纙J珫 詻隳戍巰投耶 o譇銻睦欑|廌ю柰媴戍鋇胃 db2server.services.com is 9.11.302.341, Aliases: db2server o 彀 Windows NT 柼耍枵 nslookup db2server 銻耍珫 db2server 板 樺容纙J珫詻隳戍巰投耶 o譇銻睦欑|廌ю柰媴戍鋇胃 再齗胃dnsserv.services.com 鶐胃9.21.14.135 巰投胃db2server.services.com 鶐胃9.21.51.178 o 彀 Solaris 柼耍枵 cat /etc/hosts | grep 'hostname'耶愩刖遭q 巰投彀 /etc/hosts 珫肄鰗巰投耍 屑o譇銻睦欑|廌ю 柰媴戍鋇胃 9.112.98.167 db2server loghost 愩刖遭q巰投肄鰗巰投耍屑銻|廌ю柰媴戍鋇胃 9.112.98.167 db2server.services.com loghost 彀媥 dlfm add_db 銻銳 DB2 UDB 定巷擋 db2server.services.com 鏼 長遭q巰投耶 愩刖彀 dlfm add_db 銻珫媥袛摃擂戍顢巰耍 屑 DB2 再齗 洇哩 DLFM 戍s哎|噬韖耶 礔繐醨 Data Links 再齗銳 DB2 定耍 養媥 DB2 "add datalinks manager for database database_alias using node hostname port port_number" 銻耶 hostname 板 Data Links 再齗戍巰投耶彀殛銻珫養媥袛摃 Data Links 再齗 戍嗀顢巰耶 囓靲 Data Links 再齗戍 DATALINK 襏澱鏺擋 URL 襏鉈肄 hostname胚 饓彀 URL 襏聤 DATALINK 托耍澱鏺媥 "add datalinks manager" 銻珫詻媥蛈抖W投耶 媥豜嵥戍顢巰醨|y歈 SQL 闉z搨噬韖耶 ------------------------------------------------------------------------ 4.20 媥 DLFM胃雚 DB2 定鵛鞥 DB2 Data Links Manager 戍M韥鏼 ↗媥 DROP DATALINKS MANAGER 銻雚定醨 DB2 Data Links Manager 鵛鞥 耍 銻劑蟴|M腺 DB2 Data Links Manager 戍虎鬞耶媥蛈瑔i鄧腦俊 廇鱌絛鬙膣摃膣定戍耍 鄧瓬樵鬞戍萬搌鐖耶 o養鄧媥 dlfm drop_dlm 銻僛歈耶o譇銻|醨蕶肄定戍詻嗀鬞唏嵥纙戍飁耶DB2 Data Links Manager 澱鏺彀鸉珫耍殛銻浂|歈閱耶 唏鎈薿繐胃殛銻骷彀鵛鞥 DB2 Data Links Manager 祌浂媥蚼F 騶屑耍醨|噬颳腺 DB2 Data Links Manager 戍薿繐鬞耍遮潲妄廌駻耶 礔繐蕶肄定鱌絛鬙膣Bz獛瓬樵鬞戍萬搌鐖胃 1. 鄧赴Data Links 扯z獛搨赳扯z舌蟴瑟n枵鑶蚼C 2. 熪鋇柰媴銻胃 dlfm drop_dlm database instance hostname 珫胃 database 板茗抑 DB2 UDB 定戍巰投胚 instance 板定詻彀戍蒤F hostname 板定詻彀戍 DB2 UDB 再齗戍遭q巰投耶 3. 熡鋇耶 礔茫蘠鬷戍擋妄髕削蒤Aず睦欑愩摃媥軝銻戍柼柰耍巷囓酀 Command Reference耶 洄長殛銻擔柅柜譇s戍砷俄 (巷囓酀4.21, DLFM1001E (s戍砷鬞昔))耶 ------------------------------------------------------------------------ 4.21 DLFM1001E (s戍砷鬞昔) DLFM1001E: 彀 drop_dlm Bz獛熪擁砷耶 廅胃 Data Links Manager 潲妄肄戍定鱌絛鬙膣瓬萬搌鐖Bz獛耶 o養 廅長柰媴柜廅椴熪擁胃 * Data Links Manager 彀鸉珫耶 * 銻珫肄戍定耑蓔袛Dq巰投戍槷X潲耶 * 彀 Data Links Manager 戍柜祅麩再髕噬韖耶 韥鏼胃 巷鸉柰媴纙J胃 1. 俊肄 Data Links Manager 彀鸉珫耶鼖韥 Data Links Manager耍愩刖擂彀 鸉珫耶 2. 俊肄定耑蓔袛Dq巰投戍槷X肄霿柜譇洄銳戍定耶鞮養彀 Data Links Manager 柼媥 "dlfm list registered databases" 銻僰F戍耶 3. 愩刖砷砏潒熪擁耍巷囓 db2diag.log 珫戍鬞耍 照泥板騶嗀摃祅麩 再髕 (蜙p耍Connection Management Service耑 Transaction Management Service 瞉瞉) 噬韖耶圳N db2diag.log 珫戍砷俄耍 虋灥砷俄載柰詻 戍譂↖秝@耶 ------------------------------------------------------------------------ 4.22 DLFM ]肄歧呃醳 dlfm setup dlfm.cfg 醳洄Q颳耶彀麩珫礔嗀瓬耍巷牉鄧落洐C ------------------------------------------------------------------------ 4.23 彀 AIX 柼鸉 Data Links/DFS Script dmapp_prestart 熪擁砷 愩刖銻 /usr/sbin/cfgdmepi -a "/usr/lib/drivers/dmlfs.ext" 噬韖耍椴廌剽俄長 1 (彀鞮鸉 Data Links/DFS Script dmapp_prestart)耍巷揅壧 DFS 3.1 ptfset1 僦儘 cfgdmepi耶 ------------------------------------------------------------------------ 4.24 Tivoli Space Manager 烈 Data Links 鬷幏 DB2 Data Links Manager {彀洄爩嗀 Tivoli Space Manager 閱柼戍暉貂耶 Tivoli Space Manager Hierarchical Storage Manager (HSM) 雚膼爢{搨 |椻韥醨 幏騥暖酨耍鄧@劑抑鑶豜W蕶肄柳歃戍養擋繾耶 ≡s灥騥戍 耍|椻韥薿s碰駒o耍椴遮委\媥蛈稢騥瓬薿s碰駒蕶肄戍耶 腺詻媥袚鑶豜李t茫繐肄齔鵱柧柳暖酨 (珫戍鑶蛈繾茫繐彀柜 嗜柼扯z) 戍毠悚祌朗椴躨耍o譇s蕶詫嗀盞饎耶 Tivoli Space Manager 容虪柜妄鄑噠z\愫朗戍柧柳暖酨耶 Tivoli Space Manager 戍 DB2 Data Links Manager s閱虪鶔毠戍泉詫鄑噠z DATALINK 繾耶 Tivoli Space Manager 委\肄齔怠鬷 Data Links 扯z戍鑶釴t鑅耍 鞻儘鎈 媥郫裁兼]躨G椴癚鑶酚之郎攻弒耍椴茫繐彀詻嗀養暖酨腺珫戍 DB2 Data Links Manager 鑶豜秏w樺黂鑅貜爦戍繾耶 s柱 Data Links 烈 HSM 儭鑶 鄧 Hierarchical Storage Management (HSM) 熡韄鑶蚸耍 巷樺鄧 HSM 熡韄嫀鄧 DataLinks File Manager 熡韄耶 1. 熡韄 HSM 耍巷媥蛃銻 "dsmmigfs add /fs"耶 2. 熡韄 DLM 耍巷媥蛃銻 "dlfmfsmd/fs"耶 鑶蛈 Data Links 儭zL柰媴熡到耍瓮杯彀 HSM 鑶蛈 /etc/filesystems 祌沮蠮珫胃 vfs = dlfs mount = false options = rw,Basefs=fsm nodename = - s柱 Data Links 儭{酨戍 HSM 鑶 熡韄 DLM 耍巷媥蛃銻 "dlfmfsmd/fs"耶 s柱 HSM 儭{酨戍 Data Links 鑶 1. 熡韄 HSM 耍巷媥蛃銻 "dsmmigfs add /fs"耶 2. 熡韄 DLM 耍巷媥蛃銻 "dlfmfsmd/fs"耶 雚 Data Links-HSM 鑶釹齁 Data Links 儭 齁 Data Links 儭耍巷媥蛃銻 "dlfmfsmd -j /fs"耶 雚 Data Links-HSM 鑶釹齁 HSM 儭 1. 齁 HSM 儭耍巷媥蛃銻 "dsmmigfs remove /fs"耶 2. 齁 Data Links 儭板 "dlfmfsmd -j /fs"耶 3. 熡韄 DLM 耍巷媥蛃銻 "dlfmfsmd/fs"耶 雚 Data Links-HSM 鑶釹齁 Data Links 烈 HSM 儭 1. 齁 HSM 儭耍巷媥蛃銻 "dsmmigfs remove /fs"耶 2. 齁 Data Links 儭耍巷媥蛃銻 "dlfmfsmd -j/fs"耶 4.24.1 閱貙 劑閱容譧儭彀 AIX 柼媥蚼C FC (Read permission DB) 膣戍詫騥 (dsmmigrate) 瓬灥廌骷睦墨 root 媥蛈祽歈耶 彀 Read Permission DB 長 DataLink Manager Administrator (dlfm) 戍 餼如柰耍詫騥骷墨嗀舌鸉耶礔繐酨灥oю悚耍 屑茫繐遭 q定抑戍韄耶 鸅柜茫繐韄戍媥蛈猼 root 媥蛈猺Croot 媥蛈 Read Permission DB 鸉詫騥瓬灥廌洃委耶譧彀柜歃騥 耍 dlfm 媥蛈瘐~媥軝戍韄騥 FC 耶礔彀灥廌祌覃濆柫歃 騥耍 殛鏼~|噬韖耍廌砷鬞昔 "ANS1028S 洇剜{搨砷耶 巷皖翪朗 再髕鋅式耶" 唏 root 媥蛈碔L妄 FC 鸉 dsmmigrate耶柜椴躨耍殛 貙酨灥再齗柼 戍扯z舌洋T毠耶 stat 碉 statfs 鑶袑I駒|醨 Vfs ю悚ず長 fsm耍椴唏ず長 dlfs耍 潒 dlfs 壧彀 fsm 祌柼耶 柼翷長鋅式 dsmrecalld 鎈鏮獛搨戍儘鎈閱耍彀鑶豜W鸉 statfs 鈮茠d Vfs ю悚板騶長 fsm耶 礔戍瘐p inode 襶俄長 FC (Read permission DB) 膣戍襶俄耍 屑銻 "dsmls" ず摃鋇 dsmls 銻ю ls 銻耍媴墨 TSM 扯z戍耶 茫繐媥蛈稘秝@ ------------------------------------------------------------------------ 4.25 4 揅壧碉歧呃 DB2 Data Links Manager for AIX 4.25.1 柜揅壧圳N醳 4.25.1.1 雚 DB2 File Manager 次劑 5.2 騥 DB2 Data Links Manager 次劑 7 纙J 3 珫戍鬞儘俊耶纙J 3 睦愩柰詻胃 "3. 鄧 DLFM 扯z舌蟛鰣A鸉 /usr/lpp/db2_07_01/adm/db2dlmmg 銻耶 ------------------------------------------------------------------------ 揅壧烈歧呃銬 ------------------------------------------------------------------------ 5.1 5 彀 UNIX 鏼~鑶豜W揅壧 DB2 雚膼 5.1.1 HP-UX 眃獛搨歧呃囓 ]肄 HP-UX 眃獛搨囓砷鋇 msgmbn 瓬 msgmax 睦欑]肄長 65535 詰鶔 囍耶譇囓睦欑]肄長 65535耶 ------------------------------------------------------------------------ 5.2 12 鸉鞮椻洳戍睦擋獛搨 5.2.1 媥 Run-Time Client s膣定洢擋獛搨 Run-Time Client 擋僯s膣定洢擋獛搨 (枵耑鋇耑薿摮B祺銻Bz 齗)耍 遮 DB2 CLI |彀定養鄧媥袚祌容醨s膣臠柜譇定耶 鞮澱 鏺擋 DB2 Administration Client 詰 DB2 Application Development Client耶 彀定養鄧媥釤o定洢擋獛搨碉 DB2 CLI s膣祌容耍澱鏺醨欑定碉 擂謰祌繾灁s鼪耶 蓔U耍愩刖鞮媥豜嵥鏼~鑶蛈抖h薿雚膼鱄A詰板嵥 戍 DB2 次劑詰再髕獛搨瞉耍鞮澱鏺矙柼s膣嵧譇鏼~鑶袑M DB2 次劑槷X戍洢擋 獛搨耶 5.2.2 UNIX 雚膼蠮媥 ODBC 酨灥 DB2 彀 12 (赴鸉鞮椻洳戍睦擋獛搨赳) 珫耍 鄧 ODBC 雚膼鷛擋獛搨詰 ODBC SDK 靲w壧 ODBC X韥獛搨扯z獛搨耍 屑茫繐鶔s odbcinst.ini耶 o皇戍祗 妄眈儘俊耶廅長耍♂z揅壧 Merant ODBC X韥獛搨扯z獛搨恙耍屑茫繐鶔s odbcinst.ini耶 ------------------------------------------------------------------------ 5.3 24 ]鑅皖幏鑶釱靲s灥愫薿僬 5.3.1 皖幏鑶 DB2 皖幏鑶蛌O柜 DBMS 戍蕶屆ю悚耶 皖幏鑶袛i旚z泥欒虋跌灥彀醋 DBMS 柼戍耍蜙p Oracle耑Sybase 瓬 Microsoft SQL Server耶 SQL 闉z搨養鄧囓 愫薿 DBMS 詰柜闉z搨珫戍譇顢定耶 蜙p耍鞮養鄧膣幏彀 DB2 Universal Database 式耑Oracle 式瓬 Sybase 蘞浀+浀材耶 儭戍 DBMS 霄服 Oracle耑Sybase耑Microsoft SQL Server (for Windows NT) 瓬 DB2 Universal Database 鑶媴戍歈 (愩 DB2 for OS/390耑DB2 for AS/4000 瓬 DB2 for Windows)耶 DB2 皖幏鑶袛]鰗爩嗀 DB2 膃抖再齗 (定醨鄧皖幏定再) 鄧瓬柜譇詰 愫譇僬垠C 皖幏定霄鰗ル顢僬峙釱詫戍到熡到耶 僬姥]鰗 DBMS 瓬耶DB2 Universal Database 嗀q埔灨肄耍投長鴉柳耍鞮養鄧媥釱靲s灥 o僬垠C 鴉柳板柜鼭耍皖幏再齗擋殛鼭僯q埔瓬跌灥僬咻材 耶 皆巰板擋僤光靲彀僬峙浀圻〝烈蘞浀#C 睦擋獛搨s鼪皖幏 定耍餪摃醋 DB2 定耶 鞮媥蛈屁~柳板鄧 DB2 Universal Database 儘彀 鸉戍樹鬧長祼擳C 彀皖幏鑶釤]肄祌耍養鄧酨灥僬峙浀材鬞耍饓嵋b柜譇毠悚定珫耶 媥 舌瓬睦擋獛搨鷫泥欒柜譇皖幏定耍擂雚僬奎^灥耶 DB2 皖幏鑶軝b倌瓘蹠柰鵩鏼耶牁燽搨繐臡貙彀 DB2 次劑 7 珫灁鸅佐@~耶 殛鴉耍鞮鸉烈皆巰虎瓮戍洢擋獛搨鏼~ ( LOAD耑REORG耑REORGCHK耑IMPORT 耑RUNSTATS 瞉瞉)耶 椷板耍鞮養鄧媥釤zq鼭耍媥蚽P欑僬囿糒戍 SQL 擋 砰耍醨 DDL 瓬 DML 闉z搨托鼪鋇 DBMS耶 5.3.1.1 貙 次劑 7.2 戍s鴉柳 (愩 Linux 瓬 Solaris 柼戍 Oracle耑 AIX 瓬 Solaris 柼戍 Sybase 瓬 NT 瓬 AIX 柼戍 Microsoft SQL Server) 養擋腺 FixPak 3胚鞮澱鏺菸 曤 DB2 Relational Connect 次劑 7.2耶 5.3.2 揅壧 DB2 Relational Connect 劑躒虪彀再齗柼揅壧 DB2 Relational Connect 戍銻耍鞮醨鄧欑再齗鏼長皖 幏鑶軝再齗耶 5.3.2.1 彀 Windows NT 再齗柼揅壧 DB2 Relational Connect 彀鞮醨 DB2 Relational Connect 揅壧彀鞮戍 Windows NT 皖幏再齗祌容胃 * 巷俊肄皖幏再齗柼嗀揅壧 DB2 Universal Database Enterprise Edition 詰 DB2 Universal Database Enterprise -- Extended Edition耶 礔鞮橘醨 DB2 鑶媴定枵鞮戍牁燽搨繐臡珫耍屑♂z揅壧 DB2 Universal Database 耍 鞮澱鏺灥 Distributed Join for DB2 僬咧醳耶 礔繐ъ洄殛 醳耍巷照泥 FEDERATED 囓板]肄長 YES耶 鞮養鄧熪鋇 GET DATABASE MANAGER CONFIGURATION 銻照泥殛]肄耍擂|ず詻嗀囓瓬{]肄襏耶 * 巷俊肄鞮洄彀皖幏再齗柼揅壧僬咻攸q膼襴n (愩 Sybase Open Client)耶 1. 鄧鞮長柅鸉揅壧詻擔戍媥蛈碖b熡枵鑶蚼C 2. 知摃鸉珫戍獛搨耍揅壧獛搨浂稒僦n臡僛rs耶 3. 碰駒揅壧獛搨耶鞮養鄧椻韥搨詰鄧柤泚搨鉊I駒揅壧獛搨耶 礔揅壧獛搨潲 妄椻韥鼖韥耍詰鞮Q繐鄧嵥戍砰躨鸉揅壧耍巷鄧柤泚搨碰駒揅壧獛搨耶 o 礔繐椻韥碰駒揅壧獛搨耍巷醨 DB2 Relational Connect CD 麰枵忪忘鼭 珫耶椻韥鸉蕶詫|椻韥鼖韥揅壧獛搨耶 讘肄鑶蚽y躨耍虋鼖韥欑砰躨戍 揅壧獛搨耶 o 椻碰駒揅壧獛搨胃 a. 柜柰礤絛耍灥鸉醳耶 b. 彀礤鼖珫耍枵柰媴銻胃 x:\setup /i language 珫胃 x: 鋅式鞮戍 CD-ROM 麾忘鼭耶 language 鋅式鞮砰躨戍俄 (愩 EN 板禭)耶 c. 柜柰俊肄耶 饓|礤鼖揅壧熪妮鬧耶 4. 柜柰揅壧耍礤絛揅壧獛耶 5. 芋駽揅壧獛搨珫戍耶 ⊥{搨蘠歈耍DB2 Relational Connect 烈擂 DB2 恙醨|揅壧彀鞮戍揅壧 到珫耶 5.3.2.2 彀 AIX耑Linux 瓬 Solaris 鏼~蜙再齗柼揅壧 DB2 Relational Connect 彀鞮醨 DB2 Relational Connect 揅壧彀鞮戍 AIX耑Linux 瓬 Solaris 鏼~蒫p幏 再齗祌容胃 * 巷俊肄皖幏再齗柼嗀揅壧 DB2 Universal Database Enterprise Edition 詰 DB2 Universal Database -- Extended Edition耶 礔鞮橘醨 DB2 鑶媴定 枵鞮戍牁燽搨繐臡珫耍屑♂z揅壧 DB2 Universal Database 耍鞮澱鏺灥 Distributed Join for DB2 僬咧醳耶 礔繐ъ洄殛醳耍巷照泥 FEDERATED 囓板]肄長 YES耶 鞮養鄧熪鋇 GET DATABASE MANAGER CONFIGURATION 銻照泥殛]肄耍擂|ず詻嗀囓瓬{]肄襏耶 * 巷俊肄鞮洄彀皖幏再齗柼揅壧僬咻攸q膼襴n (愩 Sybase Open Client)耶 礔繐醨 DB2 Relational Connect 揅壧彀鞮戍 AIX耑Linux 瓬 Solaris 鏼~蜙再 齗耍 巷媥 db2setup 洢擋獛搨胃 1. 鄧拚v貙媥蛈碔n枵耶 2. 麰枵虋壧鞮戍 DB2 恙 CD-ROM耶嗀壧 CD-ROM 戍鬞耍 巷囓酀AIX t枵耶 3. 枵 cd /cdrom 銻 (珫 cdrom 板鞮戍恙 CD-ROM 戍壧貂)耍鄧鶔壧 CD-ROM 戍到耶 4. 枵 ./db2setup 銻耶彀騂牁筑耍 饓|礤鼖赴DB2 揅壧洢擋獛搨赳甇耶 5. 灥揅壧耶饓|礤鼖赴揅壧 DB2 V7赳甇耶 6. 矧鞮雚膼鬫 DB2 Relational Connect 恙耍蜙p耍 Relational Connect for Sybase耍虋鄧灥耶♂z灥醳耍饓|鋇{枉 襶耶 7. 灥俊肄耶 饓|礤鼖赴擔 DB2 再髕赳甇耶 8. 鞮養鄧擔 DB2 蒤C灥俊肄耶 饓|礤鼖赴免繐鬑揅壧赳甇耶|椻 韥揅壧譇醳胃 Oracle 戍牁燽搨膣幏瓬 DB2 Relational Connect 戍赴恙 癸韄赳耶赴恙癸韄赳板澱繐戍耍養旚zs鼪 Sybase 僬垠C 9. ~鸉耶 饓|鋇{柜甇耍鋇o板鞮欘 Relational Connect 戍 鼭|耶 俊肄鄧~鸉揅壧耶養繐騂牁策妝繾浂蘠歈揅壧耶 10. ∥q何鋇{耍鋇揅壧洄鐀顟蘠歈耍巷灥俊肄耶赴免繐鬑赳鋇{耍鋇 謦柜譇揅壧醳戍歈閱詰噬韖胚巷嫀歃灥俊肄耶 ≡w壧蘠歈耍DB2 Relational Connect 烈擂 DB2 恙醨揅壧彀到珫耶彀 AIX 柼耍殛長 /usr/lpp/db2_07_01 到耶彀 Solaris 柼耍 殛長 /opt/IBMdb2/V7.1 到耶彀 Linux 柼耍 殛長 /usr/IBMdb2/V7.1 到耶 ------------------------------------------------------------------------ 5.4 26 酨灥 Oracle 僬 柅儭 AIX 瓬 Windows NT 柼戍鴉柳耍DB2 Universal Database 柛儭 Linux 瓬 Solaris 鏼~蓔W戍 Oracle 鴉柳耶 殛儭貙腺 Oracle 次劑 8耶 礔繐酨灥o 樹鬧戍鴉柳耍鞮茫繐麰枵 V7.2 DB2 Relational Connect CD耍虋灥 DB2 Relational Connect for Oracle 僬垠C 柜氅鞮揅壧柅 DB2 Relational Connect耍鞮養鄧醨 Oracle 僬拮s柱皖幏再 齗珫胃 1. 彀 DB2 皖幏再齗柼揅壧瓬歧呃 Oracle 雚膼襴n耶 2. db2dj.ini 虋熪鋇 db2set 銻耍鄧]肄僬奐耶 3. 腺 UNIX 樹鬧柼鸉戍 DB2 皖幏再齗耍巷鸉 djxlink Script耍醨 Oracle SQL*Net 詰 Net8 定膣哀鞮戍 DB2 皖幏再齗耶 4. 俊肄洄鶔s SQL*Net 詰 Net8 tnsnames.ora 耶 5. 薿s媥 DB2 蒤C 6. 擔鴉柳耶 7. 擋戍胃]肄 DB2_DJ_COMM 耶 8. 擔再齗耶 9. 擔媥蛈稗杯耶 10. 擔式烈蘞浀’妞砯W耶 嗀o纙J戍耍霄服]肄耍養腺赴 26 赳耶 ]鑅皖幏鑶釱靲s 灥 DB2 揅壧烈歧呃銬珫戍 Oracle 僬垠C 5.4.1 麩砷 彀"s柱 Oracle 僬待皖幏鑶"沮蠮嗀柰媴砷胃 * 獛珫坑柅柜譇纙J耶儘俊戍纙J長胃 1. 囓楯 Oracle 虪戍麩耍彀 DB2 皖幏再齗柼揅壧瓬歧呃 Oracle 雚 霠n耶 2. db2dj.ini 虋熪鋇 db2set 銻耍 鄧]肄僬奐耶 db2set 銻|擋鞮戍]肄襏鶔s DB2 ]肄熡到耶 嗀]肄戍欏鉈養腺赴 26 赳耶]鑅塒幏鑶釱靲s灥 DB2 揅壧烈歧呃銬珫戍 Oracle 僬垠C 3. 腺 UNIX 樹鬧柼鸉戍 DB2 皖幏再齗耍巷鸉 djxlink Script耍 醨 Oracle SQL*Net 詰 Net8 定膣哀鞮戍 DB2 皖幏再齗耶 拚鶅 鞮戍樹鬧耍djxlink Script 戍鑅彀胃 /usr/lpp/db2_07_01/bin on AIX /opt/IBMdb2/V7.1/bin Solaris /usr/IBMdb2/V7.1/bin Linux 骷嗀彀 DB2 皖幏再齗柼揅壧 Oracle 戍雚膼襴n祌耍浂鸉殛 Script耶 * 麩鋇繐]肄胃 DB2_DJ_INI = sqllib/cfg/db2dj.ini o板儘俊戍耍睦欑]肄愩柰胃 DB2_DJ_INI = $INSTHOME/sqllib/cfg/db2dj.ini ------------------------------------------------------------------------ 5.5 酨灥 Sybase 僬 (s柱躒) 彀鞮醨 Sybase 僬拮s柱皖幏再齗祌容耍鞮澱鏺醨 Sybase Open Client n 揅壧虋歧呃彀 DB2 皖幏再齗柼耶 巷囓酀麩珫戍揅壧獛耍廈衣彀 Sybase 定n珫耍鄧灥隳愩摃揅壧 Open Client n戍蕶肄腦酯C 廅長板揅壧戍柜 樵耍巷俊肄霄服柅悚到暖酨獛瓬 Sybase Open Client 定耶 礔繐]肄皖幏再齗耍鄧酨灥暖酨彀 Sybase 僬咻材耍鞮澱鏺胃 1. 揅壧 DB2 Relational Connect 次劑 7.2耶 巷囓酀5.3.2, 揅壧 DB2 Relational Connect耶 2. s柱 Sybase 僬待鞮戍皖幏再齗珫耶 3. 肄 Sybase 戠俄贄耶 劑頀纙J 2 瓬 3耶 劑戍養矧擋彀 Windows NT耑AIX 瓬 Solaris 鏼~蒤C蕶肄樹鬧戍嵥B 腺熪擁戍廇耶 5.5.1 s柱 Sybase 僬待皖幏再齗 礔繐s柱 Sybase 僬待皖幏再齗耍鞮澱鏺胃 1. ]肄虋鶔s]肄熡到耶 2. 醨 DB2 膣 Sybase 雚膼襴n (譧 AIX 烈 Solaris) 3. 薿s媥 DB2 蒤C 4. 擔虋]肄祊貘耶 5. 擔鴉柳耶 6. 擋戍胃]肄 DB2_DJ_COMM 耶 7. 擔再齗耶 8. 擋戍胃]肄 CONNECTSTRING 再齗醳耶 9. 擔媥蛈稗杯耶 10. 擔式烈蘞浀’妞砯W耶 劑躒醨o纙J鏼欏鄏材楹C 5.5.1.1 纙J 1胃]肄虋鶔s]肄熡到 db2dj.ini 虋熪鋇 db2set 銻耍 鄧]肄僬奐耶db2dj.ini 霄鰗柅揅壧彀皖幏再齗柼戍 Sybase 雚膼襴n祌歧呃鬞耶db2set 銻|擋 鞮戍]肄襏鶔s DB2 ]肄熡到耶 彀牁蛈材定鑶豜洐A鞮養鄧媥郔S屆蓔浀孛蜙躒貂祌柜 db2dj.ini 耍 詰媥郔S屆蓔浀彷@詰愫譇躒貂祌鸅柜戍 db2dj.ini 耶 冀牁蛈材定鑶 珫耍臠柜蜑埲i嗀柜譇 db2dj.ini 耶 礔繐]肄胃 1. 哀彀 sqllib/cfg 戍 db2dj.ini耍虋]肄柰媴胃 SYBASE="" 珫 板 Sybase 雚膼攥w壧戍到耶 2. 鄧 Sybase 僛rs DB2 膃 .profile 耶 鞮養鄧熪鋇柰媴銻 僤鬾殛韥鏼胃 export PATH="$SYBASE/bin:$PATH" export SYBASE="" 珫 板 Sybase 雚膼攥w壧戍到耶 3. 繐鸉 DB2 .profile耍巷枵胃 . .profile 4. 熪鋇 db2set 銻耍擋鞮戍鶔僛rs DB2 ]肄熡到耶 殛銻戍砰妄 db2set耍板鄧鞮戍定鑶逌呃長祼擳C 礔鞮儘彀柰媴摃定鑶逌呃 珫媥 db2dj.ini 耍浂茫繐殛纙J胃 礔鞮儘彀冀牁釬定鑶豜秕媥 db2dj.ini 耍 詰鞮繐 db2dj.ini 譧矧擋腺容戍躒貂耍巷熪鋇胃 db2set DB2_DJ_INI = sqllib/cfg/db2dj.ini 礔鞮儘彀牁釬定鑶豜秕媥 db2dj.ini 耍 詰鞮繐 db2dj.ini 珫 戍襏矧擋腺殛膃孛蜙躒貂耍巷熪鋇胃 db2set -g DB2_DJ_INI = sqllib/cfg/db2dj.ini 礔鞮儘彀牁釬定鑶豜秕媥 db2dj.ini 耍 詰鞮繐 db2dj.ini 珫 戍襏矧擋腺蕶肄戍躒貂耍巷熪鋇胃 db2set -i INSTANCEX 3 DB2_DJ_INI = sqllib/cfg/node3.ini 珫胃 INSTANCEX 鋅式蜙W投耶 3 鋅式媴彀 db2nodes.cfg 戍躒貂襶俄耶 node3.ini 鋅式 db2dj.ini 戍瓬鶔巰次劑耶 5.5.1.2 纙J 2胃醨 DB2 膣 Sybase 雚膼襴n (譧 AIX 烈 Solaris) 礔繐鼖擋酨灥 Sybase 僬垠ADB2 皖幏再齗澱鏺膣哀雚膼鷛定耶 膣哀獛鄧皖幏再齗醨q埔戍僬持鉈擔臠柜譇僬咻屁~柳耶♂z鸉 djxlink Script 耍擔鴉柳定耶 礔繐熪鋇 djxlink Script ю悚胃 djxlink 5.5.1.3 纙J 3胃薿s媥 DB2 礔繐俊肄]肄腺獛搨珫耍巷薿s媥 DB2 蒤C ♂z薿s媥蚸膌耍駻 s DB2 蒝H鼪鞮詻鏼戍鶔耶 熪鋇柰媴銻鄧薿s媥 DB2 蒤G 彀 DB2 for Windows NT 再齗柼胃 NET STOP instance_name NET START instance_name 彀 DB2 for AIX 瓬 Solaris 再齗柼胃 db2stop db2start 5.5.1.4 纙J 4胃擔虋]肄祊貘 礔繐擔虋]肄祊貘耍鞮澱鏺擔虋媟養酨灥耶 1. 媥 Sybase 虪戍洢擋獛搨鉈擔祊貘耍霄服Q酨灥戍詻嗀 Sybase Open Server 戍耶巷囓酀 Sybase 戍揅壧麩耍鄧灥隳嗀媥軝洢擋獛搨 戍欏僝鬞耶 Windows NT q鎈醨殛祺巰長 sql.ini耶 醨鞮擔戍耍雚 sql.ini 薿s祺巰長 interfaces耍 長毗擋腺詻嗀樹鬧戍祺巰耶 礔鞮繐醨 sql.ini 薿s祺巰長 interfaces耍 鞮澱鏺媥 IFILE 囓詰 CONNECTSTRING 醳耍彀纙J 8 珫嗀祗腦耶 彀 AIX 瓬 Solaris 鑶豜W耍殛板祺巰長 /sqllib/interfaces耶 2. 嬥鐨騇養酨灥 DB2耶 彀 DB2 for Windows NT 再齗柼胃 醨舅鑅彀 DB2 膃 %DB2PATH% 到耶 彀 DB2 for AIX 瓬 Solaris 再齗柼胃 醨舅鑅彀 DB2 膃 $HOME/sqllib 到耶媥 ln 銻耍膣雚 DB2 膃 $HOME/sqllib 到祌耶蜙p胃 ln -s -f /home/sybase/interfaces /home/db2djinst1/sqllib 5.5.1.5 纙J 5胃擔鴉柳 媥 CREATE WRAPPER 闉z搨鉈肄鴉柳耍醨擋靲s灥 Sybase 僬垠C鴉柳板 柜鼭耍皖幏再齗擋殛鼭僯q埔瓬跌灥僬咻材耶 DB2 霄服譇 Sybase 鴉柳胃CTLIB 瓬 DBLIB耶 柰媴削ず CREATE WRAPPER 闉z搨胃 CREATE WRAPPER CTLIB 珫 CTLIB 板 Sybase Open Client n媥蛈杞w]鴉柳巰投耶CTLIB 鴉柳養媥袑 Windows NT耑AIX 瓬 Solaris 再齗耶 鞮養鄧擋鞮戍巰投僓ˇNw]鴉柳巰投耶 椷板耍礔鞮o鷽耍鞮柛澱鏺霄鰗 CREATE WRAPPER 闉z搨戍皖幏再齗祌 LIBRARY 囓瓬鴉柳定戍巰投耶 巷囓酀 DB2 SQL Reference 珫戍 CREATE WRAPPER 闉z搨耍鄧灥隳嗀鴉柳鎈搨定巰投戍欏 僝鬞耶 5.5.1.6 纙J 6胃擋戍胃]肄 DB2_DJ_COMM 礔繐彀酨灥 Sybase 僬咿柱灁耍巷]肄 DB2_DJ_COMM 耶殛| 顣跛板騶繐彀皖幏再齗鱌絛]肄耍枵鴉柳耶 ]肄 DB2_DJ_COMM 鄧霄 服鴉柳定耍 烈鞮彀容柜纙J肄戍鴉柳虎胚蜙p胃 彀 DB2 for Windows NT 再齗柼胃 db2set DB2_DJ_COMM='ctlib.dll' 彀 DB2 for AIX 再齗柼胃 db2set DB2_DJ_COMM='libctlib.a' 彀 DB2 for Solaris 再齗柼胃 db2set DB2_DJ_COMM='libctlib.so' 巷俊肄瞉襶 (=) 戍鑭嗀耶 巷囓酀 DB2 SQL Reference耍鄧灥隳嗀鴉柳鎈搨定巰投戍欏僝鬞耶 巷囓酀 Administration Guide耍鄧灥隳嗀 DB2_DJ_COMM 戍鬞耶 5.5.1.7 纙J 7胃擔再齗 媥 CREATE SERVER 闉z搨鉊w霿臠柜譇Q繐雚珫酨灥僬咻 Sybase 再 齗耍 蜙p胃 CREATE SERVER SYBSERVER TYPE SYBASE VERSION 12.0 WRAPPER CTLIB OPTIONS (NODE 'sybnode', DBNAME'sybdb') 珫胃 SYBSERVER 鋅式鞮肄聤 Sybase 再齗戍巰投耶殛巰投澱鏺板鸅柜戍耶 SYBASE 鋅式鞮繐歧呃酨灥戍僬室蝞狎CSybase 板鸅柜嗀儭戍僬垠C 12.0 鋅式鞮繐酨灥戍 Sybase 次劑耶儭戍次劑嗀 10.0耑11.0耑11.1耑11.5耑11.9 瓬 12.0耶 CTLIB 鋅式鞮彀 CREATE WRAPPER 闉z搨珫肄戍鴉柳巰投耶 'sybnode' 鋅式 SYBSERVER 鎈鏮戍躒貂巰投耶彀祊貘珫灥隳躒貂襏耶 殛襏嗀鱦牁毠洟 柞耶 潒躒貂巰投板肄長醳耍椷殛長 Sybase 僬姜蒟磽妣C巷囓酀 DB2 SQL Reference耍鄧灥隳醋醳戍鬞耶 'sybdb' 鋅式鞮Q繐酨灥戍 Sybase 定巰投耶 5.5.1.8 擋戍胃纙J 8胃]肄 CONNECTSTRING 再齗醳 肄O程襏耑祊貘戍尚烈巰投瓬祊貘戍牁朔毠洟耶 Sybase Open Client 媥釸O程襏僛И_鸉繾眈戍泥欒烈廌睦耶鞮養鄧媥 CREATE SERVER OPTION DDL 闉z搨戍 CONNECTSTRING 醳耍]肄 DB2 戍程襏耶媥 CONNECTSTRING 鉈肄胃 * SQL 泥欒戍O齔繾耶 * 熡枵廌睦戍O齔繾耶 * 巰投祊貘戍尚巰投耶 * 牁朔毠洟耶 .-;-------------------------------. V | >>----+---------------------------+--+------------------------->< +-TIMEOUT-- = --炕----------+ +-LOGIN_TIMEOUT-- = --炕----+ +-IFILE-- = --"string"------+ +-PACKET_SIZE-- = --祅--+ '-;-------------------------' TIMEOUT 肄 DB2 Universal Database 瞉殊摃 SQL 闉z搨戍 Sybase Open Client 祌廌睦戍炕耶seconds 襏彀 DB2 Universal Database 鬷削珫耍板柜譇儘 鬷耶鞮肄戍O襏板祼濄z媥蛈屁~柳耶 Windows NT耑AIX 瓬 Solaris 再齗養鄧顟擋 DBLIB 鴉柳耶DBLIB 鴉柳戍w]襏板 0耶 彀 Windows NT耑AIX 瓬 Solaris 再齗柼耍DBLIB 戍w]襏| DB2 Universal Database 潲貙齔 廇瞉殊廌睦耶 LOGIN_TIMEOUT 肄 DB2 Universal Database 瞉殊 Sybase Open Client 祌廌睦熡枵繐臡戍炕 耶w]襏烈 TIMEOUT 虎嵥耶 IFILE 肄 Sybase Open Client 祊貘戍尚巰投耶 彀 string 珫ル顢戍尚澱 鏺鄧矧襶 (") 鰗服耶 彀 Windows NT 再齗柼耍w]襏板 %DB2PATH%耶 彀 AIX 瓬 Solaris 再齗柼耍w]襏板 sqllib/interfaces耍彀鞮戍 DB2 Universal Database 膃村_絛到珫耶 PACKET_SIZE 肄祊貘戍牁朔毠洟 (祅)耶 礔僬峙儭肄戍牁朔毠洟耍s哎 醨|噬韖耶 ↗C柜譇韄到毠 (蜙p耍醨媴麰枵毠悚式珫)耍柱閭牁朔 毠洟養腦べa柱閭耶 祅樕j洟板柜譇襏耶巷囓酀 Sybase 囓楯銳鄧 灥隳欏僝鬞耶 削蒤G 彀 Windows NT 再齗柼耍媥豜U媴銻耍醨O襏]肄長 60 炕耍虋醨祊貘] 肄 C:\etc\interfaces 珫胃 CREATE SERVER OPTION connectstring FOR SERVER sybase1 SETTING 'TIMEOUT=60;LOGIN_TIMEOUT=5;IFILE="C:\etc\interfaces";' 彀 AIX 烈 Solaris 再齗柼耍媥豜U媴銻耍醨O襏]肄長 60 炕耍虋醨祊貘 ]肄 /etc/interfaces 珫胃 CREATE SERVER OPTION connectstring FOR SERVER sybase1 SETTING 'TIMEOUT=60;PACKET_SIZE=4096;IFILE="/etc/interfaces";' 5.5.1.9 纙J 9胃擔媥蛈稗杯 礔皖幏再齗珫戍媥蛈 ID 烈q俄耍烈 Sybase 珫戍媥蛈 ID 烈q俄嵥耍 巷媥 CREATE USER MAPPING 闉z搨耍媥祐薋媥蛈 ID 烈 Sybase 僬峙牉w霿 戍媥蛈 ID 烈q俄虎洈杯胚蜙p胃 CREATE USER MAPPING FOR DB2USER SERVER SYBSERVER OPTIONS ( REMOTE_AUTHID 'sybuser', REMOTE_PASSWORD 'dayl1te') 珫胃 DB2USER 鋅式鞮擋僰杯媥蛈 ID (肄霿腺 Sybase 僬峙) 戍劑抑媥蛈 ID耶 SYBSERVER 鋅式鞮彀 CREATE SERVER 闉z搨珫肄霿戍 Sybase 僬待W投耶 'sybuser' 鋅式鞮繐杯 DB2USER 戍 Sybase 僬咻杜媥蛈 ID耶殛襏嗀鱦牁毠洟柞耶 'dayl1te' 鋅式烈 'sybuser' 虎戍q俄耶殛襏嗀鱦牁毠洟柞耶 巷囓酀 DB2 SQL Reference耍鄧灥隳醋醳戍欏僝鬞耶 5.5.1.10 纙J 10胃擔式烈蘞浀’妞砯W 肄彀鞮戍 Sybase 僬峙浀杜C柜譇蘞浀☆蛈〝戍皆巰耶 ♂z泥欒 Sybase 僬咿耍醨媥釤o皆巰耶 Sybase 皆巰嗀鱦牁毠洟柞耶醨找瓬式巰投鄧矧 襶 (") 鰗服耶柰媴削ず CREATE NICKNAME 闉z搨胃 CREATE NICKNAME SYBSALES FOR SYBSERVER."salesdata"."europe" 珫胃 SYBSALES 鋅式 Sybase 式詰蘞浀’攸M擋皆巰耶 SYBSERVER."salesdata"."europe" 鋅式芋駽柰媴搨戍柧倔準仰O戠胃 data_source_name."remote_schema_name"."remote_table_name" 黳鞮Q繐擔皆巰戍臠柜譇式詰蘞浀#A薿殛纙J耶 ♂z擔皆巰耍DB2 醨 媥釤s哎鄋d欒僬垣爸鴙C 殛泥欒|鵃灚s鼪僬咻圻爭A耶 礔s哎潲妄 B鏼耍鞮|鼪搌柜譇砷鬞昔耶 巷囓酀 DB2 SQL Reference耍鄧灥隳嗀 CREATE NICKNAME 闉z搨戍欏僝鬞耶嗀 柜皆巰瓬ъю悚杯戍欏僝鬞耍巷囓酀 DB2 Administration Guide耶 5.5.2 肄 Sybase 戠俄贄 殛纙J譧彀 DB2 皖幏再齗瓬 Sybase 再齗鸉嵥戍戠俄贄浂茫繐耶媥蚽P DB2 虎嵥戍戠俄鐖祌僬峙茫繐黈耶 柰媴式虪 柜赴奄砰躨儭 (NLS)赳戠俄贄戍嵥瞉 Sybase 醳耶 鞮戍 Sybase 僬囿[呃澱鏺烈砰N虎 耍詰舌雚膼爢{搨俄澱鏺爦灝鵃戍砰N耍虋醨癸長砷耑詰媥釱劑 戍砰N僰杯耶 礔雚絛戠俄贄癸戠俄贄耍黈式耍屑 DB2 |熪 鋇砷鬞昔耶 巷囓酀鞮戍 Sybase 麩鄧灥隳欏僝鬞耶 式 1. 赴Sybase 戠俄贄赳醳 戠俄贄 嵥瞉 Sybase 醳 850 cp850 897 sjis 819 iso_1 912 iso_2 1089 iso_6 813 iso_7 916 iso_8 920 iso_9 ------------------------------------------------------------------------ 5.6 媥 ODBC 酨灥 Microsoft SQL Server 僬 (s柱躒) 彀鞮醨 Microsoft SQL Server 僬拮s柱 DB2 皖幏再齗祌容耍 鞮澱鏺醨 ODBC X韥獛搨揅壧虋歧呃彀皖幏再齗柼耶 巷囓酀麩珫戍揅壧獛耍廈衣彀 ODBC X韥獛搨耍鄧灥隳愩摃揅壧 ODBC X韥獛搨戍蕶肄腦酯C 礔繐]肄皖幏再齗鄧酨灥暖酨彀 Microsoft SQL Server 僬咻材耍鞮澱 鏺胃 1. 彀皖幏再齗柼揅壧虋歧呃 ODBC X韥獛搨耶 巷囓酀麩珫戍揅壧獛耍廈 衣彀 ODBC X韥獛搨耍鄧灥隳愩摃揅壧 ODBC X韥獛搨戍蕶肄腦酯C 彀 DB2 for Windows NT 再齗柼胃 媥 ODBC 壧鑅扯z獛搨歧呃鑶 DSN耶 彀 DB2 for AIX 再齗柼胃 揅壧 MERANT 虪戍鸉次劑耍肄 MERANT 定到長 LIBPATH 珫 戍柜譇熡到耍虋]肄 .odbc.ini 耶彀鱌絛到擔 .odbc.ini 鱌 絛到耶 2. 揅壧 DB2 Relational Connect 次劑 7.2耶 巷囓酀5.3.2, 揅壧 DB2 Relational Connect耶 3. s柱 Microsoft SQL Server 僬待鞮戍皖幏再齗珫耶 4. 肄 Microsoft SQL Server 戠俄贄耶 劑頀纙J 3 瓬 4耶 劑戍養矧擋彀 Windows NT 瓬 AIX 樹鬧耶 蕶肄樹鬧戍嵥B腺熪擁戍 廇耶 5.6.1 s柱 Microsoft SQL Server 僬待皖幏再齗 彀鞮揅壧 ODBC X韥獛搨瓬 DB2 Relational Connect 祌耍媥豜U媴纙J耍醨 Microsoft SQL Server 僬拮s柱鞮戍珫胃 1. ]肄 (譧 AIX)耶 2. 鸉 Shell Script (譧 AIX)耶 3. 擋戍胃]肄 DB2_DJ_COMM 耶 4. 薿s媥 DB2 (譧 AIX)耶 5. 擔鴉柳耶 6. 擔再齗耶 7. 擔媥蛈稗杯耶 8. 擔式烈蘞浀’妞砯W耶 9. 擋戍胃隳 ODBC 鷲耶 柰媴嵧躒醨o纙J鏼欏鄏材楹C 5.6.1.1 纙J 1胃]肄 (譧 AIX) db2dj.ini 虋熪鋇 db2set 銻耍 鄧]肄僬奐耶db2dj.ini 霄鰗鬞戍耍鄧s鼪 Microsoft SQL Server 僬垠Cdb2set 銻|擋鞮戍 ]肄襏鶔s DB2 ]肄熡到耶 彀牁蛈材定鑶豜洐A鞮養鄧媥郔S屆蓔浀孛蜙躒貂祌柜 db2dj.ini 耍 詰媥郔S屆蓔浀彷@詰愫譇躒貂祌鸅柜戍 db2dj.ini 耶 冀牁蛈材定鑶 珫耍臠柜蜑埲i嗀柜譇 db2dj.ini 耶 礔繐]肄胃 1. 哀彀 sqllib/cf$HOME/sqllib/cfg/g 戍 db2dj.ini耍虋]肄柰媴 胃 ODBCINI=$HOME/.odbc.ini DJX_ODBC_LIBRARY_PATH=/lib LIBPATH=/lib DB2ENVLIST=LIBPATH 熪鋇 db2set 銻耍擋鞮戍鶔僛rs DB2 ]肄熡到耶db2set 戍砰妄耍板鄧鞮戍 定鑶逌呃長祼擳C * 礔鞮儘彀冀牁釬定鑶豜秕媥 db2dj.ini 耍 詰礔鞮彀牁蛈材定鑶 豜秕媥 db2dj.ini 耍遮鞮繐 db2dj.ini 珫戍襏譧矧擋腺容戍躒 貂耍巷熪鋇柰媴銻胃 db2set DB2_DJ_INI=/db2dj.ini * 礔鞮儘彀牁釬定鑶豜秕媥 db2dj.ini 耍 詰鞮繐 db2dj.ini 珫 戍襏矧擋腺殛膃孛蜙躒貂耍巷熪鋇柰媴銻胃 db2set -g DB2_DJ_INI=/db2dj.ini * 礔鞮儘彀牁釬定鑶豜秕媥 db2dj.ini 耍 詰鞮繐 db2dj.ini 珫 戍襏矧擋腺蕶肄戍躒貂耍巷熪鋇柰媴銻胃 db2set -i INSTANCEX 3 DB2_DJ_INI=$HOME/sqllib/cfg/node3.ini 珫胃 INSTANCEX 鋅式蜙W投耶 3 鋅式媴彀 db2nodes.cfg 戍躒貂襶俄耶 node3.ini 鋅式 db2dj.ini 戍瓬鶔巰次劑耶 5.6.1.2 纙J 2胃鸉 Shell Script (譧 AIX) djxlink.sh Shell Script 膣雚膼鷛定鴉柳定耶 礔繐鸉 Shell Script胃 djxlink 5.6.1.3 纙J 3胃擋戍胃]肄 DB2_DJ_COMM 礔鞮熪{旟L愫戍繾靲s灥 Microsoft SQL Server 僬垠A 鞮養鄧彀皖幏 再齗鱌絛]肄耍椴唏彀鞮覃槷s灥僬咿耍]肄 DB2_DJ_COMM 閞U 鴉柳耍 愩殛堉養柱灁耶 ]肄 DB2_DJ_COMM 鄧霄服鴉柳定耍烈鞮彀 5 纙J肄戍鴉柳虎耶蜙p胃 彀 DB2 for Windows NT 再齗柼胃 db2set DB2_DJ_COMM=djxmssql3.dll 彀 DB2 for AIX 再齗柼胃 db2set DB2_DJ_COMM=libmssql3.a 巷俊肄瞉襶 (=) 戍鑭嗀耶 巷囓酀 DB2 SQL Reference耍鄧灥隳嗀鴉柳鎈搨定巰投戍欏僝鬞耶 5.6.1.4 纙J 4胃薿s媥 DB2 (譧 AIX) 礔繐俊肄]肄腺獛搨珫耍巷薿s媥 DB2 蒤C ♂z薿s媥蚸膌耍駻 s DB2 蒝H鼪鞮詻鏼戍鶔耶 熪鋇柰媴銻耍薿s媥 DB2 蒤G db2stop db2start 5.6.1.5 纙J 5胃擔鴉柳 DB2 Universal Database 嗀q埔灨肄耍投長鴉柳耍鞮養鄧媥釱靲s灥 Microsoft SQL Server 僬垠C鴉柳板柜鼭耍皖幏再齗擋殛鼭僯q埔瓬跌灥僬 戍耶 鞮媥蛈屁~柳板鄧 DB2 Universal Database 儘彀鸉戍樹鬧長祼擳C 擋式 2 鏼長峪耍鄧灥譂’屁~柳耶 式 2. ODBC X韥獛搨 ODBC X韥獛搨 樹鬧 鴉柳巰投 ODBC 3.0 (詰鶔s次劑) X韥獛搨 Windows NT DJXMSSQL3 MERANT DataDirect Connect ODBC 3.6 AIX MSSQLODBC3 X韥獛搨 媥 CREATE WRAPPER 闉z搨鉈肄鴉柳耍醨擋靲s灥 Microsoft SQL Server 僬垠C 柰媴削ず CREATE WRAPPER 闉z搨胃 CREATE WRAPPER DJXMSSQL3 珫 DJXMSSQL3 板 DB2 for Windows NT 再齗 (媥 ODBC 3.0 X韥獛搨) 柼媥 戍w]鴉柳巰投耶 礔鞮嗀 DB2 for AIX 再齗耍鞮養鄧肄 MSSQLODBC3 鴉柳巰 投耶 鞮養鄧擋鞮戍巰投僓ˇNw]鴉柳巰投耶 椷板耍礔鞮o鷽耍鞮澱鏺霄鰗 CREATE WRAPPER 闉z搨戍皖幏再齗樹鬧祌 LIBRARY 囓瓬鴉柳定戍巰投耶 愩胃 彀 DB2 for Windows NT 再齗柼胃 CREATE WRAPPER wrapper_name LIBRARY 'djxmssql3.dll' 珫 wrapper_name 板鞮Q繐虪聤鴉柳戍巰投耍 椴 'djxmssql3.dll' 板鎈搨 定巰投耶 彀 DB2 for AIX 再齗柼胃 CREATE WRAPPER wrapper_name LIBRARY 'libmssql3.a' 珫 wrapper_name 板鞮Q繐虪聤鴉柳戍巰投耍 椴 'libdjxmssql.a' 板鎈搨 定巰投耶 巷囓酀 DB2 SQL Reference 珫戍 CREATE WRAPPER 闉z搨耍鄧灥隳嗀鴉柳鎈搨定巰 投戍欏僝鬞耶 5.6.1.6 纙J 6胃擔再齗 媥 CREATE SERVER 闉z搨鉊w霿鞮Q繐s鼪戍臠柜譇 Microsoft SQL Server 僬垠C蜙p胃 CREATE SERVER sqlserver TYPE MSSQLSERVER VERSION 7.0 WRAPPER djxmssql3 OPTIONS (NODE 'sqlnode', DBNAME 'database_name') 珫胃 sqlserver 鋅式鞮肄聤 Microsoft SQL Server 再齗戍巰投耶 殛巰投澱鏺板鸅柜戍耶 MSSQLSERVER 鋅式鞮繐歧呃酨灥戍僬室蝞狎C 7.0 鋅式鞮繐酨灥戍 Microsoft SQL Server 次劑耶DB2 Universal Database 儭 Microsoft SQL Server 次劑 6.5 烈 7.0耶 DJXMSSQL3 鋅式鞮彀 CREATE WRAPPER 闉z搨珫肄霿戍鴉柳巰投耶 'sqlnode' 鋅式囓 Microsoft SQL Server 戍鑶 DSN 巰投耶殛襏嗀鱦牁毠洟柞耶鞮繐 酨灥戍 Microsoft SQL Server 次劑耶 DB2 Universal Database 儭 Microsoft SQL Server 次劑 6.5 烈 7.0耶 潒躒貂巰投 (鑶 DSN 巰投) 板肄長 CREATE SERVER 闉z搨珫戍醳耍椷 殛長 Microsoft SQL Server 僬姜蒟磽妣C 巷囓酀 DB2 SQL Reference耍鄧灥隳鞮養鄧媥 CREATE WRAPPER 闉z搨戍醋 醳耶 'database_name' 鋅式鞮繐s鼪戍定祌巰投耶 潒定巰投板肄長 CREATE SERVER 闉z搨珫戍醳耍椷殛長 Microsoft SQL Server 僬姜蒟磽妣C 5.6.1.7 纙J 7胃擔媥蛈稗杯 礔皖幏再齗珫戍媥蛈 ID 烈q俄耍烈 Microsoft SQL Server 珫戍媥蛈 ID 烈q俄嵥耍巷媥 CREATE USER MAPPING 闉z搨耍媥祐薋媥蛈 ID 烈 Microsoft SQL Server 僬峙牉w霿戍媥蛈 ID 烈q俄虎洈杯胚蜙p胃 CREATE USER MAPPING FOR db2user SERVER server_name OPTIONS (REMOTE_AUTHID 'mssqluser', REMOTE_PASSWORD 'dayl1te') 珫胃 db2user 鋅式鞮擋僰杯媥蛈 ID (肄霿腺 Microsoft SQL Server 僬峙) 戍劑 抑媥蛈 ID耶 server_name 鋅式鞮彀 CREATE SERVER 闉z搨珫肄霿戍再齗巰投耶 'mssqluser' 鋅式 Microsoft SQL Server 僬咻杜媥蛈 ID耍鞮繐擋殛僰杯 db2user耶 殛襏嗀鱦牁毠洟柞耶 'dayl1ite' 鋅式烈 'mssqluser' 虎戍q俄耶殛襏嗀鱦牁毠洟柞耶 巷囓酀 DB2 SQL Reference耍鄧灥隳鞮養鄧媥 CREATE USER MAPPING 闉z搨戍醋 醳耶 5.6.1.8 纙J 8胃擔式烈蘞浀’妞砯W 肄鞮Q繐酨灥戍 Microsoft SQL Server 僬峙洐A臠柜譇蘞浀+蛈〝祌皆 巰耶 ♂z泥欒 Microsoft SQL Server 僬咿耍醨媥釤o皆巰耶 媥 CREATE NICKNAME 闉z搨鉈肄皆巰耶 皆巰嗀鱦牁毠洟柞耶柰媴削ず CREATE NICKNAME 闉z搨胃 CREATE NICKNAME mssqlsales FOR server_name.salesdata.europe 珫胃 mssqlsales 鋅式 Microsoft SQL Server 式詰蘞浀’攸M擋皆巰耶 server_name.salesdata.europe 鋅式芋駽柰媴搨戍柧倔準仰O戠胃 data_source_server_name.remote_schema_name.remote_table_name 鞮彀戍 remote_schema_name 瓬 remote_table_name 倌穱媥袪矧襶耶 ♂z擔皆巰耍DB2 |覃槷s灥僬垣爸鴞〝 (Microsoft SQL Server 囓僯o 式鏼長鑶蛈〝)耶o|鵃灚s鼪僬咻圻爭A耶礔s哎噬韖耍鞮|鼪搌柜 譇砷鬞昔耶 黳鞮Q繐擔皆巰戍詻嗀定式瓬蘞浀#A薿殛纙J耶 嗀 CREATE NICKNAME 闉z搨戍欏僝鬞耍巷囓酀 DB2 SQL Reference耶 嗀柜 皆巰瓬ъю悚杯戍欏僝鬞耍 巷囓酀 DB2 Administration Guide耶 5.6.1.9 纙J 9胃擋戍胃隳 ODBC 鷲 礔鞮酨灥僬咿J齶ガ耍鞮養鄧灥隳 ODBC 鷲鬞耍鄧牁吐虋鬙讘o齶 ガ耶 礔繐俊肄 ODBC 鷲戍B鏼儘鎈耍巷媥蚼uODBC 僬咩噠z舌赳虪戍鷲 泚爩耶鼖韥鷲|洋T鑶蚸耍廅殛♂z洄鬙讘齶ガ耍睦欑長l耶 5.6.2 泥 Microsoft SQL Server 戠俄贄 Microsoft SQL Server 儭\愫 DB2 UDB 儭戍柜赴奄砰躨儭 (NLS)赳戠俄 贄醳耶 媥蚽P DB2 虎嵥戍戠俄鐖祌僬峙茫繐黈耶 式 3 媴 DB2 Universal Database 瓬 Microsoft SQL Server 鶩嗀儭戍戠俄贄耶 式 3. DB2 UDB 瓬 Microsoft SQL Server 戠俄贄醳 戠俄贄 儭戍砰躨 1252 ISO 戠鐖 850 愫砰躨 437 禭 874 拐砰 932 936 媽珫 949 童砰 950 甥珫 1250 遭繐祇泡砰 1251 檴詹眅砰 1253 ⑴砰 1254 殶楶砰 1255 鏶閞 1256 詹鏶砰 DB2 皖幏再齗烈 Microsoft SQL Server 鸉嵥戍赴奄砰躨儭 (NLS)赳戠 俄贄耍鞮戍 Microsoft SQL Server 僬囿[呃澱鏺烈砰N虎耍詰舌雚膼 獛搨俄澱鏺爦灝鵃戍砰N耍虋醨癸長砷耑詰媥釱劑藀妖yN僰杯 耶礔雚絛戠俄贄癸戠俄贄耍黈式耍屑 DB2 |熪鋇砷鬞昔耶 巷 囓酀鞮戍 Microsoft SQL Server 麩耍鄧灥隳欏僝鬞耶 ------------------------------------------------------------------------ 扯z 倌鷎到 * Administration Guide: Planning (潲珫次) o 6.1 Chapter 8. Physical Database Design + 6.1.1 Partitioning Keys o 6.2 Designing Nodegroups o 6.3 Chapter 9. Designing Distributed Databases + 6.3.1 Updating Multiple Databases o 6.4 Chapter 13. High Availability in the Windows NT Environment + 6.4.1 Need to Reboot the Machine Before Running DB2MSCS Utility o 6.5 Chapter 14. DB2 and High Availability on Sun Cluster 2.2 o 6.6 Veritas Support on Solaris o 6.7 Appendix B. Naming Rules + 6.7.1 Notes on Greater Than 8-Character User IDs and Schema Names + 6.7.2 User IDs and Passwords o 6.8 Appendix D. Incompatibilities Between Releases + 6.8.1 Windows NT DLFS Incompatible with Norton's Utilities + 6.8.2 SET CONSTRAINTS Replaced by SET INTEGRITY o 6.9 Appendix E. National Language Support + 6.9.1 National Language Versions of DB2 Version 7 + 6.9.1.1 Control Center and Documentation Filesets + 6.9.2 Locale Setting for the DB2 Administration Server + 6.9.3 DB2 UDB Supports the Baltic Rim Code Page (MS-1257) on Windows Platforms + 6.9.4 Deriving Code Page Values + 6.9.5 Country Code and Code Page Support + 6.9.6 Character Sets * Administration Guide: Implementation(潲珫次) o 7.1 Adding or Extending DMS Containers (New Process) o 7.2 Chapter 1. Administering DB2 using GUI Tools o 7.3 Chapter 3. Creating a Database + 7.3.1 Creating a Table Space + 7.3.1.1 Using Raw I/O on Linux + 7.3.2 Creating a Sequence + 7.3.3 Comparing IDENTITY Columns and Sequences + 7.3.4 Creating an Index, Index Extension, or an Index Specification o 7.4 Chapter 4. Altering a Database + 7.4.1 Adding a Container to an SMS Table Space on a Partition + 7.4.2 Altering an Identity Column + 7.4.3 Altering a Sequence + 7.4.4 Dropping a Sequence + 7.4.5 Switching the State of a Table Space + 7.4.6 Modifying Containers in a DMS Table Space o 7.5 Chapter 5. Controlling Database Access + 7.5.1 Sequence Privileges + 7.5.2 Data Encryption o 7.6 Chapter 8. Recovering a Database + 7.6.1 How to Use Suspended I/O + 7.6.2 Incremental Backup and Recovery + 7.6.2.1 Restoring from Incremental Backup Images + 7.6.3 Parallel Recovery + 7.6.4 Backing Up to Named Pipes + 7.6.5 Backup from Split Image + 7.6.6 On Demand Log Archive + 7.6.7 Log Mirroring + 7.6.8 Cross Platform Backup and Restore Support on Sun Solaris and HP + 7.6.9 DB2 Data Links Manager Considerations/Backup Utility Considerations + 7.6.10 DB2 Data Links Manager Considerations/Restore and Rollforward Utility Considerations + 7.6.11 Restoring Databases from an Offline Backup without Rolling Forward + 7.6.12 Restoring Databases and Table Spaces, and Rolling Forward to the End of the Logs + 7.6.13 DB2 Data Links Manager and Recovery Interactions + 7.6.14 Detection of Situations that Require Reconciliation o 7.7 Appendix C. User Exit for Database Recovery o 7.8 Appendix D. Issuing Commands to Multiple Database Partition Servers o 7.9 Appendix I. High Speed Inter-node Communications + 7.9.1 Enabling DB2 to Run Using VI * Administration Guide: Performance (潲珫次) o 8.1 Chapter 3. Application Considerations + 8.1.1 Specifying the Isolation Level + 8.1.2 Adjusting the Optimization Class + 8.1.3 Dynamic Compound Statements o 8.2 Chapter 4. Environmental Considerations + 8.2.1 Using Larger Index Keys o 8.3 Chapter 5. System Catalog Statistics + 8.3.1 Collecting and Using Distribution Statistics + 8.3.2 Rules for Updating Catalog Statistics + 8.3.3 Sub-element Statistics o 8.4 Chapter 6. Understanding the SQL Compiler + 8.4.1 Replicated Summary Tables + 8.4.2 Data Access Concepts and Optimization o 8.5 Chapter 8. Operational Performance + 8.5.1 Managing the Database Buffer Pool + 8.5.2 Managing Multiple Database Buffer Pools o 8.6 Chapter 9. Using the Governor o 8.7 Chapter 13. Configuring DB2 + 8.7.1 Sort Heap Size (sortheap) + 8.7.2 Sort Heap Threshold (sheapthres) + 8.7.3 Maximum Percent of Lock List Before Escalation (maxlocks) + 8.7.4 Configuring DB2/DB2 Data Links Manager/Data Links Access Token Expiry Interval (dl_expint) + 8.7.5 MIN_DEC_DIV_3 Database Configuration Parameter + 8.7.6 Application Control Heap Size (app_ctl_heap_sz) + 8.7.7 Database System Monitor Heap Size (mon_heap_sz) + 8.7.8 Maximum Number of Active Applications (maxappls) + 8.7.9 Recovery Range and Soft Checkpoint Interval (softmax) + 8.7.10 Track Modified Pages Enable (trackmod) + 8.7.11 Change the Database Log Path (newlogpath) + 8.7.12 Location of Log Files (logpath) + 8.7.13 Maximum Storage for Lock List (locklist) o 8.8 Appendix A. DB2 Registry and Environment Variables + 8.8.1 Table of New and Changed Registry Variables o 8.9 Appendix C. SQL Explain Tools * Administering Satellites Guide and Reference(潲珫次) o 9.1 Setting up Version 7.2 DB2 Personal Edition and DB2 Workgroup Edition as Satellites + 9.1.1 Prerequisites + 9.1.1.1 Installation Considerations + 9.1.2 Configuring the Version 7.2 System for Synchronization + 9.1.3 Installing FixPak 2 or Higher on a Version 6 Enterprise Edition System + 9.1.3.1 Upgrading Version 6 DB2 Enterprise Edition for Use as the DB2 Control Server + 9.1.4 Upgrading a Version 6 DB2 Control Center and Satellite Administration Center * Command Reference(潲珫次) o 10.1 db2batch - Benchmark Tool o 10.2 db2cap (new command) + db2cap - CLI/ODBC Static Package Binding Tool o 10.3 db2ckrst (new command) + db2ckrst - Check Incremental Restore Image Sequence o 10.4 db2gncol (new command) + db2gncol - Update Generated Column Values o 10.5 db2inidb - Initialize a Mirrored Database o 10.6 db2look - DB2 Statistics Extraction Tool o 10.7 db2updv7 - Update Database to Version 7 Current Fix Level o 10.8 New Command Line Processor Option (-x, Suppress printing of column headings) o 10.9 True Type Font Requirement for DB2 CLP o 10.10 ADD DATALINKS MANAGER o 10.11 ARCHIVE LOG (new command) + Archive Log o 10.12 BACKUP DATABASE + 10.12.1 Syntax Diagram + 10.12.2 DB2 Data Links Manager Considerations o 10.13 BIND o 10.14 CALL o 10.15 DROP DATALINKS MANAGER (new command) + DROP DATALINKS MANAGER o 10.16 EXPORT o 10.17 GET DATABASE CONFIGURATION o 10.18 GET ROUTINE (new command) + GET ROUTINE o 10.19 GET SNAPSHOT o 10.20 IMPORT o 10.21 LIST HISTORY o 10.22 LOAD o 10.23 PING (new command) + PING o 10.24 PUT ROUTINE (new command) + PUT ROUTINE o 10.25 RECONCILE o 10.26 REORGANIZE TABLE o 10.27 RESTORE DATABASE + 10.27.1 Syntax + 10.27.2 DB2 Data Links Manager Considerations o 10.28 ROLLFORWARD DATABASE o 10.29 Documentation Error in CLP Return Codes * Data Movement Utilities Guide and Reference(潲珫次) o 11.1 Chapter 2. Import + 11.1.1 Using Import with Buffered Inserts o 11.2 Chapter 3. Load + 11.2.1 Pending States After a Load Operation + 11.2.2 Load Restrictions and Limitations + 11.2.3 totalfreespace File Type Modifier o 11.3 Chapter 4. AutoLoader + 11.3.1 rexecd Required to Run Autoloader When Authentication Set to YES * Replication 峪烈囓楯銳 o 12.1 纋柞瓬唏 IBM 再齗 o 12.2 彀 Windows 2000 柼戍纋柞 o 12.3 暖酨 SQL 戍洄何砷 o 12.4 DB2 @ o 12.5 Web 柼戍 Data Difference Utility o 12.6 3 纋柞髕削 + 12.6.1 纋柞髕 o 12.7 5 纋柞W + 12.7.1 式瓬托巰投 + 12.7.2 DATALINK 纋柞 + 12.7.3 LOB 貙 + 12.7.4 W李磟g o 12.8 6 ]肄纋柞 + 12.8.1 廈B鶔s (Update-anywhere) 樺讘麩 + 12.8.2 ]肄纋柞 o 12.9 8 齶ガ顣跛 o 12.10 9 AS/400 戍跌灥獛搨碉矧擋獛搨 o 12.11 10 OS/390 戍跌灥獛搨碉矧擋獛搨 + 12.11.1 DB2 DataPropagator for OS/390 戍樺讘麩 + 12.11.2 OS/390 柼戍 UNICODE 碉 ASCII 哀俄妄 + 12.11.2.1 哀俄妄 + 12.11.2.2 ]肄哀俄妄 o 12.12 11 UNIX 樹鬧戍跌灥獛搨碉矧擋獛搨 + 12.12.1 彀 UNIX 碉 Windows 柼]肄赴跌灥獛搨赳碉赴矧擋獛搨赳 戍 o 12.13 14 式膣呃 o 12.14 15 跌灥獛搨碉矧擋獛搨鬞昔 o 12.15 衣到 A. 雚睦擋獛搨洇鼖韥跌灥獛搨碉矧擋獛搨 * System Monitor Guide and Reference(潲珫次) o 13.1 db2ConvMonStream * Troubleshooting Guide(潲珫次) o 14.1 Starting DB2 on Windows 95, Windows 98, and Windows ME When the User Is Not Logged On o 14.2 Chapter 2. Troubleshooting the DB2 Universal Database Server * 彀 64 祅戍樹鬧柼媥 DB2 Universal Database o 15.1 5 歧呃 + 15.1.1 LOCKLIST + 15.1.2 shmsys:shminfo_shmmax o 15.2 6 貙 * XML Extender Administration and Programming(潲珫次) * MQSeries o 17.1 揅壧烈歧呃 DB2 MQSeries Function + 17.1.1 揅壧 MQSeries + 17.1.2 揅壧 MQSeries AMI + 17.1.3 鼖擋 DB2 MQSeries Function o 17.2 MQSeries 鬞皇搨 o 17.3 鬞昔膣呃 o 17.4 MQSeries 閱[ + 17.4.1 貙 + 17.4.2 砷俄 o 17.5 擋妄髕銳 + 17.5.1 劑鬞 + 17.5.2 鷫鬞昔 + 17.5.3 跌灥鬞昔 + 17.5.4 睦擋獛搨睦擋獛搨s鼪 + 17.5.4.1 Request/Reply q埔 + 17.5.4.2 熪闟/繘酀 o 17.6 enable_MQFunctions + enable_MQFunctions o 17.7 disable_MQFunctions + disable_MQFunctions ------------------------------------------------------------------------ Administration Guide: Planning (潲珫次) ------------------------------------------------------------------------ 6.1 Chapter 8. Physical Database Design 6.1.1 Partitioning Keys In the "Nodegroup Design Considerations" subsection of the "Designing Nodegroups" section , the following text from the "Partitioning Keys" sub-subsection stating the points to be considered when defining partitioning keys should be deleted only if DB2_UPDATE_PART_KEY=ON: Note: If DB2_UPDATE_PART_KEY=OFF, then the restrictions still apply. Note: In FixPak 3 and later, the default value will be ON. * You cannot update the partitioning key column value for a row in the table. * You can only delete or insert partitioning key column values. ------------------------------------------------------------------------ 6.2 Designing Nodegroups Within the section titled "Designing Nodegroups," the subsection titled "Nodegroup Design Considerations," and the subsection titled "Replicated Summary Tables," disregard the last sentence of the second paragraph: The REPLICATED keyword can only be specified for a summary table that is defined with the REFRESH DEFERRED option. ------------------------------------------------------------------------ 6.3 Chapter 9. Designing Distributed Databases 6.3.1 Updating Multiple Databases In the section "Updating Multiple Databases", the list of setup steps has an inaccuracy. Step 4, which now reads as follows: Precompile your application program to specify a type 2 connection (that is, specify CONNECT 2 on the PRECOMPILE PROGRAM command), and one-phase commit (that is, specify SYNCPOINT ONEPHASE on the PRECOMPILE PROGRAM command), as described in the Application Development Guide. should be changed to: Precompile your application program to specify a type 2 connection (that is, specify CONNECT 2 on the PRECOMPILE PROGRAM command), and two-phase commit (that is, specify SYNCPOINT TWOPHASE on the PRECOMPILE PROGRAM command), as described in the Application Development Guide. ------------------------------------------------------------------------ 6.4 Chapter 13. High Availability in the Windows NT Environment 6.4.1 Need to Reboot the Machine Before Running DB2MSCS Utility The DB2MSCS utility is used to perform the required setup to enable DB2 for failover support under the Microsoft Cluster Service environment. For the DB2MSCS utility to run successfully, the Cluster Service must be able to locate the resource DLL, db2wolf.dll, which resides under the %ProgramFiles%\SQLLIB\bin directory. The DB2 UDB Version 7 Installation Program sets the PATH system environment variable to point to the %ProgramFiles%\SQLLIB\bin directory. However, it is not required that you reboot the machine after installation if you are running on the Windows 2000 operating system. If you want to run the DB2MSCS utility, you must reboot the machine so that the PATH environment variable is updated for the Cluster Service. ------------------------------------------------------------------------ 6.5 Chapter 14. DB2 and High Availability on Sun Cluster 2.2 DB2 Connect is supported on Sun Cluster 2.2 if: * The protocol to the host is TCP/IP (not SNA) * Two-phase commit is not used. This restriction is relaxed if the user configures the SPM log to be on a shared disk (this can be done through the spm_log_path database manager configuration parameter), and the failover machine has an identical TCP/IP configuration (the same host name, IP address, and so on). ------------------------------------------------------------------------ 6.6 Veritas Support on Solaris DB2 now supports Veritas, which provides cluster support for DB2 High Availability on Solaris. Description Brings online, takes offline, and monitors a DB2 UDB instance. Entry Points Online Use db2start to bring up instance. Offline Use db2stop to bring down instance. Monitor Determines if specified DB2 instance is up. Uses appropriate process monitoring and (optional) database monitoring. Clean Removes DB2 instance resources. Attribute Type Definition probeDatabase string Database to be monitored instanceOwner string Instance owner name instanceHome string Home directory of instance owner probeTable string Table in probeDatabase to monitor monitorLevel integer 1 implies process monitoring, 2 implies db mon nodeNumber integer Nodenumber of instance to start (unset is EE) Type Defninition type DB2UDB ( static int CleanTimeout = 240 static int MonitorTimeout = 30 static int OfflineTimeout = 240 static int OnlineRetryLimit = 2 static int OnlineTimeout = 120 static int OnlineWaitLimit = 1 static int RestartLimit = 3 static int ToleranceLimit = 1 static str ArgList[] = { probeDatabase, instanceOwner, instanceHome, probeTable, monitorLevel, nodeNumber } NameRule = resource.db2udb str probeDatabase str instanceOwner str instanceHome str probeTable int monitorLevel int nodeNumber ) Sample Configuration DB2UDB db2_resource_n0 ( probeDatabase = sample probeTable = vcstable instanceOwner = stevera instanceHome = "/export/home/stevera" monitorLevel = 2 ) Installation o Create the directory /opt/VRTSvcs/bin/DB2UDB. o Copy the files online, offline, monitor, clean, DB2UDBAgent into /opt/VRTSvcs/bin/DB2UDB and ensure that they are marked executable. o Copy the file db2udb.type.cf into /etc/VRTSvcs/conf/config. o Stop the cluster (for example, hastop -all). o Add the line include db2udb.type.cf into the file main.cf after the line include types.cf o Verify the cluster configuration is valid with /opt/VRTSvcs/bin/hacf -verify /etc/VRTSvcs/conf/config You are now ready to create the DB2 resources necessary to control DB2 instances. ------------------------------------------------------------------------ 6.7 Appendix B. Naming Rules 6.7.1 Notes on Greater Than 8-Character User IDs and Schema Names * DB2 Version 7 products on Windows 32-bit platforms support user IDs that are up to 30 characters long. However, because of native support of Windows NT and Windows 2000, the practical limit for user ID is 20 characters. * DB2 Version 7 supports non-Windows 32-bit clients connecting to Windows NT and Windows 2000 with user IDs longer than 8 characters when user ID and password are being specified explicitly. This excludes connections using Client or DCE authentication. * DCE authentication on all platforms continues to have the 8-character user ID limit. * The authid returned in the SQLCA from a successful CONNECT or ATTACH is truncated to 8 characters. The SQLWARN fields contain warnings when truncation occurs. For more information, refer to the description of the CONNECT statement in the SQL Reference. * The authid returned by the command line processor (CLP) from a successful CONNECT or ATTACH is truncated to 8 characters. An ellipsis (...) is appended to the authid to indicate truncation. * DB2 Version 7 supports schema names with length up to 30 bytes, with the following exceptions: o Tables with schema names longer than 18 bytes cannot be replicated. o User defined types (UDTs) cannot have schema names longer than 8 bytes. 6.7.2 User IDs and Passwords Within the section titled "User IDs and Passwords," change the reference to "A through Z" to: Single-byte uppercase and lowercase Latin letters (A...Z, a...z). Support for other letters and characters depends on the code page being used. See the appendix titled "National Language Support (NLS)" for more information on code page support. ------------------------------------------------------------------------ 6.8 Appendix D. Incompatibilities Between Releases 6.8.1 Windows NT DLFS Incompatible with Norton's Utilities The Windows NT Data Links File System is incompatible with Norton Utilities. When a file is deleted from a drive controlled by DLFS, a kernel exception results: error 0x1E (Kernel Mode Exception Not Handled). The exception being 0xC00000005 (Access Violation). This access violation happens because the Norton Utilities driver gets loaded after the DLFS filter driver gets loaded. A temporary work-around is to load the DLFSD driver, after the Norton Utilities driver is loaded. This work-around can be done by changing the DLFSD driver startup to manual. Click on Start and select Settings--> Control Panel-->Devices-->DLFSD and set it to manual. A batch file, that can be added to the startup folder, can be created which loads the DLFSD driver and the DLFM Service on system startup. The contents of the batch file are as follows: net start dlfsd net start "dlfm service" Name this batch file start_dlfs.bat, and copy it into the C:\WINNT\Profiles\Administrator\Start Menu\Programs\Startup directory. Only the administrator has the privilege to load the DLFS filter driver and the DLFM service. 6.8.2 SET CONSTRAINTS Replaced by SET INTEGRITY The SET CONSTRAINTS statement has been replaced by the SET INTEGRITY statement. For backwards compatibility, both statements are accepted in DB2 UDB V7. ------------------------------------------------------------------------ 6.9 Appendix E. National Language Support 6.9.1 National Language Versions of DB2 Version 7 DB2 Version 7 is available in English, French, German, Italian, Spanish, Brazilian Portuguese, Japanese, Korean, Simplified Chinese, Traditional Chinese, Danish, Finnish, Norwegian, Swedish, Czech, Dutch, Hungarian, Polish, Turkish, Russian, Bulgarian, and Slovenian. On UNIX-based platforms, the DB2 product messages and library can be installed in several different languages. The DB2 installation utility lays down the message catalog file sets into the most commonly used locale directory for a given platform as shown in the following tables. 式 4 provides information for AIX, HP-UX, and Solaris. Table 5 provides information for Linux, Linux/390, SGI, and Dynix. Table 4. AIX, HP-UX, Solaris Operating SystemAIX HP-UX Solaris Language Locale Cde Locale Cde Locale Cde Pg Pg Pg French fr_FR 819 fr_FR.iso88591 819 fr 819 Fr_FR 850 fr_FR.roman8 1051 German de_DE 819 de_DE.iso88591 819 de 819 De_DE 850 de_DE.roman8 1051 Italian it_IT 819 it_IT.iso88591 819 it 819 It_IT 850 it_IT.roman8 1051 Spanish es_ES 819 es_ES.iso88591 819 es 819 Es_ES 850 es_ES.roman8 1051 Brazilian Portu-pt_BR 819 pt_BR 819 guese Japanese ja_JP 954 ja_JP.eucJP 954 ja 954 Ja_JP 932 Korean ko_KR 970 ko_KR.eucKR 970 ko 970 Simplified zh_CN 1383 zh_CN.hp15CN 1383 zh 1383 Chinese Zh_ 1386 CN.GBK Traditional zh_TW 964 zh_TW.eucTW 964 zh_TW 964 Chinese Zh_TW 950 zh_TW.big5 950 zh_TW.BIG5 950 Danish da_DK 819 da_DK.iso88591 819 da 819 Da_DK 850 da_DK.roman8 1051 Finnish fi_FI 819 fi_FI.iso88591 819 fi 819 Fi_FI 850 fi_FI.roman8 1051 Norwegian no_NO 819 no_NO.iso88591 819 no 819 No_NO 850 no_NO.roman8 1051 Sweden sv_SE 819 sv_SE.iso88591 819 sv 819 Sv_SE 850 sv_SE.roman8 1051 Czech cs_CZ 912 Hungarian hu_HU 912 Polish pl_PL 912 Dutch nl_NL 819 Nl_NL 850 Turkish tr_TR 920 Russian ru_RU 915 Bulgarian bg_BG 915 bg_BG.iso88595 915 Slovenian sl_SI 912 sl_SI.iso88592 912 sl_SI 912 Table 5. Linux, Linux/390, SGI, Dynix Operating Linux Linux/390 SGI Dynix System Language Locale Cde Locale Cde Locale Cde Locale Cde Pg Pg Pg Pg French fr 819 fr 819 fr 819 German de 819 de 819 de 819 Italian es 819 Spanish Brazilian Portuguese Japanese ja_JP.ujis 954 ja_JP.ujis954 ja_JP.EUC 954 Korean ko 970 ko 970 ko_KO.euc 970 Simplified zh 1386 zh 1386 Chinese zh_CN.GBK zh_CN.GBK Traditional zh_TW.Big5 950 zh_TW.Big5950 Chinese Danish Finnish Norwegian Sweden Czech Hungarian Polish Dutch nl 819 Turkish Russian Bulgarian Slovenian If your system uses the same code pages but different locale names than those provided above, you can still see the translated messages by creating a link to the appropriate message directory. For example, if your AIX machine default locale is ja_JP.IBM-eucJP and the code page of ja_JP.IBM-eucJP is 954, you can create a link from /usr/lpp/db2_07_01/msg/ja_JP.IBM-eucJP to /usr/lpp/db2_07_01/msg/ja_JP by issuing the following command: ln -s /usr/lpp/db2_07_01/msg/ja_JP /usr/lpp/db2_07_01/msg/ja_JP.IBM-eucJP After the execution of this command, all DB2 messages come up in Japanese. 6.9.1.1 Control Center and Documentation Filesets The Control Center, Control Center Help and documentation filesets are placed in the following directories on the target workstation: * DB2 for AIX: o /usr/lpp/db2_07_01/cc/%L o /usr/lpp/db2_07_01/java/%L o /usr/lpp/db2_07_01/doc/%L o /usr/lpp/db2_07_01/qp/$L o /usr/lpp/db2_07_01/spb/%L * DB2 for HP-UX: o /opt/IBMdb2/V7.1/cc/%L o /opt/IBMdb2/V7.1/java/%L o /opt/IBMdb2/V7.1/doc/%L * DB2 for Linux: o /usr/IBMdb2/V7.1/cc/%L o /usr/IBMdb2/V7.1/java/%L o /usr/IBMdb2/V7.1/doc/%L * DB2 for Solaris: o /opt/IBMdb2/V7.1/cc/%L o /usr/IBMdb2/V7.1/java/%L o /opt/IBMdb2/V7.1/doc/%L Control Center file sets are in Unicode code page. Documentation and Control Center help file sets are in a browser-recognized code set. If your system uses a different locale name than the one provided, you can still run the translated version of the Control Center and see the translated version of help by creating links to the appropriate language directories. For example, if your AIX machine default locale is ja_JP.IBM-eucJP, you can create links from /usr/lpp/db2_07_01/cc/ja_JP.IBM-eucJP to /usr/lpp/db2_07_01/cc/ja_JP and from /usr/lpp/db2_07_01/doc/ja_JP.IBM-eucJP to /usr/lpp/db2_07_01/doc/ja_JP by issuing the following commands: * ln -s /usr/lpp/db2_07_01/cc/ja_JP /usr/lpp/db2_07_01/cc/ja_JP.IBM-eucJP * ln -s /usr/lpp/db2_07_01/doc/ja_JP /usr/lpp/db2_07_01/doc/ja_JP.IBM-eucJP After the execution of these commands, the Control Center and help text come up in Japanese. Note: The Web Control Center is not supported running natively on Linux/390 or NUMA-Q. It can be used from a client workstation to manage databases on these platforms. 6.9.2 Locale Setting for the DB2 Administration Server Please ensure that the locale of the DB2 Administration Server instance is compatible to the locale of the DB2 instance. Otherwise, the DB2 instance cannot communicate with the DB2 Administration Server. If the LANG environment variable is not set in the user profile of the DB2 Administration Server, the DB2 Administration Server will be started with the default system locale. If the default system locale is not defined, the DB2 Administration Server will be started with code page 819. If the DB2 instance uses one of the DBCS locales, and the DB2 Administration Server is started with code page 819, the instance will not be able to communicate with the DB2 Administration Server. The locale of the DB2 Administration Server and the locale of the DB2 instance must be compatible. For example, on a Simplified Chinese Linux system, "LANG=zh_CN" should be set in the DB2 Administration Server's user profile. 6.9.3 DB2 UDB Supports the Baltic Rim Code Page (MS-1257) on Windows Platforms DB2 UDB supports the Baltic Rim code page, MS-1257, on Windows 32-bit operating systems. This code page is used for Latvian, Lithuanian, and Estonian. 6.9.4 Deriving Code Page Values Within the section titled "Deriving Code Page Values," change the first paragraph, from: However, it is not necessary to set the DB2CODEPAGE registry variable, because DB2 will determine the appropriate code page value from the operating system. to: Normally, you do not need to set the DB2CODEPAGE registry variable because DB2 automatically derives the code page information from the operating system. 6.9.5 Country Code and Code Page Support Within the section titled "Country Code and Code Page Support," add the following information to the table: Code Country Page Group Code-Set Tr. Code Locale OS Country Name ---- ----- -------- -- --- ----- ---- --------------- 943 D-1 IBM-943 JP 81 ja_JP.PCK Sun Japan 6.9.6 Character Sets Within the section titled "Character Sets" and the subsection "Character Set for Identifiers," replace the last two sentences in the first paragraph with the following: Use special characters #, @, and $ with care in an NLS environment because they are not included in the NLS host (EBCDIC) invariant character set. Characters from the extended character set can also be used, depending on the code page that is being used. If you are using the database in a multiple code page environment, you must ensure that all code pages support any elements from the extended character set you plan to use. ------------------------------------------------------------------------ Administration Guide: Implementation(潲珫次) ------------------------------------------------------------------------ 7.1 Adding or Extending DMS Containers (New Process) DMS containers (both file containers and raw device containers) which are added (during tablespace creation or after) or extended are now done so in parallel through the prefetchers. To achieve an increase in parallelism of these create / resize container operations, one can increase the number of prefetchers running in the system. The only process which is not done in parallel is the logging of these actions and, in the case of creating containers, the tagging of the containers. Note: Parallelism of the CREATE TABLESPACE / ALTER TABLESPACE (with respect to adding new containers to an existing tablespace) will no longer increase when the number of prefetchers equals the number of containers being added. ------------------------------------------------------------------------ 7.2 Chapter 1. Administering DB2 using GUI Tools Within the section titled "The Alert Center", remove the last two sentences in the section. Within the section titled "Performance Monitor", remove the second bullet item from the "Define performance variables" list in the subsection "Monitoring Performance at a Point in Time." Also later in this same subsection, the last few paragraphs in the section should be rewritten as follows: For each, a variety of performance variables can be monitored. The Performance Variable Reference Help, available from the Help menu of any Snapshot Monitor window, provides a description of all the performance variables. These variables are organized into categories. The following categories exist: * Instance: Agents, Connections, Sort * Database: Lock and Deadlock, Buffer Pool and I/O, Connections, Sort, SQL Statement Activity * Table: Table * Table space: Buffer Pool and I/O * Database Connections: Buffer Pool and I/O, Lock and Deadlock, Sort, SQL Statement Activity For detailed information on how to generate snapshots, see the online help. In this same section, remove the last sentence in the subsection titled "Action Required When an Object Appears in the Alert Center." ------------------------------------------------------------------------ 7.3 Chapter 3. Creating a Database 7.3.1 Creating a Table Space 7.3.1.1 Using Raw I/O on Linux Linux has a pool of raw device nodes that must be bound to a block device before raw I/O can be performed on it. There is a raw device controller that acts as the central repository of raw to block device binding information. Binding is performed using a utility named raw, which is normally supplied by the Linux distributor. Before you set up raw I/O on Linux, you require the following: * one or more free IDE or SCSI disk partitions * Linux kernel 2.4.0 or later (However, some Linux distributions offer raw I/O on 2.2 kernels.) * a raw device controller named /dev/rawctl or /dev/raw. If not, create a symbolic link: # ln -s /dev/your_raw_dev_ctrl /dev/rawctl * the raw utility, which is usually provided with the Linux distribution * DB2 Version 7.1 FixPak 3 or later Note: Of the distributions currently supporting raw I/O, the naming of raw device nodes is different: Distribution Raw device nodes Raw device controller ------------ -------------------- --------------------- RedHat 6.2 /dev/raw/raw1 to 255 /dev/rawctl SuSE 7.0 /dev/raw1 to 63 /dev/raw DB2 supports either of the above raw device controllers, and most other names for raw device nodes. Raw devices are not supported by DB2 on Linux/390. To configure raw I/O on Linux: In this example, the raw partition to be used is /dev/sda5. It should not contain any valuable data. Step Calculate the number of 4 096-byte pages in this partition, rounding 1. down if necessary. For example: # fdisk /dev/sda Command (m for help): p Disk /dev/sda: 255 heads, 63 sectors, 1106 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/sda1 1 523 4200997 83 Linux /dev/sda2 524 1106 4682947+ 5 Extended /dev/sda5 524 1106 4682947 83 Linux Command (m for help): q # The number of pages in /dev/sda5 is num_pages = floor( ((1106-524+1)*16065*512)/4096 ) num_pages = 11170736 Step Bind an unused raw device node to this partition. This needs to be 2. done every time the machine is rebooted, and requires root access. Use raw -a to see which raw device nodes are already in use: # raw /dev/raw/raw1 /dev/sda5 /dev/raw/raw1: bound to major 8, minor 5 Step Set global read permissions on the raw device controller and the 3. disk partition. Set global read and write permissions on the raw device: # chmod a+r /dev/rawctl # chmod a+r /dev/sdb1 # chmod a+rw /dev/raw/raw1 Step Create the table space in DB2, specifying the raw device, not the 4. disk partition. For example: CREATE TABLESPACE dms1 MANAGED BY DATABASE USING (DEVICE '/dev/raw/raw1' 11170736) Table spaces on raw devices are also supported for all other page sizes supported by DB2. 7.3.2 Creating a Sequence Following the section titled "Defining an Identity Column on a New Table," add the following section, "Creating a Sequence": A sequence is a database object that allows the automatic generation of values. Sequences are ideally suited to the task of generating unique key values. Applications can use sequences to avoid possible concurrency and performance problems resulting from the generation of a unique counter outside the database. Unlike an identity column attribute, a sequence is not tied to a particular table column nor is it bound to a unique table column and only accessible through that table column. A sequence can be created, or altered, so that it generates values in one of these ways: * Increment or decrement monotonically without bound * Increment or decrement monotonically to a user-defined limit and stop * Increment or decrement monotonically to a user-defined limit and cycle back to the beginning and start again The following is an example of creating a sequence object: CREATE SEQUENCE order_seq START WITH 1 INCREMENT BY 1 NOMAXVALUE NOCYCLE CACHE 24 In this example, the sequence is called order_seq. It will start at 1 and increase by 1 with no upper limit. There is no reason to cycle back to the beginning and restart from 1 because there is no assigned upper limit. The number associated with the CACHE parameter specifies the maximum number of sequence values that the database manager preallocates and keeps in memory. The sequence numbers generated have the following properties: * Values can be any exact numeric data type with a scale of zero. Such data types include: SMALLINT, BIGINT, INTEGER, and DECIMAL. * Consecutive values can differ by any specified integer increment. The default increment value is 1. * Counter value is recoverable. The counter value is reconstructed from logs when recovery is required. * Values can be cached to improve performance. Preallocating and storing values in the cache reduces synchronous I/O to the log when values are generated for the sequence. In the event of a system failure, all cached values that have not been committed are never used and considered lost. The value specified for CACHE is the maximum number of sequence values that could be lost. If a database that contains one or more sequences is recovered to a prior point in time, then this could cause the generation of duplicate values for some sequences. To avoid possible duplicate values, a database with sequences should not be recovered to a prior point in time. Sequences are only supported in a single node database. There are two expressions used with a sequence. The PREVVAL expression returns the most recently generated value for the specified sequence for a previous statement within the current session. The NEXTVAL expression returns the next value for the specified sequence. A new sequence number is generated when a NEXTVAL expression specifies the name of the sequence. However, if there are multiple instances of a NEXTVAL expression specifying the same sequence name within a query, the counter for the sequence is incremented only once for each row of the result. The same sequence number can be used as a unique key value in two separate tables by referencing the sequence number with a NEXTVAL expression for the first table, and a PREVVAL expression for any additional tables. For example: INSERT INTO order (orderno, custno) VALUES (NEXTVAL FOR order_seq, 123456); INSERT INTO line_item (orderno, partno, quantity) VALUES (PREVVAL FOR order_seq, 987654, 1) The NEXTVAL or PREVVAL expressions can be used in the following locations: * INSERT statement, VALUES clause * SELECT statement, SELECT list * SET assignment statement * UPDATE statement, SET clause * VALUES or VALUES INTO statement 7.3.3 Comparing IDENTITY Columns and Sequences Following the new section titled "Creating a Sequence", add the following section: While there are similarities between IDENTITY columns and sequences, there are also differences. The characteristics of each can be used when designing your database and applications. An identity column has the following characteristics: * An identity column can be defined as part of a table only when the table is created. Once a table is created, you cannot alter it to add an identity column. (However, existing identity column characteristics may be altered.) * An identity column automatically generates values for a single table. * When an identity column is defined as GENERATED ALWAYS, the values used are always generated by the database manager. Applications are not allowed to provide their own values during the modification of the contents of the table. A sequence object has the following characteristics: * A sequence object is a database object that is not tied to any one table. * A sequence object generates sequential values that can be used in any SQL statement. * Since a sequence object can be used by any application, there are two expressions used to control the retrieval of the next value in the specified sequence and the value generated previous to the statement being executed. The PREVVAL expression returns the most recently generated value for the specified sequence for a previous statement within the current session. The NEXTVAL expression returns the next value for the specified sequence. The use of these expressions allows the same value to be used across several SQL statements within several tables. While these are not all of the characteristics of these two items, these characteristics will assist you in determining which to use depending on your database design and the applications using the database. 7.3.4 Creating an Index, Index Extension, or an Index Specification Within the section titled "Creating an Index, Index Extension, or an Index Specification", add the following note in the paragraph beginning with the sentence: "Any column that is part of an index key is limited to 255 bytes." : The DB2_INDEX_2BYTEVARLEN registry variable can be used to allow columns with a length greater than 255 bytes to be specified as part of an index key. ------------------------------------------------------------------------ 7.4 Chapter 4. Altering a Database Under the section "Altering a Table Space", the following new sections are to be added: 7.4.1 Adding a Container to an SMS Table Space on a Partition You can add a container to an SMS table space on a partition (or node) that currently has no containers. The contents of the table space are rebalanced across all containers. Access to the table space is not restricted during the rebalancing. If you need to add more than one container, you should add them all at the same time. To add a container to an SMS table space using the command line, enter the following: ALTER TABLESPACE ADD ('') ON NODE () The partition specified by number, and every partition (or node) in the range of partitions, must exist in the nodegroup on which the table space is defined. A partition_number may only appear explicitly or within a range in exactly one on-nodes-clause for the statement. The following example shows how to add a new container to partition number 3 of the nodegroup used by table space "plans" on a UNIX based operating system: ALTER TABLESPACE plans ADD ('/dev/rhdisk0') ON NODE (3) Following the section titled "Changing Table Attributes," add the following sections: 7.4.2 Altering an Identity Column Modify the attributes of an existing identity column with the ALTER TABLE statement. For more information on this statement, including its syntax, refer to the SQL Reference. There are several ways to modify an identity column so that it has some of the characteristics of sequences. There are some tasks that are unique to the ALTER TABLE and the identity column: * RESTART resets the sequence associated with the identity column to the value specified implicitly or explicitly as the starting value when the identity column was originally created. * RESTART WITH resets the sequence associated with the identity column to the exact numeric constant value. The numeric constant could be any positive or negative value with no non-zero digits to the right of any decimal point that could be assigned to the identity column. 7.4.3 Altering a Sequence Modify the attributes of an existing sequence with the ALTER SEQUENCE statement. For more information on this statement, including its syntax, refer to the SQL Reference. The attributes of the sequence that can be modified include: * Changing the increment between future values * Establishing new minimum or maximum values * Changing the number of cached sequence numbers * Changing whether the sequence will cycle or not * Changing whether sequence numbers must be generated in order of request * Restarting the sequence There are two tasks that are not found as part of the creation of the sequence. They are: * RESTART. Resets the sequence to the value specified implicitly or explicitly as the starting value when the sequence was created. * RESTART WITH numeric-constant. Resets the sequence to the exact numeric constant value. The numeric constant can be any positive or negative value with no non-zero digits to the right of any decimal point. After restarting a sequence or changing to CYCLE, it is possible to generate duplicate sequence numbers. Only future sequence numbers are affected by the ALTER SEQUENCE statement. The data type of a sequence cannot be changed. Instead, you must drop the current sequence and then create a new sequence specifying the new data type. All cached sequence values not used by DB2 are lost when a sequence is altered. 7.4.4 Dropping a Sequence To delete a sequence, use the DROP statement. For more information on this statement, including its syntax, refer to the SQL Reference. A specific sequence can be dropped by using: DROP SEQUENCE sequence_name where the sequence_name is the name of the sequence to be dropped and includes the implicit or explicit schema name to exactly identify an existing sequence. Sequences that are system-created for IDENTITY columns cannot be dropped using the DROP SEQUENCE statement. Once a sequence is dropped, all privileges on the sequence are also dropped. 7.4.5 Switching the State of a Table Space The SWITCH ONLINE clause of the ALTER TABLESPACE statement can be used to move table spaces in an OFFLINE state to an ONLINE state if the containers associated with that table space have become accessible. The table space is moved to an ONLINE state while the rest of the database is still up and being used. An alternative to the use of this clause is to disconnect all applications from the database and then to have the applications connect to the database again. This moves the table space from an OFFLINE state to an ONLINE state. To switch the table space to an ONLINE state using the command line, enter: ALTER TABLESPACE SWITCH ONLINE 7.4.6 Modifying Containers in a DMS Table Space DMS tables spaces are now created and resized in parallel, which offers a performance benefit. The degree of parallelism is equal to the number of prefetchers plus 1. ------------------------------------------------------------------------ 7.5 Chapter 5. Controlling Database Access Following the section titled "Index Privileges," add the following section: 7.5.1 Sequence Privileges The creator of a sequence automatically receives the USAGE privilege. The USAGE privilege is needed to use NEXTVAL and PREVVAL expressions for the sequence. To allow other users to use the NEXTVAL and PREVVAL expressions, sequence privileges must be granted to PUBLIC. This allows all users to use the expressions with the specified sequence. Following the section titled "Monitoring Access to Data Using the Audit Facility," add the following section: 7.5.2 Data Encryption One part of your security plan may involve encrypting your data. To do this, you can use encryption and decryption built-in functions: ENCRYPT, DECRYPT_BIN, DECRYPT_CHAR, and GETHINT. For more information on these functions, including their syntax, refer to the SQL Reference section of the Release Notes. The ENCRYPT function encrypts data using a password-based encryption method. These functions also allow you to encapsulate a password hint. The password hint is embedded in the encrypted data. Once encrypted, the only way to decrypt the data is by using the correct password. Developers that choose to use these functions should plan for the management of forgotten passwords and unusable data. The result of the ENCRYPT functions is the same data type as the first argument. Only VARCHARs can be encrypted. The declared length of the result is one of the following: * The length of the data argument plus 42 when the optional hint parameter is specified. * The length of the data argument plus 10 when the optional hint parameter is not specified. The DECRYPT_BIN and DECRYPT_CHAR functions decrypt data using password-based decryption. The result of the DECRYPT_BIN and DECRYPT_CHAR functions is the same data type as the first argument. The declared length of the result is the length of the original data. The GETHINT function returns an encapsulated password hint. A password hint is a phrase that will help data owners remember passwords. For example, the word "Ocean" can be used as a hint to remember the password "Pacific". The password that is used to encrypt the data is determined in one of two ways: * Password Argument. The password is a string that is explicitly passed when the ENCRYPT function is invoked. The data is encrypted and decrypted with the given password. * Special Register Password. The SET ENCRYPTION PASSWORD statement encrypts the password value and sends the encrypted password to the database manager to store in a special register. ENCRYPT, DECRYPT_BIN and DECRYPT_CHAR functions invoked without a password parameter use the value in the ENCRYPTION PASSWORD special register. The initial or default value for the special register is an empty string. Valid lengths for passwords are between 6 and 127 inclusive. Valid lengths for hints are between 0 and 32 inclusive. When the ENCRYPTION PASSWORD special register is set from the client, the password is encrypted at the client, sent to the database server, and then decrypted. To ensure that the password is not left readable, it is also re-encrypted at the database server. DECRYPT_BIN and DECRYPT_CHAR functions must decrypt the special register before use. The value found in the ENCRYPTION PASSWORD is also not left readable. Gateway security is not supported. ------------------------------------------------------------------------ 7.6 Chapter 8. Recovering a Database 7.6.1 How to Use Suspended I/O In Chapter 8."Recovering a Database", the following new section on using the suspended I/O function is to be added: Note: The information below about the db2inidb utility supercedes the information in the Version 7.2 What's New book. db2inidb is a new tool shipped with DB2 that can perform crash recovery and put a database in rollforward pending state. Suspended I/O supports continuous system availability by providing a full implementation for online split mirror handling, that is, splitting a mirror without shutting down the database. If a customer cannot afford doing offline or online backups on a large database, backups or system copies can be done from a mirror image by using suspended I/O and split mirror. Depending on how the storage devices are being mirrored, the uses of db2inidb will vary. The following uses assume that the entire database is mirrored consistently through the storage system. In a multi-node environment, the db2inidb tool must be run on every partition before the split image can be used from any of the partitions. The db2inidb tool can be run on all partitions simultaneously. 1. Making a Clone Database The objective here is to have a clone of the primary database to be used for read-only purposes. The following procedure describes how a clone database may be made: a. Suspend I/O on the primary system by entering the following command: db2 set write suspend for database b. Use the operating system level command to split the mirror from the primary database. c. Resume I/O on primary system by entering the following command: db2 set write resume for database After running the command, the database on the primary system should be back to a normal state. d. Attach to the mirrored database from another machine. e. Start the database instance by entering the following command: db2start f. Start the DB2 crash recovery by entering the following command: db2inidb database_name AS SNAPSHOT Note: This command will rollback the changes made by transactions that are inflight at the time of the split. You can also use this process for an offline backup, but if restored on the primary system, this backup cannot be used to roll forward, because the log chain will not match. 2. Using the Split Mirror as a Standby Database As the mirrored (standby) database is continually rolling forward through the logs, new logs that are being created by the primary database, are constantly fetched from the primary system. The following procedure describes how the split mirror can be used as a standby database: a. Suspend I/O writes on the primary database. b. Split the mirror from the primary system. c. Resume the I/O writes on the primary database so that the primary database goes back to normal processing. d. Attach the mirrored database to another instance. e. Place the mirror in roll-forward pending and roll forward the mirror. Run the db2inidb tool (db2inidb as standby) to remove the suspend write state and to place the mirrored database in a roll-forward pending state. f. Copy logs by setting up a user exit program to retrieve log files from the primary system to ensure that the latest logs will be available for this mirrored database. g. Roll forward the database to the end of the logs. h. Go back to step f and repeat this process until the primary database is down. 3. Using the Split Mirror as a Backup Image The following procedure describes how to use the mirrored system as a backup image to restore over the primary system: a. Use operating system commands to copy the mirrored data and logs on top of the primary system. b. Start the database instance by entering the following command: db2start c. Run the following command to place the mirrored database in a roll-forward pending state and to remove the suspend write state. db2inidb database_alias AS MIRROR d. Roll forward the database to the end of the logs. 7.6.2 Incremental Backup and Recovery In Chapter 8,"Recovering a Database," the following is a new section about incremental backup and recovery: As the size of databases, and particularly warehouses, continues to expand into the terabyte and petabyte range, the time and hardware resources required to back up and recover these databases are also growing substantially. Full database and table space backups are not always the best approach when dealing with large databases, because the storage requirements for multiple copies of such databases are enormous. Consider the following issues: * When a small percentage of the data in a warehouse changes, it should not be necessary to back up the entire database. * Appending table spaces to existing databases and then taking only table space backups is risky, because data outside of the backed up table spaces may change. DB2 now supports incremental backup and recovery (but not of long field or large object data). An incremental backup is a backup image that contains only pages that have been updated since the previous backup was taken. In addition to updated data and index pages, each incremental backup image also contains all of the initial database meta-data (such as database configuration, table space definitions, database history, and so on) that is normally stored in full backup images. Two types of incremental backup are supported: * Incremental. An incremental backup image is a copy of all database data that has changed since the most recent successful full backup operation. This is also known as a cumulative backup image, because a series of incremental backups taken over time will each have the contents of the previous incremental backup image. The predecessor of an incremental backup image is always the most recent successful full backup of the same object. * Delta. A delta, or incremental delta, backup image is a copy of all database data that has changed since the last successful backup (full, incremental, or delta) of the table space in question. This is also known as a differential, or non-cumulative, backup image. The predecessor of a delta backup image is the most recent successful backup containing a copy of each of the table spaces in the delta backup image. The key difference between incremental and delta backup images is their behavior when successive backups are taken of an object that is continually changing over time. Each successive incremental image contains the entire contents of the previous incremental image, plus any data that has changed, or is new, since the previous backup was produced. Delta backup images contain only the pages that have changed since the previous image was produced. Combinations of database and table space incremental backups are permitted, in both online and offline modes of operation. Be careful when planning your backup strategy, because combining database and table space incremental backups implies that the predecessor of a database backup (or a table space backup of multiple table spaces) is not necessarily a single image, but could be a unique set of previous database and table space backups taken at different times. To rebuild the database or the table space to a consistent state, the recovery process must begin with a consistent image of the entire object (database or table space) to be restored, and must then apply each of the appropriate incremental backup images in the order described below (see the "Restore Method" section). To enable the tracking of database updates, DB2 supports a new database configuration parameter, TRACKMOD, which can have one of two accepted values: * NO. Incremental backup is not permitted with this configuration. Database page updates are not tracked or recorded in any way. * YES. Incremental backup is permitted with this configuration. When update tracking is enabled, the change becomes effective at the first successful connection to any database in the instance. A full database backup is necessary before an incremental backup can be taken. The default TRACKMOD setting for existing databases is NO; for new databases, it is YES. The granularity of the tracking is at the table space level for both SMS and DMS table spaces. Although minimal, the tracking of updates to the database can have an impact on the run-time performance of transactions that update or insert data. 7.6.2.1 Restoring from Incremental Backup Images A restore operation from incremental backup images always consists of the following steps: 1. Identifying the incremental target image.The DBA must first determine the final image to be restored, and request an incremental restore operation from the DB2 restore utility. This image is known as the target image of the incremental restore, because it will be the last image to be restored. An incremental restore command against this image may initiate the creation of a new database with the configuration and table space definitions from this target image. The incremental target image is specified using the TAKEN AT parameter in the RESTORE DATABASE command. 2. Restoring the most recent full database or table space image to establish a baseline against which each of the subsequent incremental backup images can be applied. 3. Restoring each of the required full or table space incremental backup images, in the order in which they were produced, on top of the baseline image restored in Step 2. 4. Repeating Step 3 until the target image from Step 1 is read a second time. The target image is accessed twice during a complete incremental restore operation. During the first access, only initial data is read from the image; none of the user data is read. The complete image is read and processed only during the second access. The target image of the incremental restore operation must be accessed twice to ensure that the database is initially configured with the correct history, database configuration, and table space definitions for the database that will be created during the restore operation. In cases where a table space has been dropped since the initial full database backup image was taken, the table space data for that image will be read from the backup images but ignored during incremental restore processing. For example: 1. db2 restore database sample incremental taken at where: points to the last incremental backup image to be restored 2. db2 restore database sample incremental taken at where: points to the initial full database (or table space) image 3. db2 restore database sample incremental taken at where: points to each incremental backup image in creation sequence 4. Repeat Step 3, restoring each incremental backup image up to and including image In cases where a database restore operation is being attempted, and table space incremental backup images have been produced, the table space images must be restored in the chronological order of their backup time stamps. 7.6.3 Parallel Recovery DB2 now uses multiple agents to perform both crash recovery and database rollforward recovery. You can expect better performance during these operations, particularly on symmetric multi-processor (SMP) machines; using multiple agents during database recovery takes advantage of the extra CPUs that are available on SMP machines. The new agent type introduced by this enhancement is db2agnsc. DB2 chooses the number of agents to be used for database recovery based on the number of CPUs on the machine. For SMP machines, the number of agents used is (number of CPUs + 1). On a machine with a single CPU, three agents are used for more efficient reading of logs, processing of log records, and prefetching of data pages. DB2 distributes log records to these agents so that they can be reapplied concurrently, where appropriate. The processing of log records is parallelized at the page level (log records on the same data page are processed by the same agent); therefore, performace is enhanced, even if all the work was done on one table. 7.6.4 Backing Up to Named Pipes Support is now available for database backup to (and database restore from) local named pipes on UNIX based systems. Both the writer and the reader of the named pipe must be on the same machine. The pipe must exist and be located on a local file system. Because the named pipe is treated as a local device, there is no need to specify that the target is a named pipe. Following is an AIX example: 1. Create a named pipe: mkfifo /u/dbuser/mypipe 2. Use this pipe as the target for a database backup operation: db2 backup db sample to /u/dbuser/mypipe 3. Restore the database: db2 restore db sample into mynewdb from /u/dbuser/mypipe 7.6.5 Backup from Split Image DB2 now supports a full offline database backup on the split mirrored copy of a database. Online backup is not supported and is not necessary because the database, which is in rollforward pending state, is unavailable. When a split mirrored backup image is restored, it must be rolled forward because there may have been active transactions when the split occurred. Note: For DB2 Version 7.1 FixPak 3 and DB2 Version 7.2 this support will be limited to databases that contain DMS table spaces only. If an attempt is made to back up a database after a split and the database contains any SMS table spaces, the backup will fail. Once a database has been split, the db2inidb utility must be used to specify one of the following options: * Snapshot. This initiates crash recovery, making the database consistent. A new log chain starts, and the database will not be able to roll forward through any of the logs from the original database. The database is available for any operation, including backup. * Standby. This places the database in rollforward pending state. Crash recovery is not performed, and the database remains inconsistent. * Mirror. This causes a mirrored copy of the database to replace the original database. The database is placed in rollforward pending state, and the WRITE SUSPEND state is turned off. Crash recovery is not performed, and the database remains inconsistent. Following are some usage scenarios: * Making a database clone. The objective here is to have a read-only clone of the primary database that can be used, for example, to create reports. To do this, follow these steps: 1. Suspend I/O on the primary system: db2 set write suspend for database 2. Split the mirror. Use operating system level commands to split the mirror from the primary database. 3. Resume I/O on the primary system: db2 set write resume for database The database on the primary system should now be back to a normal state. 4. Mount the split mirrors of the database to another host. 5. Start the instance: db2start 6. Start DB2 crash recovery: db2inidb as snapshot You can also use this process for an offline backup, but if restored on the primary system, this backup cannot be used to roll forward, because the log chain will not match. * Using the split mirror as a standby database. The idea here is that the mirrored (standby) database is continually rolling forward through the logs, and even new logs that are being created by the primary database are continually fetched from the primary system. To use the split mirror as a standby database, follow these steps: 1. Suspend I/O on the primary system: db2 set write suspend for database 2. Split the mirror. Use operating system level commands to split the mirror from the primary database. 3. Resume I/O on the primary system: db2 set write resume for database The database on the primary system should now be back to a normal state. 4. Mount the split mirrors of the database to another host. 5. Remove the suspend write state and put the mirrored database in rollforward pending state. db2inidb as standby 6. Copy logs. Set up a user exit program to retrieve log files from the primary system's archive location, so that the latest logs will be available for this mirrored database. 7. Rollforward the mirror to the end of the logs. db2 rollforward db to end of logs 8. Repeat the process from step 6 until the primary database is down. * Using the split mirror to recover the primary system. The following procedure describes how to use the mirrored system as a backup image to restore the primary system: 1. Copy over. Use operating system commands to copy the mirrored data and logs on top of the primary system. 2. Start the instance: db2start 3. Put the restored mirror in rollforward pending state and roll the mirror forward to the end of the logs: db2inidb as mirror * Taking a backup without performing crash recovery. Performing an offline backup on the split mirror without performing crash recovery means that you can restore this backup image on top of the primary system. To do this, follow these steps: 1. Suspend I/O on the primary system: db2 set write suspend for database 2. Split the mirror. Use operating system level commands to split the mirror from the primary database. 3. Resume I/O on the primary system: db2 set write resume for database The database on the primary system should now be back to a normal state. 4. Mount the split mirrors of the database to another host. 5. Start the instance: db2start 6. Put the mirrored database in rollforward pending state: db2inidb as standby 7. Invoke a database backup operation: db2 backup database This results in an implicit database connection, but does not initiate DB2 crash recovery. 7.6.6 On Demand Log Archive DB2 now supports the closing (and, if the user exit option is enabled, the archiving) of the active log for a recoverable database at any time. This allows you to collect a complete set of log files up to a known point, and then to use these log files to update a standby database. Note: On demand log archiving does not guarantee the log files will be archived immediately; it truncates the log file and issues an archive request, but it is still subject to delays associated with the user exit program You can initiate on demand log archiving by invoking the new DB2 ARCHIVE LOG command, or by calling the new db2ArchiveLog API. 7.6.7 Log Mirroring In Chapter 8,"Recovering a Database," the following new section on using the suspended I/O function is to be added: DB2 now supports log mirroring at the database level. Mirroring log files helps protect a database from: * Accidental deletion of an active log * Data corruption caused by hardware failure If you are concerned that your active logs may be damaged (as a result of a disk crash), you should consider using a new DB2 registry variable, DB2_NEWLOGPATH2, to specify a secondary path for the database to manage copies of the active log, mirroring the volumes on which the logs are stored. The DB2_NEWLOGPATH2 registry variable allows the database to write an identical second copy of log files to a different path. It is recommended that you place the secondary log path on a physically separate disk (preferably one that is also on a different disk controller). That way, the disk controller cannot be a single point of failure. Note: Because Windows NT and OS/2 do not allow "mounting" a device under an arbitrary path name, it is not possible (on these platforms) to specify a secondary path on a separate device. DB2_NEWLOGPATH2 can be enabled (set to 1) or disabled (set to 0). The default value is zero. If this variable is set to 1, the secondary path name is the current value of the LOGPATH variable concatenated with the character 2. For example, in an SMP environment, if LOGPATH is /u/dbuser/sqllogdir/logpath, the secondary log path will be /u/dbuser/sqllogdir/logpath2. In an MPP environment, if LOGPATH is /u/dbuser/sqllogdir/logpath, DB2 will append the node indicator to the path and use /u/dbuser/sqllogdir/logpath/NODE0000 as the primary log path. In this case, the secondary log path will be /u/dbuser/sqllogdir/logpath2/NODE0000. When DB2_NEWLOGPATH2 is first enabled, it will not actually be used until the current log file is completed on the next database startup. This is similar to how NEWLOGPATH is currently used. If there is an error writing to either the primary or secondary log path, the database will mark the failing path as "bad", write a message to the db2diag.log file, and write subsequent log records to the remaining "good" log path only. DB2 will not attempt to use the "bad" path again until the current log file is completed. When DB2 needs to open the next log file, it will verify that this path is valid, and if so, will begin to use it. If not, DB2 will not attempt to use the path again until the next log file is accessed for the first time. There is no attempt to synchronize the log paths, but DB2 keeps information about access errors that occur, so that the correct paths are used when log files are archived. If a failure occurs while writing to the remaining "good" path, the database abends. 7.6.8 Cross Platform Backup and Restore Support on Sun Solaris and HP Support is now available for cross platform backup and restore support between Sun Solaris and HP. When you transfer the backup image between systems, you must transfer it in binary mode. On the target system, the database must be created with the same code page/territory as the system on which the original database was created. 7.6.9 DB2 Data Links Manager Considerations/Backup Utility Considerations Replace the second paragraph in this section with: When files are linked, the Data Links servers schedule them to be copied asynchronously to an archive server such as ADSM, or to disk. When the backup utility runs, DB2 ensures that all files scheduled for copying have been copied. At the beginning of backup processing, DB2 contacts all Data Links servers that are specified in the DB2 configuration file. If a Data Links server has one or more linked files and is not running, or stops running during the backup operation, the backup will not contain complete DATALINK information. The backup operation will complete successfully. Before the Data Links server can be marked as available to the database again, backup processing for all outstanding backups must complete successfully. If a backup is initiated when there are already twice the value of num_db_backups (see below) outstanding backups waiting to be completed on the Data Links server, the backup operation will fail. That Data Links server must be restarted and the outstanding backups completed before additional backups are allowed. 7.6.10 DB2 Data Links Manager Considerations/Restore and Rollforward Utility Considerations Replace paragraphs beginning with: When you restore a database or table space and do not specify the WITHOUT DATALINK... and When you restore a database or table space and you do specify the WITHOUT DATALINK option... with: When you restore a database or table space, the following conditions must be satisfied for the restore operation to succeed: o If any Data Links Server recorded in the backup file is not running, the restore operation will still complete successfully. Tables with DATALINK column information that are affected by the missing Data Links server will be put into datalink reconcile pending state after the restore operation (or the rollforward operation, if used) completes. Before the Data Links servers can be marked as available to the database again, this restore processing must complete successfully. o If any Data Links Server recorded in the backup file stops running during the restore operation, the restore operation will fail. The restore can be restarted with the Data Links Server down (see above). o If a previous database restore operation is still incomplete on any Data Links server, subsequent database or table space restore operations will fail until those Data Links servers are restarted, and the incomplete restore is completed. o Information about all DATALINK columns that are recorded in the backup file must exist in the appropriate Data Links servers' registration tables. If all the information about the DATALINK columns is not recorded in the registration tables, the table with the missing DATALINK column information is put into datalink reconcile not possible state after the restore operation (or the roll-forward operation, if used) completes. If the backup is not recorded in the registration tables, it may mean that the backup file that is provided is earlier than the value for num_db_backups and has already been "garbage collected". This means that the archived files from this earlier backup have been removed and cannot be restored. All tables that have DATALINK columns are put into datalink reconcile pending state. If the backup is not recorded in the registration tables, it may mean that backup processing has not yet been completed because the Data Links server is not running. All tables that have DATALINK columns are put into datalink reconcile pending state. When the Data Links server is restarted, backup processing will be completed before restore processing. The table remains available to users, but the values in the DATALINK columns may not reference the files accurately (for example, a file may not be found that matches a value for the DATALINK column). If you do not want this behavior, you can put the table into check pending state by issuing the "SET CONSTRAINTS for tablename TO DATALINK RECONCILE PENDING" statement. If, after a restore operation, you have a table in datalink reconcile not possible state, you can fix the DATALINK column data in one of the ways suggested under "Removing a Table from the Datalink_Reconcile_Not_Possible State". The note at the bottom of the first paragraph remains the same. Add the following at the end of this section: It is strongly recommended that the datalink.cfg file be archived to cover certain unusual recovery cases, since the datalink.cfg file in the database backup image only reflects the datalink.cfg as of the backup time. Having the latest datalink.cfg file is required to cover all recovery cases. Therefore, the datalink.cfg file must be backed up after every ADD DATALINKS MANAGER or DROP DATALINKS MANAGER command invocation. This would help to retrieve the latest datalink.cfg file, if the latest datalink.cfg file is not available on disk. If the latest datalink.cfg file is not available on disk, replace the existing datalink.cfg file (restored from a backup image) with the latest datalink.cfg file that was archived before running a rollforward operation. Do this after the database is restored. 7.6.11 Restoring Databases from an Offline Backup without Rolling Forward You can only restore without rolling forward at the database level, not the table space level. To restore a database without rolling forward, you can either restore a nonrecoverable database (that is, a database that uses circular logging), or specify the WITHOUT ROLLING FORWARD parameter on the RESTORE DATABASE command. If you use the restore utility with the WITHOUT DATALINK option, all tables with DATALINK columns are placed in datalink reconcile pending (DRP) state, and no reconciliation is performed with the Data Links servers during the restore operation. If you do not use the WITHOUT DATALINK option, and a Data Links server recorded in the backup file is no longer defined to the database (that is, it has been dropped using the DROP DATALINKS MANAGER command), tables that contain DATALINK data referencing the dropped Data Links server are put in DRP state by the restore utility. If you do not use the WITHOUT DATALINK option, all the Data Links servers are available, and all information about the DATALINK columns is fully recorded in the registration tables, the following occurs for each Data Links server recorded in the backup file: * All files linked after the backup image that was used for the database restore operation are marked as unlinked (because they are not recorded in the backup image as being linked). * All files that were unlinked after the backup image, but that were linked before the backup image was taken, are marked as linked (because they are recorded in the backup image as being linked). If the file was subsequently linked to another table in another database, the restored table is put into the datalink reconcile pending state. Note: The above cannot be done if the backup image that was used for the database restore operation was taken when at least one Data Links server was not running, since the DATALINK information in the backup is incomplete. The above is also not done if the backup image that was used for the database restore operation was taken after a database restore with or without rollforward. In both cases, all tables with DATALINK columns are placed in datalink reconcile pending state, and no reconciliation is performed with the Data Links servers during the restore operation. 7.6.12 Restoring Databases and Table Spaces, and Rolling Forward to the End of the Logs If you restore, then roll forward the database or table space to the end of the logs (meaning that all logs are provided), a reconciliation check is not required unless at least one of the Data Links servers recorded in the backup file is not running during the restore operation. If you are not sure whether all the logs were provided for the roll-forward operation, or think that you may need to reconcile DATALINK values, do the following: 1. Issue the SQL statement for the table (or tables) involved: SET CONSTRAINTS FOR tablename TO DATALINK RECONCILE PENDING This puts the table into datalink reconcile pending state and check pending state. 2. If you do not want a table to be in check pending state, issue the following SQL statement: SET CONSTRAINTS FOR tablename IMMEDIATE CHECKED This takes the table out of check pending state, but leaves it in datalink reconcile pending state. You must use the reconcile utility to take the table out of this state. It may happen that the backup file contains DATALINK data that refers to a DB2 Data Links Manager (that is, a DB2 Data Links Manager was registered to the database when the backup was taken) that has been dropped from the database. For each table space being rolled forward that contains at least one table with DATALINK data referencing the dropped DB2 Data Links Manager, all tables are put in DRP state by the rollforward utility. 7.6.13 DB2 Data Links Manager and Recovery Interactions The following table shows the different types of recovery that you can perform, the DB2 Data Links Manager processing that occurs during restore and roll-forward processing, and whether you need to run the Reconcile utility after the recovery is complete: Type of Recovery DB2 Data Links Manager DB2 Data Links Manager Reconcile Processing during Restore Processing during Rollforward Non-recoverable database (logretain=NO) Database restore Fast reconcile is performed N/A Can be optionally of a complete run if problem with backup, all Data file links is Links Servers up suspected Database restore Tables put in N/A Required using WITHOUT Datalink_Reconcile _Pending DATALINK option state Database restore Fast reconcile is performed NA Required for tables of a complete only on those tables in in table spaces backup, at least table spaces that do not with links to the one Data Links have links to a Data Links Data Links server server down server that is down, other that is down tables put in Datalink_Reconcile_Pending state Database restore Fast reconcile is not NA Required of an incomplete performed, all tables with backup, all Data DATALINK columns put in Links servers up Datalink_Reconcile_Pending state Recoverable database (logretain=YES) Database restore Fast reconcile is performed N/A Optional using WITHOUT ROLLING FORWARD option, using a complete backup, all Data Links servers up Database restore Tables put in N/A Required using WITHOUT Datalink_Reconcile _Pending ROLLING FORWARD state and WITHOUT DATALINK options, using a complete or incomplete backup, Data Links servers up or down Database restore Fast reconcile is performed N/A Required on tables using WITHOUT only on those tables in in table spaces ROLLING FORWARD table spaces that do not with links to the option, using a have links to the Data Data Links servers complete backup, Links servers that are that are down at least one Datadown, other tables put in Links server downDatalink_Reconcile_Pending state Database restore Fast reconcile is not N/A Required using WITHOUT performed, all tables with ROLLING FORWARD DATALINK columns put into option, using an Datalink_Reconcile_Pending incomplete state backup, Data Links servers up or down Database restore No action No action Optional and roll forward to end of logs, using a complete backup, all Data Links servers up Database restore No action No action Optional and roll forward to end of logs, using a complete backup, at least one Data Links server down during roll forward processing Database restore No action All tables with DATALINK Required for all and roll forward columns put into tables with to end of logs, Datalink_Reconcile_Pending DATALINK columns using a complete state or an incomplete backup, any Data Links server down during restore Database restore No action No action Optional and roll forward to end of logs, using an incomplete backup, all Data Links servers up during restore Database restore No action All tables in table spaces Required and roll forward with links to a Data Links to end of logs, server where the backup is using a complete unknown put in or an incomplete Datalink_Reconcile_Pending backup, all Data state Links servers up, backup unknown at any Data Links server Table space No action No action Optional restore and roll forward to end of logs, using a complete backup, all Data Links servers up Table space No action No action Optional restore and roll forward to end of logs, using a complete backup, at least one Data Links server down during roll forward processing Table space No action All tables in table spaces Required for tables restore and roll with links to any Data in table spaces forward to end of Links server that is down with links to any logs, using a put into Data Links server complete or an Datalink_Reconcile_Pending that is down incomplete state backup, any Data Links server down during restore processing Table space No action No action Optional restore and roll forward to end of logs, using an incomplete backup, all Data Links servers up Database restore No action Tables put in Required and roll forward Datalink_Reconcile _Pending to a point in state time, using a complete or an incomplete backup, Data Links servers up or down during restore and/or roll forward processing Table space No action Tables put in Required restore and roll Datalink_Reconcile _Pending forward to a state point in time, using a complete or an incomplete backup, Data Links servers up or down during restore and/or rollfoward processing Database restore Tables put in N/A Optional, but to a different Datalink_Reconcile tables in database name, _Not_Possible state Datalink_Reconcile alias, hostname, _Not_Possible state or instance with must be manually no roll forward fixed (NOTE1) Database restore No action Tables put in Optional, but to a different Datalink_Reconcile tables in database name, _Not_Possible state Datalink_Reconcile alias, hostname _Not_Possible state or instance, and must be manually roll forward fixed Database restore Tables put in No action Required from an unusable Datalink_Reconcile _Pending backup (image hasstate been garbage-collected on the Data Links server) with no roll forward (NOTE1), with or without WITHOUT DATALINK option Database restore No action Tables put in Required from an unusable Datalink_Reconcile _Pending backup (image has state been garbage-collected on the Data Links server), and roll forward, with or without WITHOUT DATALINK option Table space No action Tables put in Required restore from an Datalink_Reconcile _Pending unusable backup state (image has been garbage-collected on the Data Links server), and roll forward Note: 1. A restore using an offline backup and the WITHOUT ROLLING FORWARD option (logretain is on), or a restore using an offline backup (logretain is off). 2. A complete backup is a backup taken when all required Data Links servers were running. An incomplete backup is a backup taken when at least one required Data Links server was not running. 3. Fast reconcile processing will not be performed if the backup image that was used for the database restore operation was taken after a database restore, with or without rollforward. In this case, all tables with DATALINK columns are put in Datalink_Reconcile_Pending state. 7.6.14 Detection of Situations that Require Reconciliation Following are some situations in which you may need to run the reconcile utility: * The entire database is restored and rolled forward to a point in time. Because the entire database is rolled forward to a committed transaction, no tables will be in check pending state (due to referential constraints or check constraints). All data in the database is brought to a consistent state. The DATALINK columns, however, may not be synchronized with the metadata in the DB2 Data Links Manager, and reconciliation is required. In this situation, tables with DATALINK data will already be in DRP state. You should invoke the reconcile utility for each of these tables. * A particular Data Links server running the DB2 Data Links Manager loses track of its metadata. This can occur for different reasons. For example: o The Data Links server was cold started. o The Data Links server metadata was restored to a back-level state. In some situations, such as during SQL UPDATEs and DELETEs, DB2 may be able to detect a problem with the metadata in a Data Links server. In these situations, the SQL statement would fail. You would put the table in DRP state by using the SET CONSTRAINTS statement, then run the reconcile utility on that table. * A file system is not available (for example, because of a disk crash) and is not restored to the current state. In this situation, files may be missing. * A DB2 Data Links Manager is dropped from a database, and there are DATALINK FILE LINK CONTROL values referencing that DB2 Data Links Manager. You should run the reconcile utility on such tables. ------------------------------------------------------------------------ 7.7 Appendix C. User Exit for Database Recovery Under the section "Archive and Retrieve Considerations", the following paragraph is no longer true and should be removed from the list: A user exit may be interrupted if a remote client loses its connection to the DB2 server. That is, while handling the archiving of logs through a user exit, one of the other SNA-connected clients dies or powers off resulting in a signal (SIGUSR1) being sent to the server. The server passes the signal to the user exit causing an interrupt. The user exit program can be modified to check for an interrupt and then continue. The Error Handling section has a Notes list that should replace the contents of Note 3 with the following information: * User exit program requests are suspended for five minutes. During this time, all requests are ignored including the log file request that caused the return code. Following the five minute suspension in processing requests, the next request is processed. If no error occurs with the processing of this request, then processing of new user exit program requests continues and DB2 will reissue the archive request for the log files that either failed to archive previously, or were suspended. If a return code of greater than 8 is generated during the retry, requests are suspended for an additional five minutes. The five minute suspensions continue until the problem is corrected or the database is stopped and restarted. Once all applications disconnect from the database and the database is reopened, DB2 will issue the archive request for any log file that might not have been successfully archived in the previous use of the database. If the user exit program fails to archive log files, your disk can be filled with log files and performance may be degraded because of extra work to format these log files. Once the disk becomes full, the database manager will not accept further application requests for database changes. If the user exit program was called to retrieve log files, roll-forward recovery is suspended but not stopped unless a stop was specified in the ROLLFORWARD DATABASE utility. If a stop was not specified, you can correct the problem and resume recovery. ------------------------------------------------------------------------ 7.8 Appendix D. Issuing Commands to Multiple Database Partition Servers At the bottom of the section "Specifying the Command to Run", add the following: When you run any korn-shell shell-script which contains logic to read from stdin in the background, you should explicitly redirect stdin to a source where the process can read without getting stopped on the terminal (SIGTTIN message). To redirect stdin, you can run a script with the following form: shell_script 8.5 AND C <= 10. The estimate of the r_2 value using linear interpolation must be changed to the following: 10 - 8.5 r_2 *= ---------- x (number of rows with value > 8.5 and <= 100.0) 100 - 8.5 10 - 8.5 r_2 *= ---------- x (10 - 7) 100 - 8.5 1.5 r_2 *= ---- x (3) 91.5 r_2 *= 0 The paragraph following this new example must also be modified to read as follows: The final estimate is r_1 + r_2 *= 7, and the error is only -12.5%. 8.3.2 Rules for Updating Catalog Statistics Within the section titled "Rules for Updating Column Statistics", the last bulleted-list item in the first list item should be replaced by the following: HIGH2KEY must be greater than LOW2KEY whenever there are more than 3 distinct values in the corresponding column. In the case of 3 or less distinct values in the column, HIGH2KEY can be equal to LOW2KEY. 8.3.3 Sub-element Statistics In FixPak 1, an option is provided to collect and use sub-element statistics. These are statistics about the content of data in columns when the data has a structure in the form of a series of sub-fields or sub-elements delimited by blanks. For example, suppose a database contains a table DOCUMENTS in which each row describes a document, and suppose that in DOCUMENTS there is a column called KEYWORDS containing a list of relevant keywords relating to this document for text retrieval purposes. The values in KEYWORDS might be as follows: 'database simulation analytical business intelligence' 'simulation model fruitfly reproduction temperature' 'forestry spruce soil erosion rainfall' 'forest temperature soil precipitation fire' In this example, each column value consists of 5 sub-elements, each of which is a word (the keyword), separated from the others by one blank. For queries that specify LIKE predicates on such columns using the % match_all character: SELECT .... FROM DOCUMENTS WHERE KEYWORDS LIKE '%simulation%' it is often beneficial for the optimizer to know some basic statistics about the sub-element structure of the column, namely: SUB_COUNT The average number of sub-elements. SUB_DELIM_LENGTH The average length of each delimiter separating each sub-element, where a delimiter, in this context, is one or more consecutive blank characters. In the KEYWORDS column example, SUB_COUNT is 5, and SUB_DELIM_LENGTH is 1, because each delimiter is a single blank character. In FixPak 1, the system administrator controls the collection and use of these statistics by means of an extension to the DB2_LIKE_VARCHAR registry variable. This registry variable affects how the DB2 UDB optimizer deals with a predicate of the form: COLUMN LIKE '%xxxxxx' where xxxxxx is any string of characters; that is, any LIKE predicate whose search value starts with a % character. (It may or may not end with a % character). These are referred to as "wildcard LIKE predicates" below. For all predicates, the optimizer has to estimate how many rows match the predicate. For wildcard LIKE predicates, the optimizer assumes that the COLUMN being matched has a structure of a series of elements concatenated together to form the entire column, and estimates the length of each element based on the length of the string, excluding leading and trailing % characters. The new syntax is: db2set DB2_LIKE_VARCHAR=[Y|N|S|num1][,Y|N|num2] where - the first term (preceding the comma) means the following, but only for columns that do not have positive sub-element statistics S Use the algorithm as used in DB2 Version 2. N Use a fixed-length sub-element algorithm. Y (default) Use a variable-length sub-element algorithm with a default value for the algorithm parameter. num1 Use a variable-length sub-element algorithm, and use num1 as the algorithm parameter. - the second term (following the comma) means: N (default) Do not collect or use sub-element statistics. Y Collect sub-element statistics. Use a variable-length sub-element algorithm that uses those statistics, together with a default value for the algorithm parameter in the case of columns with positive sub-element statistics. num2 Collect sub-element statistics. Use a variable-length sub-element algorithm that uses those statistics, together with num2 as the algorithm parameter in the case of columns with positive sub-element statistics. If the value of DB2_LIKE_VARCHAR contains only the first term, no sub-element statistics are collected, and any that have previously been collected are ignored. The value specified affects how the optimizer calculates the selectivity of wildcard LIKE predicates in the same way as before; that is: * If the value is S, the optimizer uses the same algorithm as was used in DB2 Version 2, which does not presume the sub-element model. * If the value is N, the optimizer uses an algorithm that presumes the sub-element model, and assumes that the COLUMN is of a fixed length, even if it is defined as variable length. * If the value is Y (the default) or a floating point constant, the optimizer uses an algorithm that presumes the sub-element model and recognizes that the COLUMN is of variable length, if so defined. It also infers sub-element statistics from the query itself, rather than from the data. This algorithm involves a parameter (the "algorithm parameter") that specifies how much longer the element is than the string enclosed by the % characters. * If the value is Y, the optimizer uses a default value of 1.9 for the algorithm parameter. * If the value is a floating point constant, the optimizer uses the specified value for the algorithm parameter. This constant must lie within the range of 0 to 6.2. If the value of DB2_LIKE_VARCHAR contains two terms, and the second is Y or a floating point constant, sub-element statistics on single-byte character set string columns of type CHAR, VARCHAR, GRAPHIC, or VARGRAPHIC are collected during a RUNSTATS operation and used during compilation of queries involving wildcard LIKE predicates. The optimizer uses an algorithm that presumes the sub-element model and uses the SUB_COUNT and SUB_DELIM_LENGTH statistics, as well as an algorithm parameter, to calculate the selectivity of the predicate. The algorithm parameter is specified in the same way that the inferential algorithm is specified, that is: * If the value is Y, the optimizer uses a default value of 1.9 for the algorithm parameter. * If the value is a floating point constant, the optimizer uses the specified value for the algorithm parameter. This constant must lie within the range of 0 to 6.2. If, during compilation, the optimizer finds that sub-element statistics have not been collected on the column involved in the query, it will use the "inferential" sub-element algorithm; that is, the one used when only the first term of DB2_LIKE_VARCHAR is specified. Thus, in order for the sub-element statistics to be used by the optimizer, the second term of DB2_LIKE_VARCHAR must be set both during RUNSTATS and compilation. The values of the sub-element statistics can be viewed by querying SYSIBM.SYSCOLUMNS. For example: select substr(NAME,1,16), SUB_COUNT, SUB_DELIM_LENGTH from sysibm.syscolumns where tbname = 'DOCUMENTS' The SUB_COUNT and SUB_DELIM_LENGTH columns are not present in the SYSSTAT.COLUMNS statistics view, and therefore cannot be updated. Note: RUNSTATS may take longer if this option is used. For example, RUNSTATS may take between 15 and 40% longer on a table with five character columns, if the DETAILED and DISTRIBUTION options are not used. If either the DETAILED or the DISTRIBUTION option is specified, the percentage overhead is less, even though the absolute amount of overhead is the same. If you are considering using this option, you should assess this overhead against improvements in query performance. ------------------------------------------------------------------------ 8.4 Chapter 6. Understanding the SQL Compiler The following sections require changes: 8.4.1 Replicated Summary Tables The following information will replace or be added to the existing information already in this section: Replicated summary tables can be used to assist in the collocation of joins. For example, if you had a star schema where there is a large fact table spread across twenty nodes, then the joins between the fact table and the dimension tables are most efficient if these tables are collocated. By placing all of the tables in the same nodegroup, at most there would one dimension table partitioned correctly for a collocated join. All other dimension tables would not be able to be used in a collocated join because the join column(s) on the fact table would not correspond to the fact table's partitioning key. For example, you could have a table called FACT (C1, C2, C3, ...) partitioned on C1; and a table called DIM1 (C1, dim1a, dim1b, ...) partitioned on C1; and a table called DIM2 (C2, dim2a, dim2b, ...) partitioned on C2; and so on. From this example, you could see that the join between FACT and DIM1 is perfect because the predicate DIM1.C1 = FACT.C1 would be collocated. Both of these tables are partitioned on column C1. The join between DIM2 with the predicate WHERE DIM2.C2 = FACT.C2 cannot be collocated because FACT is partitioned on column C1 and not on column C2. In this case, it would be good to replicate DIM2 in the fact table's nodegroup. In this way we can do the join locally on each partition. Note: The replicated summary tables discussion here has to do with intra-database replication. Inter-database replication has to do with subscriptions, control tables, and data located in different databases and on different operating systems. If you are interested in inter-database replication refer to the Replication 峪烈囓楯銳 for more information. When creating a replicated summary table, the source table could be a single-node nodegroup table or a multi-node nodegroup table. In most cases, the table is small and can be placed in a single-node nodegroup. You may place a limit on the data to be replicated by specifying only a subset of the columns from the table, or by limiting the number of rows through the predicates used, or by using both methods when creating the replicated summary table. Note: The data capture option is not required for replicated summary tables to function. The replicated summary table could also be created in a multi-node nodegroup. The nodegroup is the same as the nodegroup in which you have placed your large tables. In this case, copies of the source table are created on all of the partitions of the nodegroup. Joins between a large fact table and the dimension tables have a better chance of being done locally in this environment rather than having to broadcast the source table to all partitions. Indexes on replicated tables are not created automatically. Indexes are created and may be different from those identified in the source table. Note: You cannot create unique indexes (or put on any constraints) on the replicated tables. This will prevent constraint violations that are not present on the source tables. These constraints are disallowed even if there is the same constraint on the source table. After using the REFRESH statement, you should run RUNSTATS on the replicated table as you would any other table. The replicated tables can be referenced directly within a query. However, you cannot use the NODENUMBER() predicate with a replicated table to see the table data on a particular partition. To see if a created replicated summary table was used (given a query that referenced the source table), you can use the EXPLAIN facility. First, you would ensure the EXPLAIN tables existed. Then, you would create an explain plan for the SELECT statement you are interested in. Finally, you would use db2exfmt utility to format the EXPLAIN output. The access plan chosen by the optimizer may or may not use the replicated summary table depending on the information that needs to be joined. Not using the replicated summary table could occur if the optimizer determined that it would be cheaper to broadcast the original source table to the other partitions in the nodegroup. 8.4.2 Data Access Concepts and Optimization The section "Multiple Index Access" under "Index Scan Concepts" has changed. Add the following information before the note at the end of the section: To realize the performance benefits of dynamic bitmaps when scanning multiple indexes, it may be necessary to change the value of the sort heap size (sortheap) database configuration parameter, and the sort heap threshold (sheapthres) database manager configuration parameter. Additional sort heap space is required when dynamic bitmaps are used in access plans. When sheapthres is set to be relatively close to sortheap (that is, less than a factor of two or three times per concurrent query), dynamic bitmaps with multiple index access must work with much less memory than the optimizer anticipated. The solution is to increase the value of sheapthres relative to sortheap. The section "Search Strategies for Star Join" under "Predicate Terminology" has changed. Add the following information at the end of the section: The dynamic bitmaps created and used as part of the Star Join technique uses sort heap memory. See Chapter 13, "Configuring DB2" in the Administration Guide: Performance manual for more information on the Sort Heap Size (sortheap) database configuration parameter. ------------------------------------------------------------------------ 8.5 Chapter 8. Operational Performance 8.5.1 Managing the Database Buffer Pool Within the section titled "Managing the Database Buffer Pool", add the following information after the paragraph that begins "When creating the buffer pool, by default the page size is 4 KB.": When working with Windows 2000, buffer pool sizes up to 64 GB in size are supported less the size of DB2 and the operating system. (This assumes that DB2 is the primary product on the system.) This support is available through Microsoft Address Windowing Extensions (AWE). Although AWE can be used with buffer pools of any size, if you require AWE use on larger buffer pools there are other recommended Windows products. Windows 2000 Advanced Server provides support for up to 8 GB of memory. Windows 2000 Data Center Server provides support for up to 64 GB of memory. DB2 and Windows 2000 must be configured correctly to support AWE buffer pools. The buffer pool that will take advantage of AWE must exist in the database. To have a 3 GB user space allocated, use the /3GB Windows 2000 boot option. This allows a larger AWE window size to be used. To enable access to more than 4 GB of memory via the AWE memory interface, use the /PAE Windows 2000 boot option. To verify that you have the correct boot option selected, under Control, select System, then select "Startup and Recovery". From the drop-down list you can see the available boot options. If the boot option (/3GB or /PAE) you want is selected, then you are ready to proceed to the next task in setting up AWE support. If the option you want is not available for selection, you must add the option to the boot.ini file on the system drive. The boot.ini file contains a list of actions to be done when the operating system is started. Add /3GB, or /PAE, or both (separated by blanks) at the end of the list of existing parameters. Once you have saved this changed file, you can verify and select the correct boot option as mentioned above. Windows 2000 also has to be modified to associate the "lock pages in memory"-right with the user under which DB2 is installed. To set the "lock pages in memory"-right, once you have logged on to Windows 2000 as the user who installed DB2, under the Start menu on Windows 2000 select the "Administrative Tools" folder, and then the "Local Security Policy" program. Under the local policies, you can select the user rights assignment for the "lock pages in memory"-right. DB2 requires the setting of the DB2_AWE registry variable. To set this registry variable correctly, you will need to know the buffer pool ID of the buffer pool you wish to allow support of AWE. You also need to know the number of physical pages and the address window pages to allocate. The number of physical pages to allocate should be some value less than the total available physical pages. The actual number chosen will depend on your working environment. For example, if you have an environment where only DB2 and database applications are used on your system, then you can choose to have from one-half to one GB less than the total size of the physical pages as the value used with the DB2_AWE variable. If you have an environment where other non-database applications are using the system, then you will have to increase the value you subtract from the total to allow more physical pages for those other applications. The number used in the DB2_AWE registry variable is the number of physical pages to be used in support of AWE and for use by DB2. The upper limit on the address window pages is 1.5 GB, or 2.5 GB when the /3GB Windows 2000 boot option is in effect. For information on setting the DB2 registry variable DB2_AWE, see the table of new and changed registry variables in "Appendix A. DB2 Registry and Environment Variables" later in this section. 8.5.2 Managing Multiple Database Buffer Pools Within the section titled "Managing Multiple Database Buffer Pools", add the following paragraph after the paragraph that begins "When working with your database design, you may have determined that tables with 8 KB page sizes are best.": When working with Windows 2000, the DB2_AWE registry variable can be used to override the buffer pool size settings in the catalog and configuration files. Use of this registry variable allows buffer pool sizes of up to approximately 64 GB. Within the same section, replace the paragraph just before the note with the following: The reason for allowing the database manager to start with minimal-sized values is to allow you to connect to the database. You can then reconfigure the buffer pool sizes, or perform other critical tasks, with the goal of restarting the database with correct buffer pool sizes. Do not consider operating the database for an extended time in such a state. Within the section titled "Reorganizing Catalogs and User Tables", the last sentence (with a short list) in the paragraph that begins "The REORG utility allows you to specify a temporary table space..." can be replaced by: Using the same table space to reorganize tables is faster but greater logging occurs and there must be enough space for the reorganized table. If you specify a temporary table space, it is generally recommended that you specify an SMS temporary table space. A DMS temporary table space is not recommended since you can only have on REORG in progress using this type of table space. Within the section titled "Extending Memory", add the following paragraph after the third paragraph in this section: When allocating Windows 2000 Address Windowing Extensions (AWE) buffer pools using the DB2_AWE registry variable, the extended storage cache cannot be used. ------------------------------------------------------------------------ 8.6 Chapter 9. Using the Governor Within the section titled "Creating the Governor Configuration File", the first sentence in the first paragraph following the schedule action discussion should be replaced with: If more than one rule applies to an application, all of the rules are applied. Depending on the rule and the limits being set, the action associated with the rule limit encountered first is the action that is first to be applied. ------------------------------------------------------------------------ 8.7 Chapter 13. Configuring DB2 The following parameters require changes: 8.7.1 Sort Heap Size (sortheap) The "Recommendation" section has changed. The information here should now read: When working with the sort heap, you should consider the following: * Appropriate indexes can minimize the use of the sort heap. * Hash join buffers and dynamic bitmaps (used for index ANDing and Star Joins) use sort heap memory. Increase the size of this parameter when these techniques are used. * Increase the size of this parameter when frequent large sorts are required. * ... (the rest of the items are unchanged) 8.7.2 Sort Heap Threshold (sheapthres) The second last paragraph in the description of this parameter has changed. The paragraph should now read: Examples of those operations that use the sort heap include: sorts, dynamic bitmaps (used for index ANDing and Star Joins), and operations where the table is in memory. The following information is to be added to the description of this parameter: There is no reason to increase the value of this parameter when moving from a single-node to a multi-node environment. Once you have tuned the database and database manager configuration parameters on a single node (in a DB2 EE) environment, the same values will in most cases work well in a multi-node (in a DB2 EEE) environment. The Sort Heap Threshold parameter, as a database manager configuration parameter, applies across the entire DB2 instance. The only way to set this parameter to different values on different nodes or partitions, is to create more than one DB2 instance. This will require managing different DB2 databases over different nodegroups. Such an arrangement defeats the purpose of many of the advantages of a partitioned database environment. 8.7.3 Maximum Percent of Lock List Before Escalation (maxlocks) The following change pertains to the Recommendation section of the "Maximum Percent of Lock List Before Escalation (maxlocks)" database configuration parameter. Recommendation: The following formula allows you to set maxlocks to allow an application to hold twice the average number of locks: maxlocks = 2 * 100 / maxappls Where 2 is used to achieve twice the average and 100 represents the largest percentage value allowed. If you have only a few applications that run concurrently, you could use the following formula as an alternative to the first formula: maxlocks = 2 * 100 / (average number of applications running concurrently) One of the considerations when setting maxlocks is to use it in conjunction with the size of the lock list (locklist). The actual limit of the number of locks held by an application before lock escalation occurs is: maxlocks * locklist * 4096 / (100 * 36) Where 4096 is the number of bytes in a page, 100 is the largest percentage value allowed for maxlocks, and 36 is the number of bytes per lock. If you know that one of your applications requires 1000 locks, and you do not want lock escalation to occur, then you should choose values for maxlocks and locklist in this formula so that the result is greater than 1000. (Using 10 for maxlocks and 100 for locklist, this formula results in greater than the 1000 locks needed.) If maxlocks is set too low, lock escalation happens when there is still enough lock space for other concurrent applications. If maxlocks is set too high, a few applications can consume most of the lock space, and other applications will have to perform lock escalation. The need for lock escalation in this case results in poor concurrency. You may use the Database System Monitor to help you track and tune this configuration parameter. 8.7.4 Configuring DB2/DB2 Data Links Manager/Data Links Access Token Expiry Interval (dl_expint) Contrary to the documentation, if dl_expint is set to "-1", the access control token expires. The workaround for this is to set dl_expint to its maximum value, 31536000 (seconds). This corresponds to an expiration time of one year, which should be adequate for all applications. 8.7.5 MIN_DEC_DIV_3 Database Configuration Parameter The addition of the MIN_DEC_DIV_3 database configuration parameter is provided as a quick way to enable a change to computation of the scale for decimal division in SQL. MIN_DEC_DIV_3 can be set to YES or NO. The default value for MIN_DEC_DIV_3 is NO. The MIN_DEC_DIV_3 database configuration parameter changes the resulting scale of a decimal arithmetic operation involving division. If the value is NO, the scale is calculated as 31-p+s-s'. Refer to the SQL Reference, Chapter 3, "Decimal Arithmetic in SQL" for more information. If set to YES, the scale is calculated as MAX(3, 31-p+s-s'). This causes the result of decimal division to always have a scale of at least 3. Precision is always 31. Changing this database configuration parameter may cause changes to applications for existing databases. This can occur when the resulting scale for decimal division would be impacted by changing this database configuration parameter. Listed below are some possible scenarios that may impact applications. These scenarios should be considered before changing the MIN_DEC_DIV_3 on a database server with existing databases. * If the resulting scale of one of the view columns is changed, a view that is defined in an environment with one setting could fail with SQLCODE -344 when referenced after the database configuration parameter is changed. The message SQL0344N refers to recursive common table expressions, however, if the object name (first token) is a view, then you will need to drop the view and create it again to avoid this error. * A static package will not change behavior until the package is rebound, either implicitly or explicitly. For example, after changing the value from NO to YES, the additional scale digits may not be included in the results until rebind occurs. For any changed static packages, an explicit rebind command can be used to force a rebind. * A check constraint involving decimal division may restrict some values that were previously accepted. Such rows now violate the constraint but will not be detected until the one of the columns involved in the check constraint row is updated or the SET INTEGRITY command with the IMMEDIATE CHECKED option is processed. To force checking of such a constraint, perform an ALTER TABLE command in order to drop the check constraint and then perform an ALTER TABLE command to add the constraint again. Note: DB2 Version 7 also has the following limitations: 1. The command GET DB CFG FOR DBNAME will not display the MIN_DEC_DIV_3 setting. The best way to determine the current setting is to observe the side-effect of a decimal division result. For example, consider the following statement: VALUES (DEC(1,31,0)/DEC(1,31,5)) If this statement returns sqlcode SQL0419N, then the database does not have MIN_DEC_DIV_3 support or it is set to OFF. If the statement returns 1.000, then MIN_DEC_DIV_3 is set to ON. 2. MIN_DEC_DIV_3 does not appear in the list of configuration keywords when you run the following command: ? UPDATE DB CFG 8.7.6 Application Control Heap Size (app_ctl_heap_sz) The text for this parameter should now read: For partitioned databases and non-partitioned databases with intra-parallelism enabled (intra_parallel=ON), this is the size of the shared memory area allocated for the application control heap. For non-partitioned databases where intra-parallelism is disabled (intra_parallel=OFF), this is the maximum private memory that will be allocated for the heap. There is one application control heap per connection per partition. The application control heap is required primarily for sharing information between agents working on behalf of the same request, and, in a partitioned database environment, for storing executable sections representing SQL statements. Usage of this heap is minimal for non-partitioned databases when running queries with a degree of parallelism less than or equal to 1. This heap is also used to store descriptor information for declared temporary tables. The descriptor information for all declared temporary tables that have not been explicitly dropped is kept in this heap's memory and cannot be dropped until the declared temporary table is dropped. The "Recommendation" portion remains unchanged. 8.7.7 Database System Monitor Heap Size (mon_heap_sz) The default for the OS/2 and Windows NT Database server with local and remote clients and Satellite database server with local clients has changed from 24 to 32. The range is unchanged. 8.7.8 Maximum Number of Active Applications (maxappls) The upper range limit for all platforms has changed from 64 000 to 60 000. The default value is unchanged. 8.7.9 Recovery Range and Soft Checkpoint Interval (softmax) The unit of measure is changed to the percentage of the size of one primary log file. 8.7.10 Track Modified Pages Enable (trackmod) Configuration Type: Database Parameter Type: Configurable Default [Range]: Off [ On; Off ] When this parameter is set to ON, the database manager will track which pages in the database have changed since the most recent full backup was taken. This allows the backup utility to determine which pages should be included in an incremental backup without having to examine every page individually. For SMS tablespaces, the granularity of this tracking is at the tables pace level. For DMS table spaces, the granularity is at the extent level for data and index pages and at the table space level for other page types. After setting this parameter to ON, you must take a full database backup in order to have a baseline against which incremental backups can be taken. 8.7.11 Change the Database Log Path (newlogpath) Configuration Type: Database Parameter Type: Configurable Default [Range]: Null [ any valid path or device] Related Parameters: Location of Log Files (logpath); Database is Consistent (database_consistent) This parameter allows you to specify a string of up to 242 bytes to change the location where the log files are stored. The string can point to either a path name, or to a raw device. If the string points to a path name, it must be a fully qualified path name, not a relative path name. Note: In a partitioned database environment, the node number is automatically appended to the path. This is done to maintain the uniqueness of the path in multiple logical node configurations. To specify a device, specify a string that the operating system identifies as a device. For example, on Windows NT, \\.\d: or \\.\PhysicalDisk5 Note: You must have Windows NT Version 4.0 with Service Pack 3 installed to be able to write logs to a device. On UNIX-based platforms, /dev/rdblog8 Note: You can only specify a device on AIX, Windows 2000, Windows NT, Solaris, HP-UX, NUMA-Q, and Linux platforms. The new setting does not become the value of logpath until both of the following occur: * The database is in a consistent state, as indicated by the database_consistent parameter. * All users are disconnected from the database. When the first new connection is made to the database, the database manager will move the logs to the new location specified by logpath. There might be log files in the old log path. These log files might not have been archived. You might need to archive these log files manually. Also, if you are running replication on this database, replication might still need the log files from before the log path change. If the database is configured with the User Exit Enable (userexit) database configuration parameter set to "Yes", and if all the log files have been archived either by DB2 automatically or by yourself manually, then DB2 will be able to retrieve the log files to complete the replication process. Otherwise, you can copy the files from the old log path to the new log path. Recommendation: Ideally, the log files will be on a physical disk which does not have high I/O. For instance, avoid putting the logs on the same disk as the operating system or high volume databases. This will allow for efficient logging activity with a minimum of overhead such as waiting for I/O. You can use the database system monitor to track the number of I/Os related to database logging. For more information, refer to the following monitor element descriptions in the System Monitor Guide and Reference: * log_reads (number of log pages read) * log_writes (number of log pages written) The preceding data elements return the amount of I/O activity related to database logging. You can use an operating system monitor tool to collect information about other disk I/O activity, then compare the two types of I/O activity. 8.7.12 Location of Log Files (logpath) Configuration Type: Database Parameter Type: Informational Related Parameters: Change the Database Log Path (newlogpath) This parameter contains the current path being used for logging purposes. You cannot change this parameter directly as it is set by the database manager after a change to the newlogpath parameter becomes effective. When a database is created, the recovery log file for it is created in a subdirectory of the directory containing the database. The default is a subdirectory named SQLOGDIR under the directory created for the database. 8.7.13 Maximum Storage for Lock List (locklist) The maximum value is increased from 60 000 to 524 288. ------------------------------------------------------------------------ 8.8 Appendix A. DB2 Registry and Environment Variables The following registry variables are new or require changes: 8.8.1 Table of New and Changed Registry Variables Table 6. Registry Variables Variable Name Operating Values System Description DB2MAXFSCRSEARCH All Default=5 Values: -1, 1 to 33554 Specifies the number of free space control records to search when adding a record to a table. The default is to search five free space control records. Modifying this value allows you to balance insert speed with space reuse. Use large values to optimize for space reuse. Use small values to optimize for insert speed. Setting the value to -1 forces the database manager to search all free space control records. DLFM_TSM_MGMTCLASS AIX, Windows Default: the default TSM NT, Solaris management class Values: any valid TSM management class Specifies which TSM management class to use to archive and retrieve linked files. If there is no value set for this variable, the default TSM management class is used. DB2_CORRELATED_PREDICATES All Default=YES Values: YES or NO The default for this variable is YES. When there are unique indexes on correlated columns in a join, and this registry variable is YES, the optimizer attempts to detect and compensate for correlation of join predicates. When this registry variable is YES, the optimizer uses the KEYCARD information of unique index statistics to detect cases of correlation, and dynamically adjusts the combined selectivities of the correlated predicates, thus obtaining a more accurate estimate of the join size and cost. DB2_VI_DEVICE Windows NT Default=null Values: nic0 or VINIC Specifies the symbolic name of the device or Virtual Interface Provider Instance associated with the Network Interface Card (NIC). Independent hardware vendors (IHVs) each produce their own NIC. Only one (1) NIC is allowed per Windows NT machine; Multiple logical nodes on the same physical machine will share the same NIC. The symbolic device name "VINIC" must be in upper case and can only be used with Synfinity Interconnect. All other currently supported implementations use "nic0" as the symbolic device name. DB2_SELECTIVITY ALL Default=NO Values: YES or NO This registry variable controls where the SELECTIVITY clause can be used. See the SQL Reference, Language Elements, Search Conditions for complete details on the SELECTIVITY clause. When this registry variable is set to YES, the SELECTIVITY clause can be specified when the predicate is a basic predicate where at least one expression contains host variables. DB2_UPDATE_PART_KEY ALL Default=YES Values: YES or NO For FixPak 3 and later, the default value is YES. This registry variable specifies whether or not update of the partitioning key is permitted. DB2_BLOCK_ON_LOG_DISK_FULL ALL Default=NO Values: YES or NO This DB2 registry variable can be set to prevent "disk full" errors from being generated when DB2 cannot create a new log file in the active log path. Instead, DB2 attempts to create the log file every 5 minutes until it succeeds. After each attempt, DB2 writes a message to the db2diag.log file. The only way that you can confirm that your application is hanging because of a log disk full condition is to monitor the db2diag.log file. Until the log file is successfully created, any user application that attempts to update table data will not be able to commit transactions. Read-only queries may not be directly affected; however, if a query needs to access data that is locked by an update request, or a data page that is fixed in the buffer pool by the updating application, read-only queries will also appear to hang. DB2_INDEX_2BYTEVARLEN All Default=NO Values: YES or NO This registry variable allows columns with a length greater than 255 bytes to be specified as part of an index key. Indexes already created before turning this registry variable YES will continue to have the 255 key limit restriction. Indexes created after turning this registry variable YES will behave as a two-byte index even when the registry variable is turned NO again. Several SQL statements are affected by changes to this registry variable including CREATE TABLE, CREATE INDEX, and ALTER TABLE. For more information on these statements, refer to the changes documented for the SQL Reference. DB2_FORCE_FCM_BP AIX Default=NO Values: YES or NO Specifies from where the fast communications manager (FCM) resources are allocated. The resources may be allocated from either the database manager shared memory segment or a separate one. With multiple logical nodes on the same machine, this registry variable should be used. On a partitioned database system with symmetric multi-processing (SMP) enabled, the setting of this registry variable has no effect on how communication takes place. In this case, communication is always through shared memory. However, it does affect the number of shared memory segments DB2 will use. DB2_AWE Windows 2000 Default=Null Values: [; ;...] where =, , Allows DB2 UDB on Windows 2000 to allocate buffer pools that use up to 64 GB of memory. Windows 2000 must be configured correctly to support Address Windowing Extensions (AWE) buffer pools. This includes associating the "lock pages in memory"-right with the user on Windows 2000 and setting this registry variable on DB2. In setting this variable you need to know the buffer pool ID that is to be used for AWE support. You also need to determine the number of physical pages to allocate and the number of address windows. For information on determining the number of physical pages to allocate and the number of address windows, see the section on "Managing the Database Buffer Pool" found in "Chapter 8. Operational Performance" earlier in this section. Note: If AWE support is enabled, extended storage (ESTORE) cannot be used for any of the buffer pools in the database. The buffer pools referenced by this variable must already exist in SYSIBM.SYSBUFFERPOOLS. DB2_STPROC_LOCKUP_FIRST All Default=NO Values: YES or NO This registry variable has been renamed from DB2_DARI_LOOKUP_ALL. DB2MEMDISCLAIM AIX Default=YES Values: YES or NO On AIX, memory used by DB2 processes may have some associated paging space. This paging space may remain reserved, even when the associated memory has been freed. The reservation of the paging space depends on the AIX system's tunable virtual memory management allocation policy. This registry variable controls whether DB2 agents explicitly request that AIX disassociate the reserved paging space from the freed memory. A setting of "YES" results in smaller paging space requirements, and possibly less disk activity from paging. A setting of "NO" results in greater paging space requirements, and possibly more disk activity from paging. In some situations, such as if paging space is plentiful, and if real memory is so plentiful that paging never occurs, then a setting of NO will provide a small performance improvement. DB2MEMMAXFREE All Default=8 388 608 bytes Values: 0 to 232-1 bytes This registry variable controls the maximum amount of unused memory in bytes retained by DB2 processes. DB2_ANTIJOIN All Default=NO in a EEE environment Default=YES in a non-EEE environment Values: YES or NO For DB2 Universal Database EEE environments: When YES is specified, the optimizer will search for opportunities to transform NOT EXISTS subqueries into anti-joins which can be processed more efficiently by DB2. For non-EEE environments: When NO is specified, the optimizer will limit the opportunities to transform NOT EXISTS subqueries into anti-joins. NEWLOGPATH2 UNIX Default=NO Values: YES or NO This parameter allows you to specify whether a secondary path should be used to implement dual logging. The path that will be used is generated by appending the character '2' to the current value of 'LOGPATH'. DB2DOMAINLIST Windows NT Default=Null Values: one or more valid Windows NT domains (comma separating each) Defines one or more Windows NT domains. Only users belonging to these domains will have their connection or attachment requests accepted. This registry variable should only be used under a pure Windows NT domain environment with DB2 servers and clients running DB2 Universal Database Version 7.1 (or later). DB2_LIKE_VARCHAR All Default=Y,N Values: Y, N, S, floating point constant between 0 and 6.2 Controls the collection and use of sub-element statistics. These are statistics about the content of data in columns when the data has a structure in the form of a series of sub-fields or sub-elements delimited by blanks. This registry variable affects how the optimizer deals with a predicate of the form: COLUMN LIKE '%xxxxxx%' where the xxxxxx is any string of characters. The syntax showing how this registry variable is used is: db2set DB2_LIKE_VARCHAR=[Y|N|S|num1] [,Y|N|S|num2] where * The term preceding the comma, or the only term to the right of the predicate, means the following but only for columns that do not have positive sub-element statistics: o S - The optimizer estimates the length of each element in a series of elements concatenated together to form a column based on the length of the string enclosed in the % characters. o Y - The default. Use a default value of 1.9 for the algorithm parameter. Use a variable-length sub-element algorithm with the algorithm parameter. o N - Use a fix-length sub-element algorithm. o num1 - Use the value of num1 as the algorithm parameter with the variable length sub-element algorithm. * The term following the comma means the following: o N - The default. Do not collect of use sub-element statistics. o Y - Collect sub-element statistics. Use a variable-length sub-element algorithm that uses the collected statistics together with the 1.9 default value for the algorithm parameter in the case of columns with positive sub-element statistics. o num2 - Collect sub-element statistics. Use a variable-length sub-element algorithm that uses the collected statistics together with the value of num2 as the algorithm parameter in the case of columns with positive sub-element statistics. DB2_PINNED_BP AIX, HP-UX Default=NO Values: YES or NO This variable is used to hold the database global memory (including buffer pools) associated with the database in the main memory on some AIX operating systems. Keeping this database global memory in the system main memory allows database performance to be more consistent. If, for example, the buffer pool was swapped out of the system main memory then database performance would deteriorate. The reduction of disk I/O by having the buffer pools in system memory improves database performance. If you have other applications that require more of the main memory, you will want to allow the database global memory, depending on the system main memory requirements, to be swapped out of main memory. When working with HP-UX in a 64-bit environment, in addition to modifying this registry variable, the DB2 instance group must be given the MLOCK privilege. This is done by having a user with root access rights do the following: 1. Add the DB2 instance group to the /etc/privgroup file. For example, if the DB2 instance group belongs to db2iadm1 group then the following line must be added to the /etc/privgroup file: db2iadm1 MLOCK 2. Issue the following command: setprivgrp -f /etc/privgroup DB2_RR_TO_RS All Default=NO Values: YES or NO Next key locking guarantees Repeatable Read (RR) isolation level by automatically locking the next key for all INSERT and DELETE statements and the next higher key value above the result set for SELECT statements. For UPDATE statements that alter key parts of an index, the original index key is deleted and the new key value is inserted. Next key locking is done on both the key insertion and key deletion. Next key locking is required to guarantee ANSI and SQL92 standard RR, and is the DB2 default. If your application appears to stop or hang, you should examine snapshot information for your application. If the problem appears to be with next key locking, you can set the DB2_RR_TO_RS registry variable on based on two conditions. You can turn DB2_RR_TO_RS on if none of your applications rely on Repeatable Read (RR) behavior and if it is acceptable for scans to skip over uncommitted deletes. The skipping behavior affects the RR, Read Stability (RS), and Cursor Stability (CS) isolation levels. (There is no row locking for Uncommitted Read (UR) isolation level.) When DB2_RR_TO_RS is on, RR behavior cannot be guaranteed for scans on user tables because next key locking is not done during index key insertion and deletion. Catalog tables are not affected by this option. The other change in behavior is that with DB2_RR_TO_RS on, scans will skip over rows that have been deleted but not committed, even though the row may have qualified for the scan. ------------------------------------------------------------------------ 8.9 Appendix C. SQL Explain Tools The section titled "Running db2expln and dynexpln" should have the last paragraph replaced with the following: To run db2expln, you must have SELECT privilege to the system catalog views as well as EXECUTE authority for the db2expln package. To run dynexpln, you must have BINDADD authority for the database, the schema you are using to connect to the database must exist or you must have the EXPLICIT_SCHEMA authority for the database, and you must have any privileges needed for the SQL statements being explained. (Note that if you have SYSADM or DBADM authority, you will automatically have all these authorization levels.) ------------------------------------------------------------------------ Administering Satellites Guide and Reference(潲珫次) ------------------------------------------------------------------------ 9.1 Setting up Version 7.2 DB2 Personal Edition and DB2 Workgroup Edition as Satellites The sections that follow describe how to set up Windows-based Version 7.2 DB2 Personal Edition and DB2 Workgroup Edition systems so that they can be used as fully functional satellites in a satellite environment. For information about the terms and concepts used in the information that follows, refer to the Administering Satellites Guide and Reference. You can find this book at the following URL: http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/v6pubs.d2w/en_main For Technotes that supplement the information in the Administering Satellites Guide and Reference, refer to the following URL: http://www-4.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/browse.d2w/ report?type=tech5udb&tech5udb=Y 9.1.1 Prerequisites To set up either DB2 Personal Edition or DB2 Workgroup Edition as satellites, you require the following: 1. A DB2 control server The DB2 control server is a DB2 Enterprise Edition system that runs on Windows NT or AIX, and has the Control Server component installed. The DB2 Enterprise Edition system that you use must be at Version 6 with FixPak 2 or higher, or Version 7 at any FixPak level. o If you have a Version 6 Enterprise Edition system that you want to use as the DB2 control server, see 9.1.3, Installing FixPak 2 or Higher on a Version 6 Enterprise Edition System. o If you are using Version 7 and do not have the Control Server component installed, install this component, re-install any FixPaks that you have already installed, then create the DB2 control server instance and satellite control database. Refer to the Administering Satellites Guide and Reference for instructions on creating these objects. Note: If you are installing a Version 7.2 Enterprise Edition system on Windows NT for use as the DB2 control server, and you want to perform a response file installation, see the Technote entitled DB2 Control Server Response File Keywords for information about the keywords to specify in the response file. 2. The DB2 control server instance and the satellite control database The DB2 control server instance is typically called DB2CTLSV, and the satellite control database is called SATCTLDB. The DB2 control server instance and the satellite control database are on the Enterprise Edition system, and, on Windows NT, are automatically created when you install DB2 with the Control Server component. If you install DB2 on AIX, see the Administering Satellites Guide and Reference for information about creating the DB2 control server instance and the satellite control database. 3. The Satellite Administration Center The Satellite Administration Center is the set of GUI tools that you use to set up and administer the satellite environment. You access this set of tools from the DB2 Control Center. For more information about Satellite Administration Center and the satellite environment, see the Administering Satellites Guide and Reference, and the online help that is available from the Satellite Administration Center. If you are running a Version 6 DB2 Control Center, see 9.1.4, Upgrading a Version 6 DB2 Control Center and Satellite Administration Center. If you have not already used the Satellite Administration Center to set up the satellite environment and to create the object that represents the new satellite in the Satellite Administration Center, you should do so before installing the satellite. For more information, see the description of how to set up and test a satellite environment in the Administering Satellites Guide and Reference. 4. A Version 7.2 Personal Edition or Workgroup Edition system that you want to use as a satellite. 9.1.1.1 Installation Considerations When you install either DB2 Personal Edition or DB2 Workgroup Edition, you do not have to select any special component to enable either system to synchronize. If you intend to perform a response file installation, see Performing a Response File Installation for the keywords that you should specify when installing the Version 7.2 system. If you are performing an interactive installation of your Version 7.2 system, see 9.1.2, Configuring the Version 7.2 System for Synchronization after you finish installing DB2 for values that you must set at the Version 7.2 system to enable it to synchronize. Performing a Response File Installation If you are performing a response file installation of Version 7.2 DB2 Personal Edition or DB2 Workgroup Edition, you can set the following keywords in the response file. If you decide to not specify one or more of these keywords during the response file installation, see 9.1.2, Configuring the Version 7.2 System for Synchronization for additional steps that you must perform after installing DB2 to enable the Version 7.2 system to synchronize. You can also use the instructions in this section if you want to change any values that were specified during the response file installation. db2.db2satelliteid Sets the satellite ID on the system. Note: If you do not specify this keyword, the satellite ID is automatically set to the user ID that was used to install DB2. If you want to use this user ID as the satellite ID, you do not have to specify a value for this keyword. db2.db2satelliteappver Sets the application version on the system. Note: If you do not specify this keyword, the application version on the satellite is automatically set to V1R0M00. If you want to use this value as the application version, you do not have to specify a value for this keyword. db2.satctldb_username Sets the user name to be used for the system to connect to the satellite control database. db2.satctldb_password Sets the password that the user name passes to the DB2 control server when the user name connects to the satellite control database. After you complete the response file installation, the Version 7.2 system is ready to synchronize. You should issue the db2sync -t command on the satellite to verify that the values specified on the satellite are correct, and that the satellite can connect to the satellite control database. For additional information about performing a response file installation, refer to the Administering Satellites Guide and Reference. Note: 1. In Version 7, user IDs and passwords are required for the creation of all services on Windows NT and Windows 2000. These user IDs and passwords are specified in the response file by keyword pairs. The first keyword pair found in the response file becomes the default user ID and password for all services, unless you provide an override for a service by specifying the specific keyword pair for that service. In Version 6, the admin.userid and the admin.password keywords could be specified during a response file installation of DB2 Satellite Edition to specify the user ID and password that would be used by the Remote Command Service. For Version 7.2 Personal Edition and Workgroup Edition, if you specify these keywords, they are used for the DB2DAS00 instance on the Version 7.2 system. For a DB2 Version 7.2 system, the Remote Command Service will use the user ID and password that is used by the DB2 instance on the system. If you do not specify values for db2.userid and db2.password, the defaulting rule described above applies. 2. In Version 6, you could create a database when installing DB2 Satellite Edition using a response file installation. You cannot create a database during a response file installation on the Version 7.2 Personal Edition or Workgroup Edition system that you intend to use as a satellite. The following keywords (which are described in the Administering Satellites Guide and Reference), are not supported: o db2.userdb_name o db2.userdb_recoverable o db2.userdb_rep_src 9.1.2 Configuring the Version 7.2 System for Synchronization If you install the Version 7.2 system interactively, several values must be set on the DB2 Personal Edition or DB2 Workgroup Edition system after installing DB2 before the system can synchronize. Note: You can use execute an operating system script on the system to set all values at the satellite except for the user ID and password that the satellite uses to connect to the satellite control database (see step 4). 1. Set the satellite ID by using the db2set command. If you install DB2 Personal Edition or DB2 Workgroup Edition interactively, the satellite ID is automatically set to the user ID that was used to install DB2. If you want to use this user ID as the satellite ID, you do not have to perform this step. For information about setting the satellite ID, see the Administering Satellites Guide and Reference. 2. Set the application version on the satellite by using the db2sync -s command. If you install DB2 Personal Edition or DB2 Workgroup Edition interactively, the application version on the satellite is automatically set to V1R0M00. If you want to use this value as the application version, you do not have to perform this step. You can use the db2sync -g command on the satellite to view the current setting of the application version. If you want to change this value, issue the db2sync -s command. You are prompted to provide a new value for the application version. For more information about setting the application version, see the Administering Satellites Guide and Reference. 3. Issue the catalog node and catalog database commands on the satellite to catalog the DB2 control server instance and the satellite control database, SATCTLDB, at the satellite. You can also use the db2sync -t command on the satellite to open the DB2 Synchronizer application in test mode. If the SATCTLDB database is not cataloged at the satellite when you issue the command, the Catalog Control Database window opens. You can either use the DB2 discovery feature that is available from the Catalog Control Database window to catalog the DB2 control server and the SATCTLDB database, or you can type the hostname and server name in this window. You will also be prompted to specify the user ID and password that the satellite will use to connect to the satellite control database, as described in step 4. Note: After you install Version 7.2 DB2 Personal Edition or DB2 Workgroup Edition interactively, the DB2 Synchronizer does not start automatically in test mode (as was the case for Version 6 DB2 Satellite Edition). 4. Issue the db2sync -t command on the satellite to: o Specify the user ID and the password that the satellite will use to connect to the satellite control database If synchronization credentials are not already stored at the satellite, the Connect to Control Database window opens. You must use this window to specify the user ID and password the satellite will use to connect to the satellite control database. o Verify the values that are set on the satellite are correct o Verify that the satellite can connect to the satellite control database After you complete these configuration tasks, the Version 7.2 system is ready to synchronize. 9.1.3 Installing FixPak 2 or Higher on a Version 6 Enterprise Edition System The sections that follow describe the tasks that you must perform to upgrade a Version 6 Enterprise Edition system on Windows NT or AIX for use as a DB2 control server. If you are using a Version 6 DB2 Control Center, also perform the steps in 9.1.4, Upgrading a Version 6 DB2 Control Center and Satellite Administration Center to verify that you have the correct level of the DB2 Control Center and the Satellite Administration Center to administer the satellite environment. 9.1.3.1 Upgrading Version 6 DB2 Enterprise Edition for Use as the DB2 Control Server For a Version 6 DB2 Enterprise Edition system to be used as the DB2 control server, it must be installed with the Control Server component, and DB2 Enterprise Edition should be at the FixPak 2 service level, or higher. Depending on whether the DB2 control server component is installed, and the service level of DB2 Enterprise Edition, you will have to perform one of the following tasks: * Install the DB2 control server component to an existing DB2 Enterprise Edition V6.1 system and install FixPak 2 or higher. Then update the satellite control database (SATCTLDB) on the system. * Upgrade an already installed DB2 control server to the FixPak 2 level or higher. Use the information that follows to identify which of the two preceding tasks you need to perform, and the steps that apply to your situation. The following is a summary of the steps that you will perform. 1. First, assess the current state of your DB2 Enterprise Edition installation. You will determine whether the Control Server component is installed, and the service level of DB2. 2. Second, based on the state information that you obtain, you will determine what needs to be done. 3. Third, you will perform the necessary steps to upgrade DB2 Enterprise Edition. The DB2 control server can only run on DB2 Enterprise Edition for Windows NT and AIX. Continue with the instructions that are appropriate for your platform: * Upgrading DB2 Enterprise Edition on Windows NT * Upgrading DB2 Enterprise Edition on AIX Upgrading DB2 Enterprise Edition on Windows NT Use the information in the sections that follow to determine the current service level of your Version 6 DB2 Enterprise Edition system, and the steps that you need to perform to update the system to the FixPak 2 service level or higher. You will need to perform the steps of one or more of the following sections: * Assessing DB2 Enterprise Edition on Windows NT * Determining What Needs to Be Done * Installing the Control Server Component on Windows NT * Installing FixPak 2 or Higher on Windows NT * Upgrading the SATCTLDB on Windows NT Assessing DB2 Enterprise Edition on Windows NT If you have DB2 Enterprise Edition installed on Windows NT, perform the following steps: 1. Check whether the Control Server component is installed. Use the Registry Editor to display the list of installed components: a. Enter regedit at a command prompt. b. Under the HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2\Components registry key, check whether the Control Server is listed. If it is not listed, the control server is not installed. 2. Determine the service level of DB2 Enterprise Edition. Issue the db2level command from a command prompt. Use the table that follows to interpret the output: Values of Key Fields in the db2level output Your DB2 Release Level Informational Tokens system is at: SQL06010 01010104 db2_v6, n990616 Version 6.1 base SQL06010 01020104 DB2 V6.1.0.1, n990824, Version 6.1 WR21136 plus FixPak 1 SQL06010 01030104 DB2 V6.1.0.6, s991030, Version 6.1 WR21163 or DB2 V6.1.0.9, plus FixPak 2 s000101, WR21173 Note: If the level is greater than 01030104, your system is at a higher FixPak than FixPak 2. 3. Record the information that you find, and continue at Determining What Needs to Be Done. Determining What Needs to Be Done Using the information that you have gathered, find the row in the following table that applies to your situation, and follow the steps that are required to prepare your DB2 Enterprise Edition system to support the DB2 control server at the FixPak 2 level or higher. Sections that follow the table provide instructions for performing the required steps. Consider checking off each step as you perform it. Only perform the steps that apply to your situation. Control Server Service Level of DB2 Steps required to Component Installed Enterprise Edition prepare your DB2 System Enterprise Edition system No Version 6.1 base, or Perform the following Version 6.1 plus FixPak steps: 1, or Version 6.1 plus FixPak 2 or higher 1. Installing the Control Server Component on Windows NT 2. Installing FixPak 2 or Higher on Windows NT 3. Upgrading the SATCTLDB on Windows NT Yes Version 6.1 base, or Perform the following Version 6.1 plus FixPak steps: 1 1. Installing FixPak 2 or Higher on Windows NT 2. Upgrading the SATCTLDB on Windows NT Yes Version 6.1, plus FixPak Perform the following 2 or higher step: 1. Upgrading the SATCTLDB on Windows NT Installing the Control Server Component on Windows NT To install the Control Server component on Windows NT: 1. Ensure that all database activity on the system is complete before proceeding. 2. Insert the DB2 Universal Database Enterprise Edition Version 6.1 CD in the CD drive. If the installation program does not start automatically, run the setup command in the root of the CD to start the installation process. 3. When prompted, shut down all the processes that are using DB2. 4. On the Welcome window, select Next. 5. On the Select Products window, ensure that DB2 Enterprise Edition is selected. 6. On the Select Installation Type panel, click Custom. 7. On the Select Components panel, ensure that the Control Server component is selected, and click Next. Note: If you select other components that are not already installed on your system, these components will be installed too. You cannot alter the drive or directory in which DB2 is installed. 8. On the Configure DB2 Services panels, you can modify the protocol values and the start-up options for the Control Server instance, or take the default values. Either modify the defaults and click Next, or click Next to use the defaults. 9. Click Next on the Start Copy files window to begin the installation process. 10. When the file copying process is complete, you have the option of rebooting your system. You should reboot now. The changes made to the system for the Control Server do not take effect until the system is rebooted. When the installation process is complete and you have rebooted the system, the satellite control database (SATCTLDB) that was created as part of the Control Server installation must be cataloged in the DB2 instance if you want to use the DB2 Control Center and Satellite Administration Center locally on the system. To catalog the SATCTLDB database: 1. Open a DB2 Command Window by selecting Start>Programs>DB2 for Windows NT>Command Window 2. Ensure that you are in the db2 instance. Issue the set command and check the value of db2instance. If the value is not db2, issue the following command: set db2instance=db2 3. Catalog the db2ctlsv instance by entering the following command: db2 catalog local node db2ctlsv instance db2ctlsv 4. Catalog the SATCTLDB database by entering the following command db2 catalog database satctldb at node db2ctlsv 5. Commit the cataloging actions by entering the following command: db2 terminate 6. Close the DB2 Command Window. Installing FixPak 2 or Higher on Windows NT To upgrade an existing Version 6 DB2 Enterprise Edition system on Windows NT to FixPak 2 or higher, either: * Download the latest FixPak for DB2 Enterprise Edition for Windows NT V6.1 from the Web, along with its accompanying readme. The FixPak can be downloaded by following the instructions at URL: http://www-4.ibm.com/software/data/db2/db2tech/version61.html Install the FixPak following the instructions in the readme.txt file. * Use a DB2 Universal Database, Version 6.1 FixPak for Windows NT CD that is at FixPak 2 level or higher, and follow the instructions in the readme.txt file in the WINNT95 directory on the CD to complete the installation. Upgrading the SATCTLDB on Windows NT To upgrade the SATCTLDB database on Windows NT 1. Determine the level of the SATCTLDB database: a. Log on with a user ID that has local administrative authority on the Windows NT system. b. Open a DB2 Command Window by selecting Start>Programs>DB2 for Windows NT>Command Window. c. Connect to the SATCTLDB by entering the following command db2 connect to satctldb d. Determine if the trigger I_BATCHSTEP_TRGSCR exists in the database by issuing the following query: db2 select name from sysibm.systriggers where name='I_BATCHSTEP_TRGSCR' Record the number of rows that are returned. e. Enter the following command to close the connection to the database: db2 connect reset If step 1d returned one row, the database is at the correct level. In this situation, skip step 2, and continue at step 3. If zero (0) rows are returned, the database is not at the correct level, and must be upgraded, as described in step 2, before you can perform step 3. 2. To upgrade the SATCTLDB database, perform the following steps. Enter all commands in the DB2 Command Window: a. Switch to the directory \misc, where is the install drive and path, for example c:\sqllib. b. Ensure that you are in the db2ctlsv instance. Issue the set command and check the value of db2instance. If the value is not db2ctlsv, issue the following command: set db2instance=db2ctlsv c. Drop the SATCTLDB database by entering the following command: db2 drop database satctldb d. Create the new SATCTLDB database by entering the following command: db2 -tf satctldb.ddl -z satctldb.log e. Issue the following command: db2 terminate 3. Bind the db2satcs.dll stored procedure to the SATCTLDB database. Perform the following steps: a. Connect to the SATCTLDB database by entering the following command db2 connect to satctldb b. Switch to the directory \bnd, where is the install drive and path, for example c:\sqllib. c. Issue the bind command, as follows: db2 bind db2satcs.bnd 4. Enter the following command to close the connection to the database: db2 connect reset 5. Close the DB2 Command Window. Upgrading DB2 Enterprise Edition on AIX Use the information in the sections that follow to determine the current service level of your Version 6 DB2 Enterprise Edition system, and the steps that you need to perform to update the system to the FixPak 2 service level, or higher. You will need to perform the steps of one or more of the following sections: * Assessing DB2 Enterprise Edition on AIX * Determining What Needs to Be Done * Installing the Control Server Component on AIX * Installing FixPak 2 or Higher on AIX * Upgrading the SATCTLDB Database on AIX Assessing DB2 Enterprise Edition on AIX If you have Version 6 DB2 Enterprise Edition installed on AIX, perform the following steps: 1. Check whether the Control Server component is installed. Enter the following command: lslpp -l | grep db2_06_01.ctsr If no data is returned, the Control Server component is not installed. 2. Determine the service level of the DB2 Enterprise Edition. Log on as a DB2 instance owner, and issue the db2level command. Use the table that follows to interpret the output: Values of Key Fields in the db2level output Your DB2 Release Level Informational Tokens system is at: SQL06010 01010104 db2_v6, n990616 Version 6.1 base SQL06010 01020104 DB2 V6.1.0.1, n990824, Version 6.1 U465423 plus FixPak 1 SQL06010 01030104 DB2 V6.1.0.6, s991030, Version 6.1 U468276 or DB2 V6.1.0.9, plus FixPak 2 s000101, U469453 Note: If the level is greater than 01030104, your system is at a higher FixPak than FixPak 2. 3. Record the information that you find, and continue at Determining What Needs to Be Done. Determining What Needs to Be Done Using the information that you have gathered, find the row in the following table that applies to your situation, and follow the steps that are required to prepare your Version 6 DB2 Enterprise Edition system to support the DB2 control server at the FixPak 2 level. Sections that follow the table provide instructions for performing the required steps. Consider checking off each step as you perform it. Only perform the steps that apply to your situation. Control Server Service Level of DB2 Steps required to Component Installed Enterprise Edition prepare your DB2 System Enterprise Edition system No Version 6.1 base, or Perform the following Version 6.1 plus FixPak steps: 1, or Version 6.1 plus FixPak 2 or higher 1. Installing the Control Server Component on AIX 2. Installing FixPak 2 or Higher on AIX 3. Upgrading the SATCTLDB Database on AIX Yes Version 6.1 base, or Perform the following Version 6.1 plus FixPak steps: 1 1. Installing FixPak 2 or Higher on AIX 2. Upgrading the SATCTLDB Database on AIX Yes Version 6.1, plus FixPak Perform the following 2 or higher step: 1. Upgrading the SATCTLDB Database on AIX Installing the Control Server Component on AIX To install the Control Server component on AIX 1. Log on as a user with root authority. 2. Insert the DB2 Universal Database Enterprise Edition Version 6.1 CD in the CD drive. 3. Change to the directory where the CD is mounted, for example, cd /cdrom. 4. Type the following command to start the DB2 installer: ./db2setup 5. When the DB2 Installer window opens, use the tab key to select the Install option, and press Enter. 6. Locate the Enterprise Edition line and use the tab key to select the Customize option beside it. Press Enter. 7. Select the DB2 Control Server component, tab to OK, and press Enter. 8. Follow the instructions on the remaining windows to complete the installation of the DB2 Control Server component. When the installation process is complete, create the DB2CTLSV instance and the SATCTLDB database. To perform these tasks, follow the detailed instructions in "Setting up the DB2 Control Server on AIX" in Chapter 13 of the Administering Satellites Guide and Reference. Installing FixPak 2 or Higher on AIX To upgrade an existing DB2 Enterprise Edition system AIX to FixPak 2 or higher, either: * Download the latest FixPak for DB2 Enterprise Edition for AIX V6.1 from the Web, along with its accompanying Fixpak.Readme. The FixPak can be downloaded by following the instructions at URL: http://www-4.ibm.com/software/data/db2/db2tech/version61.html Install the FixPak following the instructions in the Fixpak.Readme file. * Use a DB2 Universal Database, Version 6.1 FixPak for AIX CD that is at FixPak 2 level or higher, and follow the instructions in the readme directory on the CD to complete the installation. Ensure that you have updated the DB2CTLSV instance by running the db2iupdt command as instructed in the FixPak.Readme file. Upgrading the SATCTLDB Database on AIX To upgrade the SATCTLDB database on AIX: 1. Determine the level of the SATCTLDB database: a. Log in as db2ctlsv. b. Ensure that the database server has been started. If the server is not started, issue the db2start command. c. Connect to the SATCTLDB database by entering the following command: db2 connect to satctldb d. Determine if the trigger I_BATCHSTEP_TRGSCR exists in the database by issuing the following query: db2 "select name from sysibm.systriggers where name='I_BATCHSTEP_TRGSCR'" Record the number of rows that are returned. e. Enter the following command to close the connection to the database: db2 connect reset If step 1d returned one row, the database is at the correct level. In this situation, skip step 2, and continue at step 3. If zero (0) rows are returned, the database is not at the correct level, and must be upgraded, as described in step 2, before you can perform step 3. 2. To upgrade the SATCTLDB database to the FixPak 2 level, perform the following steps. Enter all commands in the DB2 Command Window: a. Switch to the $HOME/sqllib/misc directory. b. Drop the SATCTLDB database by entering the following command: db2 drop database satctldb c. Create the new SATCTLDB database by entering the following command: db2 -tf satctldb.ddl -z $HOME/satctldb.log d. Issue the following command: db2 terminate 3. Bind the db2satcs.dll stored procedure to the SATCTLDB database. Perform the following steps: a. Connect to the SATCTLDB database by entering the following command db2 connect to satctldb b. Switch to the directory $HOME/sqllib/bnd. c. Issue the bind command, as follows: db2 bind db2satcs.bnd 4. Enter the following command to close the connection to the database: db2 connect reset 9.1.4 Upgrading a Version 6 DB2 Control Center and Satellite Administration Center To use a Version 6 DB2 Control Center and Satellite Administration Center with a Version 6 DB2 control server and satellite control database (SATCTLDB) that have been upgraded to FixPak 2 or higher, the tools must also be upgraded to FixPak 2 or higher. If the DB2 Control Center and Satellite Administration Center are running on the same system as the DB2 control server, they were upgraded when the DB2 Enterprise Edition system was upgraded to FixPak 2. However, if you run these tools on another system, you must upgrade this system to the FixPak 2 level or higher. To upgrade this system to FixPak 2 or higher: * Download the latest FixPak for your product at the V6.1 level from the Web, along with its accompanying readme. FixPaks can be downloaded by following the instructions at URL: http://www-4.ibm.com/software/data/db2/db2tech/version61.html Install the FixPak following the instructions in the readme file. * Use a DB2 Universal Database, Version 6.1 FixPak CD for the operating system that you are running that is at FixPak 2 level or higher, and follow the instructions in the readme to complete the installation. ------------------------------------------------------------------------ Command Reference(潲珫次) ------------------------------------------------------------------------ 10.1 db2batch - Benchmark Tool The last sentence in the description of the PERF_DETAIL parameter should read: A value greater than 1 is only valid on DB2 Version 2 and DB2 UDB servers, and is not currently supported on host machines. ------------------------------------------------------------------------ 10.2 db2cap (new command) db2cap - CLI/ODBC Static Package Binding Tool Binds a capture file to generate one or more static packages. A capture file is generated during a static profiling session of a CLI/ODBC/JDBC application, and contains SQL statements that were captured during the application run. This utility processes the capture file so that it can be used by the CLI/ODBC/JDBC driver to execute static SQL for the application. For more information on how to use static SQL in CLI/ODBC/JDBC applications, see the Static Profiling feature in the CLI Guide and Reference. Authorization * Access privileges to any database objects referenced by SQL statements recorded in the capture file. * Sufficient authority to set bind options such as OWNER and QUALIFIER if they are different from the connect ID used to invoke the db2cap command. * BINDADD authority if the package is being bound for the first time; otherwise, BIND authority is required. Command Syntax >>-db2cap----+----+--bind--capture-file----d--database_alias----> +--h-+ '--?-' >-----+--------------------------------+----------------------->< '--u--userid--+---------------+--' '--p--password--' Command Parameters -h/-? Displays help text for the command syntax. bind capture-file Binds the statements from the capture file and creates one or more packages. -d database_alias Specifies the database alias for the database that will contain one or more packages. -u userid Specifies the user ID to be used to connect to the data source. Note: If a user ID is not specified, a trusted authorization ID is obtained from the system. -p password Specifies the password to be used to connect to the data source. Usage Notes The command must be entered in lowercase on UNIX platforms, but can be entered in either lowercase or uppercase on Windows operating systems and OS/2. This utility supports a number of user-specified bind options that can be found in the capture file. For performance and security reasons, the file can be examined and edited with a text editor to change these options. The SQLERROR(CONTINUE) and the VALIDATE(RUN) bind options can be used to create a package. When using this utility to create a package, static profiling must be disabled. The number of packages created depends on the isolation levels used for the SQL statements that are recorded in the capture file. The package name consists of up to a maximum of the first seven characters of the package keyword from the capture file, and one of the following single-character suffixes: * 0 - Uncommitted Read (UR) * 1 - Cursor Stability (CS) * 2 - Read Stability (RS) * 3 - Repeatable Read (RR) * 4 - No Commit (NC) To obtain specific information about packages, the user can: * Query the appropriate SYSIBM catalog tables using the COLLECTION and PACKAGE keywords found in the capture file. * View the capture file. ------------------------------------------------------------------------ 10.3 db2ckrst (new command) db2ckrst - Check Incremental Restore Image Sequence Queries the database history and generates a list of timestamps for the backup images required for an incremental restore. A simplified restore syntax for a manual incremental restore is also generated. Authorization None Required Connection None Command Syntax >>-db2ckrst----d--database name----t--timestamp-----------------> >-----+---------------------+---+-----------------------------+-> | .-database---. | | .--------------------. | '--r--+-tablespace-+--' | V | | '--n-----tablespace name---+--' >-----+----+--------------------------------------------------->< +--h-+ +--u-+ '--?-' Command Parameters -d database namefile-name Specifies the alias name for the database that will be restored. -t timestamp Specifies the timestamp for a backup image that will be incrementally restored. -r Specifies the type of restore that will be executed. The default is database. Note: If tablespace is chosen and no table space names are given, the utility looks into the history entry of the specified image and uses the table space names listed to do the restore. -n tablespace name Specifies the name of one or more table spaces that will be restored. Note: If a database restore type is selected and a list of table space names is specified, the utility will continue as a tablespace restore using the table space names given. -h/-u/-? Displays help information. When this option is specified, all other options are ignored, and only the help information is displayed. Examples db2ckrst -d mr -t 20001015193455 -r database db2ckrst -d mr -t 20001015193455 -r tablespace db2ckrst -d mr -t 20001015193455 -r tablespace -n tbsp1 tbsp2 > db2 backup db mr Backup successful. The timestamp for this backup image is : 20001016001426 > db2 backup db mr incremental Backup successful. The timestamp for this backup image is : 20001016001445 > db2ckrst -d mr -t 20001016001445 Suggested restore order of images using timestamp 20001016001445 for database mr. =================================================================== db2 restore db mr incremental taken at 20001016001445 db2 restore db mr incremental taken at 20001016001426 db2 restore db mr incremental taken at 20001016001445 =================================================================== > db2ckrst -d mr -t 20001016001445 -r tablespace -n userspace1 Suggested restore order of images using timestamp 20001016001445 for database mr. =================================================================== db2 restore db mr tablespace ( USERSPACE1 ) incremental taken at 20001016001445 db2 restore db mr tablespace ( USERSPACE1 ) incremental taken at 20001016001426 db2 restore db mr tablespace ( USERSPACE1 ) incremental taken at 20001016001445 =================================================================== Usage Notes The database history must exist in order for this utility to be used. If the database history does not exist, specify the HISTORY FILE option in the RESTORE command before using this utility. If the FORCE option of the PRUNE HISTORY command is used, it will be possible to delete entries that are required for recovery from the most recent, full database backup image. The default operation of the PRUNE HISTORY command prevents required entries from being deleted. It is recommended that the FORCE option of the PRUNE HISTORY command not be used. It is recommended that you keep good records of your backups and use this utility as a guide. ------------------------------------------------------------------------ 10.4 db2gncol (new command) db2gncol - Update Generated Column Values Updates generated columns in tables that are in check pending mode and have limited log space. This tool is used to prepare for a SET INTEGRITY statement on a table that has columns which are generated by expressions. Authorization One of the following * sysadm * dbadm Command Syntax >>-db2gncol----d--database----s--schema_name----t--table_name---> >-----c--commit_count----+---------------------------+----------> '--u--userid---p--password--' >-----+-----+-------------------------------------------------->< '--h--' Command Parameters -d database Specifies an alias name for the database in which the table is located. -s schema_name Specifies the schema name for the table. The schema name is case sensitive. -t table_name Specifies the table for which new column values generated by expressions are to be computed. The table name is case sensitive. -c commit_count Specifies the number of rows updated between commits. This parameter influences the size of the log space required to generate the column values. -u userid Specifies a user ID with system administrator or database administrator privileges. If this option is omitted, the current user is assumed. -p password Specifies the password for the specified user ID. -h Displays help information. When this option is specified, all other options are ignored, and only the help information is displayed. Usage Notes Using this tool instead of the FORCE GENERATED option on the SET INTEGRITY statement may be necessary if a table is large and the following conditions exist: * All column values must be regenerated after altering the generation expression of a generated column. * An external UDF used in a generated column was changed, causing many column values to change. * A generated column was added to the table. * A large load or load append was performed that did not provide values for the generated columns. * The log space is too small due to long-running concurrent transactions or the size of the table. This tool will regenerate all column values that were created based on expressions. While the table is being updated, intermittent commits are performed to avoid using up all of the log space. Once db2gncol has been run, the table can be taken out of check pending mode using the SET INTEGRITY statement. ------------------------------------------------------------------------ 10.5 db2inidb - Initialize a Mirrored Database In a split mirror environment, this command is used to initialize a mirrored database for different purposes. Authorization Must be one of the following: o sysadm o sysctrl o sysmaint Required Connection None Command Syntax >>-db2inidb----database_alias----AS----+-SNAPSHOT-+------------>< +-STANDBY--+ '-MIRROR---' Command Parameters database_alias Specifies the alias of the database to be initialized. SNAPSHOT Specifies that the mirrored database will be initialized as a clone of the primary database. This database is read only. STANDBY Specifies that the database will be placed in roll forward pending state. New logs from the primary database can be fetched and applied to the standby database. The standby database can then be used in place of the primary database if it goes down. MIRROR Specifies that the mirrored database is to be used as a backup image which can be used to restore the primary database. ------------------------------------------------------------------------ 10.6 db2look - DB2 Statistics Extraction Tool The syntax diagram should appear as follows: >>-db2look---d--DBname----+--------------+---+-----+---+-----+--> '--u--Creator--' '--s--' '--g--' >-----+-----+---+-----+---+-----+---+-----+---+-----+-----------> '--a--' '--h--' '--r--' '--c--' '--p--' >-----+------------+---+-------------------+--------------------> '--o--Fname--' '--e--+----------+--' '--t Tname-' >-----+-------------------+---+-----+---+-----+-----------------> '--m--+----------+--' '--l--' '--x--' '--t Tname-' >-----+---------------------------+---+-----+------------------>< '--i--userid---w--password--' '--f--' The -td x parameter has been added following the -c parameter. Its definition is as follows: Specifies the statement delimiter for SQL statements generated by db2look. If this option is not specified, the defaults is the semicolon ';'. It is recommened that this option be used if the -e option is specified. In this case, the extracted objects may contain triggers or SQL routines. The following example will also be added: Generate the DDL statements for objects created by all users in the database DEPARTMENT. The db2look output is sent to file db2look.sql: db2look -d department -a -e -td % -o db2look.sql db2 -td% -f db2look.sql ------------------------------------------------------------------------ 10.7 db2updv7 - Update Database to Version 7 Current Fix Level This command updates the system catalogs in a database to support the current FixPak in the following ways: * Enables the use of the new built-in functions (ABS, DECRYPT_BIN, DECRYPT_CHAR, ENCRYPT, GETHINT, MULTIPLY_ALT, and ROUND). * Enables the use of the new built-in procedures (GET_ROUTINE_SAR and PUT_ROUTINE_SAR). * Adds or applies corrections to WEEK_ISO and DAYOFWEEK_ISO functions on Windows and OS/2 databases. * Applies a correction to table packed descriptors for tables migrated from Version 2 to Version 6. * Creates the view SYSCAT.SEQUENCES. Authorization sysadm Required Connection Database. This command automatically establishes a connection to the specified database. Command Syntax >>-db2updv7----d---database_name--------------------------------> >-----+---------------------------+---+-----+------------------>< '--u--userid---p--password--' '--h--' Command Parameters -d database-name Specifies the name of the database to be updated. -u userid Specifies the user ID. -p password Specifies the password for the user. -h Displays help information. When this option is specified, all other options are ignored, and only the help information is displayed. Example After installing the FixPak, update the system catalog in the sample database by issuing the following command: db2updv7 -d sample Usage Notes This tool can only be used on a database running DB2 Version 7.1 or Version 7.2 with at least FixPak 2 installed. If the command is issued more than once, no errors are reported and each of the catalog updates is applied only once. To enable the new built-in functions, all applications must disconnect from this database and the database must be deactivated if it has been activated. ------------------------------------------------------------------------ 10.8 New Command Line Processor Option (-x, Suppress printing of column headings) A new option, -x, tells the command line processor to return data without any headers, including column names. The default setting for this command option is OFF. ------------------------------------------------------------------------ 10.9 True Type Font Requirement for DB2 CLP To correctly display the national characters for single byte (SBCS) languages correctly from the DB2 command line processor (CLP) window, change the font to True Type. ------------------------------------------------------------------------ 10.10 ADD DATALINKS MANAGER The required authorization level for this command is one of the following: * sysadm * sysctrl * sysmaint The following usage note should be added: This command is effective only after all applications have been disconnected from the database. The DB2 Data Links Manager being added must be completely set up and running for this command to be successful. The database must also be registered on the DB2 Data Links Manager using the dlfm add_db command. The maximum number of DB2 Data Links Managers that can be added to a database is 16. ------------------------------------------------------------------------ 10.11 ARCHIVE LOG (new command) Archive Log Closes and truncates the active log file for a recoverable database. If user exit is enabled, issues an archive request. Authorization One of the following: * sysadm * sysctrl * sysmaint * dbadm Required Connection This command automatically establishes a connection to the specified database. If a connection already exists, an error is returned. Command Syntax >>-ARCHIVE LOG FOR----+-DATABASE-+--database-alias--------------> '-DB-------' >-----+---------------------------------------+-----------------> '-USER--username--+------------------+--' '-USING--password--' >-------| On Node clause |------------------------------------->< On Node clause |---ON----+-| Node List clause |-------------------------+------| '-ALL NODES--+-------------------------------+-' '-EXCEPT--| Node List clause |--' Node List clause .-,-----------------------------------. V | |---+-NODE--+--(-----node number--+------------------+--+---)---| '-NODES-' '-TO--node number--' Command Parameters DATABASE database-alias Specifies the alias of the database whose active log is to be archived. USER username Identifies the user name under which a connection will be attempted. USING password Specifies the password to authenticate the user name. ON ALL NODES Specifies that the command should be issued on all nodes in the db2nodes.cfg file. This is the default if a node clause is not specified. EXCEPT Specifies that the command should be issued on all nodes in the db2nodes.cfg file, except those specified in the node list. ON NODE/ON NODES Specifies that the logs should be archived for the specified database on a set of nodes. node number Specifies a node number in the node list. TO node number Used when specifying a range of nodes for which the logs should be archived. All nodes from the first node number specified up to and including the second node number specified are included in the node list. Usage Notes This command can be used to collect a complete set of log files up to a known point. The log files can then be used to update a standby database. This function can only be executed when there is no database connection to the specified database. This prevents a user from executing the command with uncommitted transactions. As such, the ARCHIVE LOG command will not forcibly commit the user's incomplete transactions. If a database connection to the specified database already exists and this command is executed, the command will terminate and return an error. If another application has transactions in progress with the specified database when this command is executed, there will be a slight performance degradation since the command flushes the log buffer to disk. Any other transactions attempting to write log records to the buffer will have to wait until the flush is complete. If used in an MPP environment, a subset of nodes may be specified by using a node clause. If the node clause is not specified, the default behaviour for this command is to close and archive the active log on all nodes. Using this command will cause a database to lose a portion of its LSN space, and thereby hasten the exhaustion of valid LSNs. ------------------------------------------------------------------------ 10.12 BACKUP DATABASE 10.12.1 Syntax Diagram The syntax diagram for BACKUP DATABASE will be updated to reflect the new INCREMENTAL parameter and the optional DELTA argument. Specifying the INCREMENTAL option alone will result in a cumulative backup image being produced. The optional DELTA argument can be used to specify the production of a non-cumulative backup image. >>-BACKUP----+-DATABASE-+---database-alias----------------------> '-DB-------' >-----+---------------------------------------+-----------------> '-USER--username--+------------------+--' '-USING--password--' >-----+--------------------------------------------+------------> | .-,------------------. | | V | | '-TABLESPACE--(-----tablespace-name---+---)--' >-----+---------+---+--------------------------+----------------> '-ONLINE--' '-INCREMENTAL--+--------+--' '-DELTA--' >-----+-------------------------------------------------------+-> +-USE TSM--+-------------------------------+------------+ | '-OPEN--num-sessions--SESSIONS--' | | .-,--------. | | V | | +-TO----+-dir-+--+--------------------------------------+ | '-dev-' | '-LOAD--library-name--+-------------------------------+-' '-OPEN--num-sessions--SESSIONS--' >-----+-----------------------------+---------------------------> '-WITH--num-buffers--BUFFERS--' >-----+----------------------+---+-----------------+------------> '-BUFFER--buffer-size--' '-PARALLELISM--n--' >----+-------------------+------------------------------------->< '-WITHOUT PROMPTING-' 10.12.2 DB2 Data Links Manager Considerations If one or more Data Links servers are configured for the database, the backup operation will succeed, even if a Data Links server is not available. When the Data Links server restarts, backup processing will be completed on that Data Links server before it becomes available to the database again. Note: If there are twice as many backups still waiting for an unavailable Data Links server as are retained in the history file for the database (database configuration parameter num_db_backups), the backup operation will fail. ------------------------------------------------------------------------ 10.13 BIND The command syntax for DB2 should be modified to show the federated parameter as follows: FEDERATED--+--NO--+-- '-YES--' FEDERATED Specifies whether a static SQL statement in a package references a nickname or a federated view. If this option is not specified and a static SQL statement in the package references a nickname or a federated view, a warning is returned and the package is created. NO A nickname or federated view is not referenced in the static SQL statements of the package. If a nickname or federated view is encountered in a static SQL statement during the prepare or bind of this package, an error is returned and the package is not created. YES A nickname or federated view can be referenced in the static SQL statements of the package. If no nicknames or federated views are encountered in static SQL statements during the prepare or bind of the package, no errors or warnings are returned and the package is created. Note: In Version 7 FixPak 2, an SQL1179W warning message is generated by the server when precompiling a source file or binding a bind file without specifying a value for the FEDERATED option. The same message is generated when the source file or bind file includes static SQL references to a nickname. There are two exceptions: o For clients that are at an earlier FixPak than Version 7 FixPak 2 or for downlevel clients, the sqlaprep() API does not report this SQL1179W warning in the message file. The Command Line Processor PRECOMPILE command also does not output the warning in this case. o For clients that are at an earlier FixPak than Version 7 FixPak 2 or for downlevel clients, the sqlabndx API does report this SQL1179W warning in the message file. However, the message file also incorrectly includes an SQL0092N message indicating that no package was created. This is not correct as the package is indeed created. The Command Line Processor BIND command returns the same erroneous warning. ------------------------------------------------------------------------ 10.14 CALL The syntax for the CALL command should appear as follows: .-,---------------. V | >>-CALL--proc-name---(-----+-----------+--+---)---------------->< '-argument--' The description of the argument parameter has been changed to: Specifies one or more arguments for the stored procedure. All input and output arguments must be specified in the order defined by the procedure. Output arguments are specified using the "?" character. For example, a stored procedure foo with one integer input parameter and one output parameter would be invoked as "call foo (4, ?)". Note: 1. When invoking this utility from an operating system prompt, it may be necessary to delimit the command as follows: "call DEPT_MEDIAN (51)" A single quotation mark (') can also be used. 2. The stored procedure being called must be uniquely named in the database. 3. The stored procedure must be cataloged. If an uncataloged procedure is called, a DB21036 error message is returned. 4. A DB21101E message is returned if not enough parameters are specified on the command line, or the command line parameters are not in the correct order (input, output), according to the stored procedure definition. 5. There is a maximum of 1023 characters for a result column. 6. LOBS and binary data (FOR BIT DATA, VARBINARY, LONGVARBINARY, GRAPHIC, VARGAPHIC, or LONGVARGRAPHIC) are not supported. 7. CALL supports result sets. 8. If an SP with an OUTPUT variable of an unsupported type is called, the CALL fails, and message DB21036 is returned. 9. The maximum length for an INPUT parameter to CALL is 1024. ------------------------------------------------------------------------ 10.15 DROP DATALINKS MANAGER (new command) DROP DATALINKS MANAGER Drops a DB2 Data Links Manager from the list of registered DB2 Data Links Managers for a specified database. Authorization One of the following: * sysadm * sysctrl * sysmaint Command Syntax >>-DROP DATALINKS MANAGER FOR----+-DATABASE-+--dbname---USING---> '-DB-------' >----name------------------------------------------------------>< Command Parameters DATABASE dbname Specifies a database name. USING name Specifies the name of the DB2 Data Links Manager server as shown by the LIST DATALINKS MANAGER command. Examples Example 1 Dropping a DB2 Data Links Manager micky.almaden.ibm.com from database TEST under instance validate residing on host bramha.almaden.ibm.com when some database tables have links to micky.almaden.ibm.com. It is extremely important that the following steps be taken when dropping a DB2 Data Links Manager. 1. Take a database backup for database TEST. 2. If there are any links to micky.almaden.ibm.com, unlink them: a. Log on with a user ID belonging to SYSADM_GROUP and obtain an exclusive mode connection the the database TEST. connect to test in exclusive mode Ensure that this is the only connection to test using that user ID. This will prevent any new links from being created. b. Obtain a list of all FILE LINK CONTROL DATALINK columns and the tables containing them in the database. select tabname, colname from syscat.columns where substr(dl_features,2,1)='F' c. For each FILE LINK CONTROL DATALINK column in the list, issue SQL SELECT to determine if links to micky.almaden.ibm.com exist. For example, for a DATALINK column c in table t, the SELECT statement would be: select count(*) from t where dlurlserver(t.c) = 'MICKY.ALMADEN.IBM.COM' d. For each FILE LINK CONTROL DATALINK column containing such links, issue SQL UPDATE to unlink values which are links to micky.almaden.ibm.com. For example, for a DATALINK column c in table t, the UPDATE statement would be: update t set t.c = null where dlurlserver(t.c)='MICKY.ALMADEN.IBM.COM' If t.c is not nullable, the following can be used instead: update t set t.c = dlvalue('') where dlurlserver(t.c)='MICKY.ALMADEN.IBM.COM' e. Commit this SQL UPDATE: commit 3. Issue the DROP DATALINKS MANAGER command: drop datalinks manager for db test using node micky.almaden.ibm.com 4. Terminate the exclusive mode connection to make the changes effective and to allow other connections to the database: terminate 5. Initiate unlink processing and garbage collection of backup information for TEST on micky.almaden.ibm.com. As DB2 Data Links Manager Administrator, issue the following command on micky.almaden.ibm.com: dlfm drop_dlm test validate bramha.almaden.ibm.com This will unlink any files that are still linked to database TEST, just in case the user has missed unlinking them before invoking step 3. If micky.almaden.ibm.com has backup information (for example, archive files, metadata) for files previously linked to database TEST, this command will initiate garbage collection of that information. The actual unlinking and garbage collection will be performed asynchronously. Example 2 Deleting DATALINK values that are links to files on a DB2 Data Links Manager called micky.almaden.ibm.com, when the Manager has already been dropped from database TEST. This may be required if steps in Example 1 were not followed while dropping micky.almaden.ibm.com. SQL DELETE, SELECT, and UPDATE statements will not be successful for such DATALINK values (SQL0368). The user must run a reconcile operation for each table that contains such DATALINK values. Each DATALINK value that was a link to micky.almaden.ibm.com will be updated to NULL or a zero-length DATALINK value. Any row containing such a value will be inserted into the exception table (if one was specified). However, the DATALINK value will not include the prefix name. The prefix name in the original DATALINK value is no longer obtainable by the system, because micky.almaden.ibm.com has been dropped. For example, if the original DATALINK value was 'http://host.com/dlfs/x/y/a.b' and '/dlfs' is the prefix name, the DATALINK value in the exception table will contain 'http://host.com/x/y/a.b'. The files referenced by these DATALINK values will continue to remain in linked state on the DB2 Data Links Manager. The dlfm drop_dlm command can be issued on micky.almaden.ibm.com to initiate unlink processing for these files. If micky.almaden.ibm.com has backup information (for example, archive files, metadata) for files previously linked to database TEST, this command will initiate garbage collection of that information. The actual unlinking and garbage collection will be performed asynchronously. Example 3 Multiple incarnations of a DB2 Data Links Manager micky.almaden.ibm.com for a database TEST. This scenario demonstrates that a DB2 Data Links Manager can be re-registered after being dropped, and that it is then treated as a completely new DB2 Data Links Manager. The following steps are only illustrative of a scenario that is possible. If, as recommended, the steps in Example 1 are followed for dropping micky.almaden.ibm.com, links to the older incarnation of micky.almaden.ibm.com will not exist; that is, one will not see error SQL0368 in step 7 below. 1. Register micky.almaden.ibm.com to database TEST: add datalinks manager for db test using node micky.almaden.ibm.com port 14578 2. Create links to files on micky.almaden.ibm.com: connect to test create table t(c1 int, c2 datalink linktype url file link control mode db2options) insert into t values(1, dlvalue('file://micky.almaden.ibm.com/pictures/ yosemite.jpg')) commit terminate 3. Drop micky.almaden.ibm.com from database TEST: drop datalinks manager for db test using micky.almaden.ibm.com 4. Select DATALINK values: connect to test select * from t terminate The user will see: SQL0368 The DB2 Data Links Manager "MICKY.ALMADEN.IBM.COM" is not registered to the database. SQLSTATE=55022. 5. Register micky.almaden.ibm.com to database TEST again: add datalinks manager for db test using node micky.almaden.ibm.com port 14578 6. Insert more DATALINK values: connect to test insert into t values(2, dlvalue('file://micky.almaden.ibm.com/pictures/ tahoe.jpg')) commit 7. Select DATALINK values: select c2 from t where c1 = 2 is successful because the value being selected is a link to the currently registered incarnation of micky.almaden.ibm.com. select c2 from t where c1 = 1 returns: SQL0368 The DB2 Data Links Manager "MICKY.ALMADEN.IBM.COM" is not registered to the database. SQLSTATE=55022. because the value being selected is a link to the incarnation of micky.almaden.ibm.com which was dropped in step 3 above. Usage Notes The effects of the DROP DATALINKS MANAGER command cannot be rolled back. It is extremely important to follow the steps outlined in Example 1 when using the DROP DATALINKS MANAGER command. This command is effective only after all applications have been disconnected from the database. Upon successful completion of the command, the user is informed (DB210201I) that no processing has been done on the DB2 Data Links Manager. Before dropping a DB2 Data Links Manager, the user must ensure that the database does not have any links to files on that DB2 Data Links Manager. If links do exist in the database after a DB2 Data Links Manager has been dropped, the user must run the reconcile utility to get rid of them. The reconcile utility will set these links to NULL (if the DATALINK column is nullable), or to a zero-length DATALINK value. Files corresponding to links between a database and a dropped DB2 Data Links Manager remain in linked state. That is, they are inaccessible to operations like read, write, rename, delete, change of permissions, or change of ownership. Archived copies of unlinked files on the DB2 Data Links Manager will not be garbage collected by this command. However, users can explicitly initiate unlink processing and garbage collection using the dlfm drop_dlm command on the DB2 Data Links Manager. It is recommended that a database backup be taken before dropping a DB2 Data Links Manager. In addition, ensure that all replication subscriptions have replicated all changes involving this DB2 Data Links Manager. If a backup was taken before the DB2 Data Links Manager was dropped from a database, and that backup image is used to restore after that DB2 Data Links Manager was dropped, restore or rollforward processing may put certain tables in datalink reconcile pending (DRP) state. ------------------------------------------------------------------------ 10.16 EXPORT In the section "DB2 Data Links Manager Considerations", Step 3 of the procedure to ensure that a consistent copy of the table and the corresponding files referenced by DATALINK columns are copied for export should read: 3. Run the dlfm_export utility at each Data Links server. Input to the dlfm_export utility is the control file name, which is generated by the export utility. This produces a tar (or equivalent) archive of the files listed within the control file. For Distributed File Systems (DFS), the dlfm_export utility will get the DCE network root credentials before archiving the files listed in the control file. dlfm_export does not capture the ACLs information of the files that are archived. In the same section, the bullets following "Successful execution of EXPORT results in the generation of the following files" should be modified as follows: The second sentence in the first bullet should read: A DATALINK column value in this file has the same format as that used by the import and load utilities. The first sentence in the second bullet should read: Control files server_name, which are generated for each Data Links server. (On the Windows NT operating system, a single control file, ctrlfile.lst, is used by all Data Links servers. For DFS, there is one control file for each cell.) The following sentence should be added to the paragraph before Table 5: For more information about dlfm_export, refer to the "Data Movement Utilities Guide and Reference" under "Using Export to move DB2 Data Links Manager Data". ------------------------------------------------------------------------ 10.17 GET DATABASE CONFIGURATION The description of the DL_TIME_DROP configuration parameter should be changed to the following: Applies to DB2 Data Links Manager only. This parameter specifies the number of days files would be retained on an archive server (such as a TSM server) after a DROP DATABASE command is issued. The new parameter TRACKMOD will be added to the GET DATABASE CONFIGURATION command. The syntax will appear as follows: >>-GET----+-DATABASE-+---+-CONFIGURATION-+--FOR-----------------> '-DB-------' +-CONFIG--------+ '-CFG-----------' .-NO--. >----database-alias---TRACKMOD--+-YES-+------------------------>< The parameter description will be added as follows: TRACKMOD Indicates whether DB2 should track modified pages in the database in order to allow incremental backups to be taken. OFF Specifies that changed pages should not be tracked. This is the default for databases created prior to Version 7.1, FixPak 3. ON Specifies that changed pages should be tracked. When this parameter is set, incremental backups of the database can be made. This is the default for databases created with Version 7.1, FixPak 3 or later. ------------------------------------------------------------------------ 10.18 GET ROUTINE (new command) GET ROUTINE Retrieves a routine SQL Archive (SAR) file for a specified SQL routine. Authorization dbadm Required Connection Database. If implicit connect is enabled, a connection to the default database is established. Command Syntax >>-GET ROUTINE--INTO---file_name----FROM----+-----------+-------> '-SPECIFIC--' >-------PROCEDURE----routine_name------------------------------>< Command Parameters INTO file-name Names the file where routine SQL archive (SAR) is stored. FROM Indicates that start of the specification of the routine to be retrieved. SPECIFIC The specified routine-name is given as a specific name. PROCEDURE The routine is an SQL procedure. routine-name The name of the procedure. If SPECIFIC is specified then it is the specific name of the procedure. If the name is not qualified with a schema name, the CURRENT SCHEMA is used as the schema name of the routine. The routine-name must be an existing procedure that is defined as an SQL procedure. Examples GET ROUTINE INTO procs/proc1.sar FROM PROCEDURE myappl.proc1; ------------------------------------------------------------------------ 10.19 GET SNAPSHOT The description for the FCM FOR ALL NODES parameter should appear as follows: Provides Fast Communication Manager (FCM) statistics between the node against which the GET SNAPSHOT command was issued and the other nodes in the EEE instance. ------------------------------------------------------------------------ 10.20 IMPORT In the section "DB2 Data Links Manager Considerations", the following sentence should be added to Step 3: For Distributed File Systems (DFS), update the cell name information in the URLs (of the DATALINK columns) from the exported data for the SQL table, if required. The following sentence should be added to Step 4: For DFS, define the cells at the target configuration in the DB2 Data Links Manager configuration file. The paragraph following Step 4 should read: When the import utility runs against the target database, files referred to by DATALINK column data are linked on the appropriate Data Links servers. ------------------------------------------------------------------------ 10.21 LIST HISTORY The CREATE TABLESPACE parameter will be added to the LIST HISTORY command. The syntax diagram will appear as follows: >>-LIST HISTORY----+-------------------+------------------------> +-BACKUP------------+ +-ROLLFORWARD-------+ +-ALTER TABLESPACE--+ +-DROPPED TABLE-----+ +-LOAD--------------+ +-RENAME TABLESPACE-+ '-CREATE TABLESPACE-' >-----+-ALL--------------------------------+--------------------> +-SINCE--timestamp-------------------+ '-CONTAINING--+-_schema.objectname-+-' '-_objectname--------' >----FOR--+----------+---database-alias------------------------>< +-DATABASE-+ '-DB-------' The parameter description will be added as follows: CREATE TABLESPACE Lists all CREATE TABLESPACE and DROP TABLESPACE operations. The Usage Notes will be updated as follows: The following symbols will be added to the Operation section of the report: * A - Create tablespace * O - Drop tablespace * U - Unload The symbols under the Type section of the report will be reorganized as follows: * Backup Types o F - Offline o N - Online o I - Incremental Offline o O - Incremental Online o D - Delta Offline o E - Delta Online * Rollforward Types o E - End of log o P - Point in time * Load Types o I - Insert o R - Replace * Alter tablespace Types o C - Add containers o R - Rebalance * Quiesce Types o S - Quiesce Share o U - Quiesce Update o X - Quiesce Exclusive o Z - Quiesce Reset ------------------------------------------------------------------------ 10.22 LOAD In the section "DB2 Data Links Manager Considerations", add the following sentence to Step 1 of the procedure that is to be performed before invoking the load utility, if data is being loaded into a table with a DATALINK column that is defined with FILE LINK CONTROL: For Distributed File Systems (DFS), ensure that the DB2 Data Links Managers within the target cell are registered. The following sentence should be added to Step 5: For DFS, register the cells at the target configuration referred to by DATALINK data (to be loaded) in the DB2 Data Links Manager configuration file. In the section "Representation of DATALINK Information in an Input File", the first note following the parameter description for urlname should read: Currently "http", "file", "unc", and "dfs" are permitted as a schema name. The first sentence of the second note should read: The prefix (schema, host, and port) of the URL name is optional. For DFS, the prefix refers to the schema cellname filespace-junction portion. In the DATALINK data examples for both the delimited ASCII (DEL) file format and the non-delimited ASCII (ASC) file format, the third example should be removed. The DATALINK data examples in which the load or import specification for the column is assumed to be DL_URL_DEFAULT_PREFIX should be removed and replaced with the following: Following are DATALINK data examples in which the load or import specification for the column is assumed to be DL_URL_REPLACE_PREFIX ("http://qso"): * http://www.almaden.ibm.com/mrep/intro.mpeg This sample URL is stored with the following parts: o schema = http o server = qso o path = /mrep/intro.mpeg o comment = NULL string * /u/me/myfile.ps This is stored with the following parts: o schema = http o server = qso o path = /u/me/myfile.ps o comment = NULL string ------------------------------------------------------------------------ 10.23 PING (new command) PING Tests the network response time of the underlying connectivity between a client and a database server where DB2 Connect is used to establish the connection. Authorization None Required Connection Database Command Syntax .-time-. .-1--+------+---------------------. >>-PING---db_alias----+-+-----------------------------+-+------>< '-number_of_times--+-------+--' +-times-+ '-time--' Command Parameters db_alias Specifies the database alias for the database on a DRDA server that the ping is being sent to. Note: This parameter, although mandatory, is not currently used. It is reserved for future use. Any valid database alias name can be specified. number of times Specifies the number of iterations for this test. The value must be between 1 and 32767 inclusive. The default is 1. One timing will be returned for each iteration. Examples To test the network response time for the connection to the host database server hostdb once: db2 ping hostdb 1 or: db2 ping hostdb The command will display output that looks like this: Elapsed time: 7221 microseconds To test the network response time for the connection to the host database server hostdb 5 times: db2 ping hostdb 5 or: db2 ping hostdb 5 times The command will display output that looks like this: Elapsed time: 8412 microseconds Elapsed time: 11876 microseconds Elapsed time: 7789 microseconds Elapsed time: 10124 microseconds Elapsed time: 10988 microseconds Usage Notes A database connection must exist before invoking this command, otherwise an error will result. The elapsed time returned is for the connection between the client and a DRDA server database via DB2 Connect. ------------------------------------------------------------------------ 10.24 PUT ROUTINE (new command) PUT ROUTINE Uses the specified routine SQL Archive (SAR) file to define a routine in the database. Authorization dbadm Required Connection Database. If implicit connect is enabled, a connection to the default database is established. Command Syntax >>-PUT ROUTINE----FROM----file-name-----------------------------> >-----+---------------------------------------+---------------->< '-OWNER--new-owner--+----------------+--' '-USE REGISTERS--' Command Parameters FROM file-name Names the file where routine SQL archive (SAR) is stored. OWNER new-owner Specifies a new authorization-name for the routine that will be used for authorization checking of the routine. The new-owner must have the necessary privileges for the routine to be defined. If the OWNER clause is not specified, the authorization-name that originally defined the routine is used. USE REGISTERS Indicates that the CURRENT SCHEMA and CURRENT PATH special registers are used to define the routine. If this clause is not specified, the settings for the default schema and SQL path are the settings used when the routine was originally defined. CURRENT SCHEMA is used as the schema name for unqualified object names in the routine definition (including the name of the routine) and CURRENT PATH is used to resolve unqualified routines and data types in the routine definition. Examples PUT ROUTINE FROM procs/proc1.sar; Usage Notes No more than one procedure can be concurrently installed under a given schema. ------------------------------------------------------------------------ 10.25 RECONCILE The following usage note should be added to the command description: During reconciliation, attempts are made to link files which exist according to table data, but which do not exist according to Data Links Manager metadata, if no other conflict exists. A required DB2 Data Links Manager is one which has a referenced DATALINK value in the table. Reconcile tolerates unavailability of a required DB2 Data Links Manager as well as those that are configured to the database but are not part of the table data. If an exception table is not specified, the exception report file (filename.exp) will have the host name, file name, column ID, and reason code for each of the DATALINK column values for which file references could not be re-established. If the file reference could not be re-established because the DB2 Data Links Manager itself was dropped from the database using the DROP DATALINKS MANAGER command, the file name reported in the exception report file is not the full file name; that is, the prefix part is missing. In the exception table for the DATALINK values whose DB2 Data Links Manager is dropped or is not available, the file name in the DATALINK value is not the full file name. The prefix part is missing. For example, if the original DATALINK value was 'http://host.com/dlfs/x/y/a.b', the value reported in the exception table will be 'http://host.com/x/y/a.b'; that is, the prefix name 'dlfs' will not be included. The exception report file in this case will have 'x/y/a.b'; that is, the prefix name 'dlfs' will not be included. At the end of the reconciliation process, the table is taken out of datalink reconcile pending (DRP) state only if reconcile processing is complete on all the required DB2 Data Links Managers. If reconcile processing is pending on any of the required DB2 Data Links Managers (because they were unavailable), the table will remain, or be placed, in DRP state. The following should be added to the list of possible violations: 00010-DB2 Data Links Manager referenced by the DATALINK value has been dropped from the database using the DROP DATALINKS MANAGER command. In this case, the corresponding DATALINK value in the exception table will not contain the prefix name. For example, if the original DATALINK value was 'http://host.com/dlfs/prfx/x/y/a.b', and '/dlfs/prfx' is the prefix name, the exception table will contain 'http://host.com/x/y/a.b'. ------------------------------------------------------------------------ 10.26 REORGANIZE TABLE The following sentence will be added to the Usage Notes: REORGANIZE TABLE cannot use an index that is based on an index extension. ------------------------------------------------------------------------ 10.27 RESTORE DATABASE 10.27.1 Syntax The following option will be added to the syntax of the RESTORE DATABASE command after the TABLESPACE/TABLESPACE ONLINE/HISTORY FILE options: >>-+-------------------------+--------------------------------->< '-INCREMENTAL--+-------+--' '-ABORT-' The parameter descriptions will be added as follows: INCREMENTAL Results in a manual cumulative restore of the database. The user will issue each of the restore commands. ABORT This parameter should be used to terminate an incremental restore before successful completion. The following examples will also be added: The following is a sample weekly incremental backup strategy with a recoverable database. A full backup is scheduled once per week, a delta every day, plus an incremental mid-week: (Sun) backup db kdr use adsm (Mon) backup db kdr online incremental delta use adsm (Tue) backup db kdr online incremental delta use adsm (Wed) backup db kdr online incremental use adsm (Thu) backup db kdr online incremental delta use adsm (Fri) backup db kdr online incremental delta use adsm (Sat) backup db kdr online incremental use adsm For a manual database restore of images created above on Friday morning, issue the following commands: restore db kdr incremental taken at (Thu) restore db kdr incremental taken at (Sun) restore db kdr incremental taken at (Wed) restore db kdr incremental taken at (Thu) Note: Any RESTORE command of the form db2 restore db will perform a full database restore, regardless of whether the image being restored is a database image or a table space image. Any RESTORE command of the form db2 restore db tablespace will perform a table space restore of the table spaces found in the image. Any RESTORE command in which a list of table spaces is provided will perform a restore of whatever table spaces were explicitly listed. 10.27.2 DB2 Data Links Manager Considerations The second paragraph in the section entitled "DB2 Data Links Manager Considerations" should be replaced with: If one or more Data Links servers are configured for the database, the restore operation will succeed, even if a Data Links server is not available. When the Data Links server restarts, restore processing will be completed on that Data Links server before it becomes available to the database again. NOTE: If a database restore operation is still waiting for an unavailable Data Links server, any subsequent database or table space restore operations will fail. ------------------------------------------------------------------------ 10.28 ROLLFORWARD DATABASE The second paragraph in the section entitled "DB2 Data Links Manager Considerations" should be replaced with: If one or more Data Links servers are configured for the database, the rollforward operation will succeed, even if a Data Links server is not available. When the Data Links server restarts, rollforward processing will be completed on that Data Links server before it becomes available to the database again. ------------------------------------------------------------------------ 10.29 Documentation Error in CLP Return Codes In the Command Line Processor Return Codes section of Chapter 2, the second paragraph should appear as follows: For example, the following Bourne shell script executes the GET DATABASE MANAGER CONFIGURATION command, then inspects the CLP return code: db2 get database manager configuration if [ "$?" = "0" ] then echo "OK!" fi ------------------------------------------------------------------------ Data Movement Utilities Guide and Reference(潲珫次) ------------------------------------------------------------------------ 11.1 Chapter 2. Import 11.1.1 Using Import with Buffered Inserts The note at the end of this section should read: Note: In all environments except EEE, the buffered inserts feature is disabled during import operations in which the INSERT_UPDATE parameter is specified. ------------------------------------------------------------------------ 11.2 Chapter 3. Load 11.2.1 Pending States After a Load Operation The first two sentences in the last paragraph in this section have been changed to the following: The fourth possible state associated with the load process (check pending state) pertains to referential and check constraints, DATALINKS constraints, AST constraints, or generated column constraints. For example, if an existing table is a parent table containing a primary key referenced by a foreign key in a dependent table, replacing data in the parent table places both tables (not the table space) in check pending state. 11.2.2 Load Restrictions and Limitations The following restrictions apply to generated columns and the load utility: * It is not possible to load a table having a generated column in a unique index unless the generated column is an "include column" of the index or the generatedoverride file type modifier is used. If this modifier is used, it is expected that all values for the column will be supplied in the input data file. * It is not possible to load a table having a generated column in the partitioning key unless the generatedoverride file type modifier is used. If this modifier is used, it is expected that all values for the column will be supplied in the input data file. 11.2.3 totalfreespace File Type Modifier The totalfreespace file type modifier (LOAD) has been modified to accept a value between 0 and 2 147 483 647. ------------------------------------------------------------------------ 11.3 Chapter 4. AutoLoader 11.3.1 rexecd Required to Run Autoloader When Authentication Set to YES In the Autoloader Options section the following note will be added to the AUTHENTICATION and PASSWORD Parameters description: In a Linux environment, if you are running the autoloader with the authentication option set to YES, rexecd must be enabled on all machines. If rexecd is not enabled the following error message will be generated: openbreeze.torolab.ibm.com: Connection refused SQL6554N An error occurred when attempting to remotely execute a process. The following error messages will be generated in the db2diag.log file: 2000-10-11-13.04.16.832852 Instance:svtdbm Node:000 PID:19612(db2atld) Appid: oper_system_services sqloRemoteExec Probe:31 ------------------------------------------------------------------------ Replication 峪烈囓楯銳 ------------------------------------------------------------------------ 12.1 纋柞瓬唏 IBM 再齗 媥 DataJoiner 次劑 2 詰鶔s次僛磟g唏 IBM 再齗耍 詰椻唏 IBM 再 齗纋柞耍愩 Informix耑Microsoft SQL Server耑Oracle耑Sybase耑 Sybase SQL Anywhere耶 鞮養鄧媥軝ю悚纋柞戍皖搨s鼪耍廅長 DB2 Relational Connect 次劑 7 鑭嗀鶔s戍柮耶{酨戍 DB2 碉 DataJoiner 次劑詻嗀戍樹鬧 苗AS/400耑OS/2耑OS/390耑UNIX 瓬 Windows英耍鞮澱鏺媥 DJRA苗DataJoiner 纋柞 扯z英鄑噠z蕶屆戍纋柞耶 ------------------------------------------------------------------------ 12.2 彀 Windows 2000 柼戍纋柞 DB2 DataPropagator 次劑 7 烈 Windows 2000 鏼~鑶蛌磡e耶 ------------------------------------------------------------------------ 12.3 暖酨 SQL 戍洄何砷 礔彀 DB2 Connect Personal Edition 珫媥蚼u嚭珫眃赳耍鞮潲妄暖酨 SQL 耶 礔灚媟x酨 SQL 耍鞮醨搌柜屑 DAS 彀鏼擋珫戍砷鬞昔耍柼 DAS 鑭嗀鏼擋耍廅長擂虋鑭嗀廈 DB2 Connect PE 鋇f耶 ------------------------------------------------------------------------ 12.4 DB2 @ 鞮黳彀纋柞蓔秕媥蛈抖U DB2 恙揅壧稒s戍 DB2 @耶 ------------------------------------------------------------------------ 12.5 Web 柼戍 Data Difference Utility 鞮養鄧雚 Web 柰 Data Difference utility (DDU)耍鶐愩柰胃 ftp://ftp.software.ibm.com/ps/products/datapropagator/fixes/耶 DDU 板柜譇削 蓔姥逌{搨耍虪鞮洃虎嵥戍譇嵥次劑耍鄧瓬擁鋇ず次劑祌繾戍 孤鶩C欏僝鬞耍巷囓酀殛削蓔姥逌{搨詻衣戍 README 耶 ------------------------------------------------------------------------ 12.6 3 纋柞髕削 12.6.1 纋柞髕 巷囓酀 DataPropagator 霠戍 Library 贄貘 (http://www.ibm.com/software/data/dpropr/) 鄧灥隳嵥戍s纋柞髕削蒤C 芋僰髕削蓔浀杜BJ耍雚 AIX 柼戍 Oracle 定纋柞僬咻〝醨鶔盎 DB2 for Windows NT 柼定珫戍癸式耶 蠽譇髕削裺媥 DB2 DataJoiner Replication Administration (DJRA) 泚爩耑跌灥熪搨耑矧擋獛搨瓬 DB2 DataJoiner耶 彀岩戍 44 贄耍纙J 6 珫嗀擔q俄戍睦欑愩柰胃 纙J 6胃擔q俄 廅長矧擋獛搨茫繐s鼪僬待再齗耍鞮澱鏺擔柜譇q俄僤翦媥蛈稙蟴 ъ耶 巷俊肄擋僤鬾矧擋獛搨戍媥蛈 ID 養鄧伸q俄耶 礔繐擔q俄胃 1. 雚 Windows NT 銻甇耍鶔到 C:\scripts耶 2. 彀殛到珫擔柜譇駒鷽 DEPTQUAL.PWD 戍s耶 鞮養鄧媥袛摃戠哀 獛搨鉈擔o譇耍洃愩 Notepad耶 q俄戍祺巰伶膋 applyqual.pwd胚 珫 applyqual 戠板鱦牁毠洟柞戍耍 澱鏺幏鞮彀擔肄 齔纋柞]肄詻擋戍矧擋貙肄祅戍戠碉襏耶 彀殛髕削蓔洐A矧擋貙肄祅板 DEPTQUAL耶 : 柛儭 DB2 DataPropagator 次劑 5 鄧鄏孚祺巰伶蒤C 3. q俄戍洇委搨愩柰胃 SERVER=server USER=userid PWD=password 珫胃 再齗 僬垠B癸詰嚭再齗戍巰投耍澱鏺烈肄齔纋柞]肄式珫詻ず戍 蘠曄柜癚耶 彀殛髕削蓔洐Ao巰投長 SAMPLE 瓬 COPYDB耶 userid 鞮繣屁釱鄑噠z欑蕶肄定戍媥蛈 ID耶 礔板 Windows NT 瓬 UNIX 鏼~鑶蚼Ao譇襏板鱦牁毠洟柞戍耶 password 烈媥蛈 ID 虎戍q俄耶 礔板 Windows NT 瓬 UNIX 鏼~鑶蚼A屑o 譇襏嗀鱦牁毠洟柞耶 巷繐彀o譇珫閭枵曉詰鬙耶 譧s柱再齗巰投耑媥蛈 ID 碉 q俄鬞耶 4. q俄戍洇委表鱌鈮欑ю胃 SERVER=SAMPLE USER=subina PWD=subpw SERVER=COPYDB USER=subina PWD=subpw 腺 DB2 蟴ъ烈鼭鄺奚@戍欏僝鬞耍巷囓酀IBM DB2 Administration Guide耶 ------------------------------------------------------------------------ 12.7 5 纋柞W 12.7.1 式瓬托巰投 纋柞儭式瓬托巰投珫戍曉耶 12.7.2 DATALINK 纋柞 彀 Solaris 柼耍DATALINK 纋柞養鏼長次劑 7.1 FixPak 1 戍柜倌鰣C 擂茫繐柜譇 FTP 鎈鏮獛搨耍彀僬峙袛癸 DATALINK 鑶豜祄鬾耍 虋儭 MDTM (modtime) 銻耍ず聤肄戍容歃繾耶愩刖鞮擋戍板次劑 2.6 戍 Solaris 鏼~鑶 蚼A詰摃霄服 MDTM 戍 FTP 儭耍 屑鞮茫繐衣閭戍n耍洃愩 WU-FTPD耶 鞮彀 AS/400 碉醋樹鬧祌繾戍 DB2 定纋柞 DATALINK 托耶 彀 AS/400 樹鬧鑭嗀儭 DATALINK 襏赴鬙赳竀狾李磟g耶 鸉 AIX 4.2 耍彀鞮鸉w]戍媥蛈稑靘X獛搨 (ASNDLCOPY) 祌容耍澱鏺揅壧 APAR IY03101 (AIX 4210-06 @ AIX 4.2.1) 戍 PTF耶 o譇 PTF 霄服柅 FTP 鎈鏮獛搨洇 "modtime/MDTM" 銻戍 Y2K儘獛搨耶 儵ъ欑儘獛搨耍巷照泥墨 "modtime " 銻詻廌鄏妙e歃繾耍珫 長 2000 搤 1 1 祌詻戍耶 愩刖癸式板鴉 CCD 式耍DB2 DataPropagator |碰駒 ASNDLCOPY 鎈搨纋柞 DATALINK 耶 腺 ASNDLCOPY 碉 ASNDLCOPYDF 戍媥蚼A巷囓酀嵧獛搨絛俄戍 躨耶 The following restrictions apply: * 洇 CCD 式鰗嗀 DATALINK 耍椷鑭嗀 DATALINK 襏耶 * 琳鴉 CCD 式鰗嗀 DATALINK 襏耶 * 唏琳 CCD 癸式嗀 DATALINK 托耶 * 僬姜M癸再齗虎嵥耍肄齔纋柞]肄嗀 DATALINK 托戍歈耶 12.7.3 LOB 貙 琳洇 CCD 式碉 LOB 托碉 LOB 嗀皖耶 12.7.4 W李磟g 彀 65 贄耍赴sq詫赳睦欑霄服柰媴餼灉胃 愩刖矧擋獛搨碉嚭再齗s鼪耍矧擋獛搨|耶 媥 AS/400 戍鱦耍巷俊肄繾j齔繾詻纋柞戍琛皪櫹鋇 4 椹觻媴耍 愩劑岩洇 69 贄珫詻戍 4 MB耶 ------------------------------------------------------------------------ 12.8 6 ]肄纋柞 12.8.1 廈B鶔s (Update-anywhere) 樺讘麩 愩刖鞮繐媥蚴肱灝鵃碉肄齔纋柞]肄洇愫F 150 譇戍肄齔纋柞]肄歈僯]肄廈B 鶔s纋柞耍 屑澱鏺鸉柰媴戍 DDL耍鄧擔嚭再齗戍 ASN.IBMSNAP_COMPENSATE 式耶 CREATE TABLE ASN.IBMSNAP_COMPENSATE ( APPLY_QUAL char(18) NOT NULL, MEMBER SMALLINT, INTENTSEQ CHAR(10) FOR BIT DATA, OPERATION CHAR(1)); 12.8.2 ]肄纋柞 95 贄耍赴椻]肄 CD 式耑豯矧碉式繾巰投赳祗腦胃 DPREPL.DFT 板腺 \sqllib\bin 到耍 餪板腺 \sqllib\java 到耶 o板儘俊戍耍 DPREPL.DFT 腺 \sqllib\cc 到耶 128 贄耍奚蟂貙祗腦胃闉z#u跌灥獛搨赳x礤鼭詰媥蚼u跌灥獛搨赳飁銻 耍浂媥蛃O蟂貙僛R媴耶礔鄧椻韥飁醳鼖韥赴跌灥獛搨赳耍屑擂| 擋奚蟂貙僛R媴耶 ------------------------------------------------------------------------ 12.9 8 齶ガ顣跛 纋柞牁吐獛搨彀 Windows 32 祅鑶袑M AIX 柼鸉耶 儵彀 AIX 柼鸉牁吐獛搨耍 巷俊肄 PATH 洇 sqllib/bin 到鋇{彀 /usr/local/bin 容耍 鄧鞻碉 /usr/local/bin/analyze 熪擁肱耶 纋柞牁吐獛搨嗀譇衣閭擋戍戠胃 CT 碉 ATT耶 CT=n 骷ず跌灥鷲式洇 n 洏祌戍熡到耶 殛戠長擋戍耶 礔鞮鑭嗀肄 殛戠耍w]襏長 7 洏耶 AT=n 骷ず矧擋鷲式洇 n 洏祌戍熡到耶 殛戠長擋戍耶 礔鞮鑭嗀肄 殛戠耍w]襏長 7 洏耶 削蒤G analyze mydb1 mydb2 f=mydirectory ct=4 at=2 deepcheck q=applyqual1 柰媴長赴纋柞牁吐獛搨赳祌稒s戠鬞胃 deepcheck 肄牁吐獛搨鸉蘠鬷戍牁吐霄服柰媴鬞胃CD 碉 UOW 飁鬞耑 DB2 for OS/390 式繾牁袑M琳僝`耑腺肄齔纋柞]肄戍癸豯矧祌牁吐耑 肄齔 纋柞繾耍鄧瓬肄齔纋柞]肄 SQL 闉z搨砷耶 牁吐霄服詻嗀戍再齗耶 殛 戠長擋戍耶 lightcheck 肄椻鬑珫颳柰媴鬞胃ASN.IBMSNAP_SUBS_COLS 式詻嗀托腦酯B 肄 齔纋柞砷耑W屑耑坑耍儘俊詰潲戍豯矧耶 殛鬞珫戍琳暖酨 碉擁柜譇洟戍 HTML 鋇耶 殛戠碉 deepcheck 戠虎洈機耶 AS/400 樹鬧戍 PTF 纋柞嗀牁吐獛搨泚爩耶o泚爩搌鐖嗀纋柞膃材鬞耍嵥 耍擁柜譇鷫 IBM 再髕珫眃鋅式戍 HTML 耍鄧茨饎齶ガ戍讘肄耶 儵隳 AS/400 泚爩耍柰譂’ PTF (蜙p耍恙 5769DP2 餪鏺柰 PTF SF61798 詰鶔s 戍次劑)耶 s柱柰媴齶ガ碉鬙讘赴序鬙赳柜躒珫胃 齶ガ胃鑭嗀纋柞鶔戍餼如柰耍矧擋獛搨灉歈鷮胚 矧擋鷲式ず STATUS=2耶 肄齔纋柞]肄霄服愫譇僬咻〝耶礔繐灁]肄珫柜僬咻〝戍貂Bz耍 餪|長欑僬咻〝肄霿柜譇洇 CCD 式 (椷板彀嵥戍肄齔纋柞]肄珫)耶 |僬咻〝鷽鋇鶔耍椷鯔J洇 CCD 式戍赴矧擋赳獛|唏嵥纙戍鸉 (蜙p耍矧擋獛搨養腮冀鼖韥詰麩腮冀熪瞉)耶雚僬咻〝纋柞鶔s 癸式戍矧擋獛搨|灁枵鷮耍廅長擂彀瞉殊洇 CCD 式Q鶔s耶 礔繐欘鷮耍鼖韥洇 CCD 式戍矧擋獛搨 (詰熪|癚纋柞熪擁戍麩)耶 矧擋獛搨|鯔J洇 CCD 式耍虋委\駽珫戍矧擋獛搨Bz詻嗀僬咻〝鄏鶔耶 鰗嗀僬咻〝戍肄齔纋柞]肄|熪擁ю戍扛如耍珫洇 CCD 式墨愫薿戍矧擋獛搨鯔J耶 ------------------------------------------------------------------------ 12.10 9 AS/400 戍跌灥獛搨碉矧擋獛搨 彀 178 贄耍赴泚鏼扯z戍赳睦愩柰詻胃 鞮養鄧鶔w]肄霿詰虪譇柤肄霿耶 擔譇柤氡鑶蚽飛ㄜA澱鏺儱氡鑶 QZSNDPR 祺巰耍虋遮彀 QDPR 鄧鴉戍定擔耶 嗀肄霿戍鶔耍欏僝巷囓酀赴OS/400 泚鏼扯z V4R3赳耶 s柱柰媴赴ъ碉椻]肄 AS/400 柰 DB2 DataPropagator 戍揅壧赳( 178 贄)胃 愩刖廅長囍皪戍蘧砯靲肄v佐戍齶ガ耍屑鞮養醨w]戍瞉殊O襏雚 30 柱閭 120耶 鞮養彀臠歃跌灥泚鏼礤絛鶔泚鏼耍詰鞮養媥豜U媴獛鶔詻嗀彀氡鑶豜祄鬾戍 泚鏼戍w]瞉殊O襏胃 1. 熪鋇柰媴銻耍薿 QGPL/QBATCHI 鄧擔s戍ю顢旨麩胃 CRTDUPOBJ OBJ(QBATCH) FROMLIB(QGPL) OBJTYPE(*CLS) TOLIB(QDPR) NEWOBJ(QZSNDPR) 2. 鶔稒sю顢戍瞉殊O襏 (蜙p耍鶔 300 炕): CHGCLS CLS(QDPR/QZSNDPR) DFTWAIT(300) 3. 顟擋sю顢鶔s氡鑶蚽飛 QDPR/QZSNDPR 洇戍尚熡到胃 CHGRTGE SBSD(QDPR/QZSNDPR) SEQNBR(9999) CLS(QDPR/QZSNDPR) 194 贄戍赴媥酓R蘧眐矩鼪搌齗膣鎈搨赳睦枵o譇魅氡胃 礔鞮齁飁 蘧眐矩鼪搌齗膣鎈搨耍巷俊肄擋腺僬咻〝戍詻嗀蘧眐矩芥嗀 DLTRCV(*NO)耶 彀 195 贄耍ADDEXITPGM 銻囓睦伸柰媴詻胃 ADDEXITPGM EXITPNT(QIBM_QJO_DLT_JRNRCV) FORMAT(DRCV0100) PGM(QDPR/QZSNDREP) PGMNBR(*LOW) CRTEXITPNT(*NO) PGMDTA(65535 10 QSYS) ------------------------------------------------------------------------ 12.11 10 OS/390 戍跌灥獛搨碉矧擋獛搨 彀 10 珫鶔s柰媴沮蠮胃 12.11.1 DB2 DataPropagator for OS/390 戍樺讘麩 鞮澱鏺爩 DB2 for OS/390 次劑 5耑DB2 for OS/390 次劑 6 詰 DB2 for OS/390 次劑 7耍浂鸉 DB2 DataPropagator for OS/390 次劑 7 (V7)耶 12.11.2 OS/390 柼戍 UNICODE 碉 ASCII 哀俄妄 DB2 DataPropagator for OS/390 V7 儭 UNICODE 碉 ASCII 哀俄妄耶 礔繐礤熪 s戍哀俄妄耍鞮澱鏺爩 DB2 for OS/390 V7耍 椴遮澱鏺韥擔詰黈 DB2 DataPropagator 僬垠B癸瓬嚭式耍 纈謰醨|彀柰媴嵧躒珫祗腦耶L耍饓 鞮鑭嗀摃哀俄妄耍鞮{酨戍 纋柞蜤N媥 DB2 DataPropagator for OS/390 V7耶 12.11.2.1 哀俄妄 礔鞮戍僬垠BCD 瓬癸式媥蛌縥P戍哀俄妄耍鞮養鄧醨纋柞蓔浀材黈茫 臡蹢祽C耶 式哀俄妄耍巷芋駽柜 CCSID W屑胃 式繾珫戍戠祅 養鄧擋 ASCII耑UNICODE 詰 EBCDIC 鄎s俄耶 式繾洇戍詻嗀式澱鏺媥蛌 嵥戍哀俄妄耶SQL 闉z搨珫詻嗀式戍哀俄妄澱鏺虎嵥耶嵥耍鞮彀照瓬膣幏 珫詻擋戍曄郎〝澱鏺虎嵥戍哀俄妄耶 礔冀芋駽柜 CCSID W屑耍屑彀s膣詰鸉齔繾耍DB2 醨|灝鵃HW虋廌 SQLCODE -873耶謦式睦欑板 ASCII 詰 UNICODE耍鞮戍遭/雚歧呃椴肄耶 蕶顢廇耍” 式戍哀俄妄耍巷芋駽oW屑胃 * DB2 for OS/390 柼戍僬姜袛癸式養鄧板 EBCDIC耑ASCII 詰 UNICODE耶 擂 謰養鄧彀媥袛摃儭戍 DBMS (DB2 鑶媴耍詰爩嗀 DataJoiner 戍唏 DB2 鑶 媴) 珫虎嵥詰嵥哀俄妄戍式祌繾盎耶 * 彀 DB2 for OS/390 僬待再齗柼耍虎嵥再齗柼詻嗀 CD耑UOW耑熡韄瓬飁嚭 式澱鏺媥蛌縥P戍哀俄妄耶長俊奚柜癚詫耍巷髕澱腦俊肄哀俄妄耶 * 虎嵥嚭再齗柼戍詻嗀嚭式 (ASN.IBMSNAP_SUBS_xxxx) 澱鏺媥蛌縥P戍 哀俄妄耶 * 擂嚭式養媥袛摃哀俄妄胚L耍 ASN.IBMSNAP_CRITSEC 式奚 蟂 EBCDIC耶 12.11.2.2 ]肄哀俄妄 礔繐式肄譂’妨s俄妄耍巷擋僣擁式戍 SQL胃 * 鄧譂’妨s俄妄擔s戍僬姜M癸式耍 詰鶔{酨癸瓬僬咻〝戍哀 俄妄耶鞮鶔{酨式戍哀俄妄祌容欘赴跌灥獛搨赳碉赴矧擋獛 搨赳耍潒鄧顠礤鼭搨鼖韥赴跌灥獛搨赳虋薿s鼖韥赴矧擋獛搨赳耶鶔{酨 式戍哀俄妄胃 1. 媥 Reorg 洢擋獛搨盎{酨戍式耶 2. 鵛鞥{酨戍式耶 3. 肄s哀俄妄僦悅式耶 4. 媥 Load 洢擋獛搨醨絛枵s式珫耶 嗀 Load 碉 Reorg 洢擋獛搨戍欏僝鬞耍巷囓酀 DB2 Universal Database for OS/390 Utility Guide and Reference耶 * 鄧譂’妨s俄妄擔s嚭式詰{酨式戍哀俄妄耶 DPCNTL.MVS 照衣腺 DB2 for OS/390 戍 sqllib\samples\repl 珫耍 擂霄鰗 擔嚭式戍譇 CREATE TABLE 闉z搨耶腺澱鏺板 ASCII 詰 UNICODE 戍式 椴躨苗蜙p ASN.IBMSNAP_REGISTER 碉 ASN.IBMSNAP_PRUNCNTL英耍 巷閭枵 CCSID ASCII 詰 CCSID UNICODE 戠耍愩柰媴削蓁蒝耶 CREATE TABLE ASN.IBMSNAP_PRUNCNTL ( TARGET_SERVER CHAR( 18) NOT NULL, TARGET_OWNER CHAR( 18) NOT NULL, TARGET_TABLE CHAR( 18) NOT NULL, SYNCHTIME TIMESTAMP, SYNCHPOINT CHAR( 10) FOR BIT DATA, SOURCE_OWNER CHAR( 18) NOT NULL, SOURCE_TABLE CHAR( 18) NOT NULL, SOURCE_VIEW_QUAL SMALLINT NOT NULL, APPLY_QUAL CHAR( 18) NOT NULL, SET_NAME CHAR( 18) NOT NULL, CNTL_SERVER CHAR( 18) NOT NULL, TARGET_STRUCTURE SMALLINT NOT NULL, CNTL_ALIAS CHAR( 8) ) CCSID UNICODE DATA CAPTURE CHANGES IN TSSNAP02; 礔繐{酨戍嚭式碉 CD 式耍巷媥 Reorg 碉 Load 洢擋獛搨耶 * &擔s纋柞僬姜袑w齔纋柞]肄耍巷扯z泚爩詻擁戍 SQL 耍 鄧 肄譂’妨s俄妄耶殛 SQL 爩嗀譇 CREATE TABLE 闉z搨耍 養擋閞 顢黳纋柞僬峙袑w齔纋柞]肄擔 CD 碉癸式耶 巷彀譂≡鑅閭枵 戠 CCSID ASCII 詰 CCSID UNICODE耶 蜙p胃 CREATE TABLE user1.cdtable1 ( employee_name varchar, employee_age decimal ) CCSID UNICODE; DB2 UDB for OS/390 SQL Reference 霄鰗 CCSID 戍欏僝鬞耶 ------------------------------------------------------------------------ 12.12 11 UNIX 樹鬧戍跌灥獛搨碉矧擋獛搨 12.12.1 彀 UNIX 碉 Windows 柼]肄赴跌灥獛搨赳碉赴矧擋獛搨赳戍 礔鞮媥釸w]戠俄贄襏鄧鴉戍戠俄贄擔僬拼定耍巷醨 DB2CODEPAGE ] 長欑戠俄贄耶 嗀]肄 DB2CODEPAGE 祌容灥隳戠俄贄襏戍欏僝鬞耍巷囓酀 DB2 Administration Guide耶赴跌灥獛搨赳澱鏺彀烈定 (跌灥獛搨椻珫跌灥) 虎嵥戍戠俄贄珫鸉耶DB2 雚赴跌灥獛搨赳鸉詻彀戍鏼擋珫裺隳赴跌灥獛搨赳 戠俄贄耶礔冀]肄 DB2CODEPAGE耍DB2 |雚鏼~鑶釱隳戠俄贄襏耶 礔鞮擔定 板媥釸w]戠俄贄耍屑簰擁椻鏼~鑶蛈攻崍赴跌灥獛搨赳椴躨板儘俊襏耶 ------------------------------------------------------------------------ 12.13 14 式膣呃 彀 339 贄耍K閭柰媴魅氡襏長 2 戍 STATUS 托祗腦胃 愩刖鞮媥豜杉 CCD 式耍遮彀矧擋鷲式戍扛你托珫隳 "2" 襏耍 巷赴 8 胃齶ガ顣肄赳囓酯u齶ガ胃鑭嗀纋柞鶔戍餼如柰耍矧擋獛搨灉歈鷮胚 矧擋鷲式ず STATUS=2赳耶 ------------------------------------------------------------------------ 12.14 15 跌灥獛搨碉矧擋獛搨鬞昔 鬞昔 ASN0017E 睦長胃 ASN0017E 赴跌灥獛搨赳熪{Y薿戍洇郃砷耍潲妄熪鋇儘俊戍砷鬞昔耶 鎈搨巰投長 routine耶廌剽俄長 return_code耶 s柱柰媴鬞昔 ASN1027S胃 ASN1027S 肄眈愫毠悚旨麩 (LOB) 托耶砷俄長 耶 祗腦胃肄齔纋柞]肄歈肄柅眈愫毠悚旨麩 (BLOB耑CLOB 詰 DBCLOB) 托耶養 委\戍瘐j托長 10耶 媥蛈睚^睦胃椻肄齔纋柞]肄歈颳L愫戍毠悚旨麩托耶 鬞昔 ASN1048E 睦愩柰詻胃 ASN1048E 赴矧擋獛搨赳駽戍鸉噬韖耶欏僝耍巷囓酀矧擋鷲式胃 祗腦胃赴矧擋獛搨赳駽噬韖耶彀鬞昔珫耍 肄霿 耶 媥蛈睚^睦胃照泥柏鷲式戍 APPERRM 耍 鄧俊肄赴矧擋獛搨赳駽戍噬韖 廅耶 ------------------------------------------------------------------------ 12.15 衣到 A. 雚睦擋獛搨洇鼖韥跌灥獛搨碉矧擋獛搨 彀 399 贄耍砷鋇{彀削蜤`搨戍祗腦洇耍欑削蜤`搨鼖韥跌灥獛搨碉矧擋獛搨耍 椷板耍削膃抖r俄板儘俊戍耶削膃妙鞍陌P矧擋獛搨囓嗀耍潒祗腦式擂碉 跌灥獛搨囓嗀耶 鞮養鄧椻鄧柰到隳矧擋獛搨碉跌灥獛搨戍削蓔軝U椻戍 make 胃 For NT - sqllib\samples\repl For UNIX - sqllib/samples/repl ------------------------------------------------------------------------ System Monitor Guide and Reference(潲珫次) ------------------------------------------------------------------------ 13.1 db2ConvMonStream In the Usage Notes, the structure for the snapshot variable datastream type SQLM_ELM_SUBSECTION should be sqlm_subsection. ------------------------------------------------------------------------ Troubleshooting Guide(潲珫次) ------------------------------------------------------------------------ 14.1 Starting DB2 on Windows 95, Windows 98, and Windows ME When the User Is Not Logged On For a db2start command to be successful in a Windows 95, Windows 98, or Windows Millennium Edition (ME) environment, you must either: * Log on using the Windows logon window or the Microsoft Networking logon window * Issue the db2logon command (see note (NOTE_1) for information about the db2logon command). In addition, the user ID that is specified either during the logon or for the db2logon command must meet DB2's requirements (see note (NOTE2)). When the db2start command starts, it first checks to see if a user is logged on. If a user is logged on, the db2start command uses that user's ID. If a user is not logged on, the db2start command checks whether a db2logon command has been run, and, if so, the db2start command uses the user ID that was specified for the db2logon command. If the db2start command cannot find a valid user ID, the command terminates. During the installation of DB2 Universal Database Version 7 on Windows 95, Windows 98, and Windows ME, the installation software, by default, adds a shortcut to the Startup folder that runs the db2start command when the system is booted (see note (NOTE_1) for more information). If the user of the system has neither logged on nor issued the db2logon command, the db2start command will terminate. If you or your users do not normally log on to Windows or to a network, you can hide the requirement to issue the db2logon command before a db2start command by running commands from a batch file as follows: 1. Create a batch file that issues the db2logon command followed by the db2start.exe command. For example: @echo off db2logon db2local /p:password db2start cls exit 2. Name the batch file db2start.bat, and store it in the /bin directory that is under the drive and path where you installed DB2. You store the batch file in this location to ensure that the operating system can find the path to the batch file. The drive and path where DB2 is installed is stored in the DB2 registry variable DB2PATH. To find the drive and path where you installed DB2, issue the following command: db2set -g db2path Assume that the db2set command returns the value c:\sqllib. In this situation, you would store the batch file as follows: c:\sqllib\bin\db2start.bat 3. To start DB2 when the system is booted, you should run the batch file from a shortcut in the Startup folder. You have two options: o Modify the shortcut that is created by the DB2 installation program to run the batch file instead of db2start.exe. In the preceding example, the shortcut would now run the db2start.bat batch file. The shortcut that is created by DB2 installation program is called DB2 - DB2.lnk, and is located in c:\WINDOWS\Start Menu\Programs\Start\DB2 - DB2.lnk on most systems. o Add your own shortcut to run the batch file, and delete the shortcut that is added by the DB2 installation program. Use the following command to delete the DB2 shortcut: del "C:\WINDOWS\Start Menu\Programs\Startup\DB2 - DB2.lnk" If you decide to use your own shortcut, you should set the close on exit attribute for the shortcut. If you do not set this attribute, the DOS command prompt is left in the task bar even after the db2start command has successfully completed. To prevent the DOS window from being opened during the db2start process, you can create this shortcut (and the DOS window it runs in) set to run minimized. Note: As an alternative to starting DB2 during the boot of the system, DB2 can be started prior to the running of any application that uses DB2. See note (NOTE5) for details. If you use a batch file to issue the db2logon command before the db2start command is run, and your users occasionally log on, the db2start command will continue to work, the only difference being that DB2 will use the user ID of the logged on user. See note (NOTE_1) for additional details. Note: 1. The db2logon command simulates a user logon. The format of the db2logon command is: db2logon userid /p:password The user ID that is specified for the command must meet the DB2 naming requirements (see note (NOTE2) for more information). If the command is issued without a user ID and password, a window opens to prompt the user for the user ID and password. If the only parameter provided is a user ID, the user is not prompted for a password; under certain conditions a password is required, as described below. The user ID and password values that are set by the db2logon command are only used if the user did not log on using either the Windows logon window or the Microsoft Networking logon window. If the user has logged on, and a db2logon command has been issued, the user ID from the db2logon command is used for all DB2 actions, but the password specified on the db2logon command is ignored When the user has not logged on using the Windows logon window or the Microsoft Networking logon window, the user ID and password that are provided through the db2logon command are used as follows: o The db2start command uses the user ID when it starts, and does not require a password. o In the absence of a high-level qualifier for actions like creating a table, the user ID is used as the high-level qualifier. For example: 1. If you issue the following: db2logon db2local 2. Then issue the following: create table tab1 The table is created with a high-level qualifier as db2local.tab1. You should use a user ID that is equal to the schema name of your tables and other objects. o When the system acts as client to a server, and the user issues a CONNECT statement without a user ID and password (for example, CONNECT TO TEST) and authentication is set to server, the user ID and password from the db2logon command are used to validate the user at the remote server. If the user connects with an explicit user ID and password (for example, CONNECT TO TEST USER userID USING password), the values that are specified for the CONNECT statement are used. 2. In Version 7, the user ID that is either used to log on or specified for the db2logon command must conform to the following DB2 requirements: o It cannot be any of the following: USERS, ADMINS, GUESTS, PUBLIC, LOCAL, or any SQL reserved word that is listed in the SQL Reference. o It cannot begin with: SQL, SYS or IBM o Characters can include: + A through Z (Windows 95, Windows 98, and Windows ME support case-sensitive user IDs) + 0 through 9 + @, #, or $ 3. You can prevent the creation of the db2start shortcut in the Startup folder during a customized interactive installation, or if you are performing a response file installation and specify the DB2.AUTOSTART=NO option. If you use these options, there is no db2start shortcut in the Startup folder, and you must add your own shortcut to run the db2start.bat file. 4. On Windows 98 and Windows ME an option is available that you can use to specify a user ID that is always logged on when Windows 98 or Windows ME is started. In this situation, the Windows logon window will not appear. If you use this option, a user is logged on and the db2start command will succeed if the user ID meets DB2 requirements (see note (NOTE2) for details). If you do not use this option, the user will always be presented with a logon window. If the user cancels out of this window without logging on, the db2start command will fail unless the db2logon command was previously issued, or invoked from the batch file, as described above. 5. If you do not start DB2 during a system boot, DB2 can be started by an application. You can run the db2start.bat file as part of the initialization of applications that use DB2. Using this method, DB2 will only be started when the application that will use it is started. When the user exits the application, a db2stop command can be issued to stop DB2. Your business applications can start DB2 in this way, if DB2 is not started during the system boot. To use the DB2 Synchronizer application or call the synchronization APIs from your application, DB2 must be started if the scripts that are download for execution contain commands that operate either against a local instance or a local database. These commands can be in database scripts, instance scripts, or embedded in operating system (OS) scripts. If an OS script does not contain Command Line Processor commands or DB2 APIs that use an instance or a database, it can be run without DB2 being started. Because it may be difficult to tell in advance what commands will be run from your scripts during the synchronization process, DB2 should normally be started before synchronization begins. If you are calling either the db2sync command or the synchronization APIs from your application, you would start DB2 during the initialization of your application. If your users will be using the DB2 Synchronizer shortcut in the DB2 for Windows folder to start synchronization, the DB2 Synchronization shortcut must be modified to run a db2sync.bat file. The batch file should contain the following commands to ensure that DB2 is running before synchronization begins: @echo off db2start.bat db2sync.exe db2stop.exe cls exit In this example, it is assumed that the db2start.bat file invokes the db2logon and db2start commands as described above. If you decide to start DB2 when the application starts, ensure that the installation of DB2 does not add a shortcut to the Startup folder to start DB2. See note (NOTE3) for details. ------------------------------------------------------------------------ 14.2 Chapter 2. Troubleshooting the DB2 Universal Database Server Under the "Locking and Deadlocks" section, under the "Applications Slow or Appear to Hang" subsection, change the description under "Lock waits or deadlocks are not caused by next key locking" to : Next key locking guarantees Repeatable Read (RR) isolation level by automatically locking the next key for all INSERT and DELETE statements and the next higher key value above the result set for SELECT statements. For UPDATE statements that alter key parts of an index, the original index key is deleted and the new key value is inserted. Next key locking is done on both the key insertion and key deletion. It is required to guarantee ANSI and SQL92 standard RR, and is the DB2 default. Examine snapshot information for the application. If the problem appears to be with next key locking, you can set the DB2_RR_TO_RS option on if none of your applications rely on Repeatable Read (RR) behavior and it is acceptable for scans to skip over uncommitted deletes. When DB2_RR_TO_RS is on, RR behavior cannot be guaranteed for scans on user tables because next key locking is not done during index key insertion and deletion. Catalog tables are not affected by this option. The other change in behavior is that with DB2_RR_TO_RS on, scans will skip over rows that have been deleted but not committed, even though the row may have qualified for the scan. For example, consider the scenario where transaction A deletes the row with column1=10 and transaction B does a scan where column1>8 and column1<12. With DB2_RR_TO_RS off, transaction B will wait for transaction A to commit or rollback. If it rolls back, the row with column1=10 will be included in the result set of transaction B's query. With DB2_RR_TO_RS on, transaction B will not wait for transaction A to commit or rollback. It will immediately receive query results that do not include the deleted row. Do not use this option if you require ANSI and SQL92 standard RR or if you do not want scans to skip uncommitted deletes. ------------------------------------------------------------------------ 彀 64 祅戍樹鬧柼媥 DB2 Universal Database ------------------------------------------------------------------------ 15.1 5 歧呃 15.1.1 LOCKLIST 柰媴鬞睦欑閭赴式 2赳耶 囓 祌容戍柼貙 {戍柼貙 LOCKLIST 60000 524288 15.1.2 shmsys:shminfo_shmmax 彀 64 祅 Solaris 鏼~鑶豜W戍 DB2 媥蛈瑀茫繐柱閭 /etc/system 珫 "shmsys:shminfo_shmmax" 戍襏耍 鄧黂鑅毠戍定媷擋韄鯬摮C DB2 for UNIX t枵 岩珫囓養]長 "鼭齗珫 RAM 戍 90%耍長祅"耶 o醳 腺 64 祅杷柜皇嗀耶 潒椴耍彀 DB2 for UNIX t枵 岩珫戍柰媴嗀齶ガ胃 腺嗀櫹L 4 GB RAM 戍 32 祅鑶軝僓 (彀 Solaris 鏼~鑶豜W琛媷睚h養 64 GB)耍 愩刖媥蛈碖N shmmax 襏]肄長柜譇毠腺 4 GB 戍戠耍 虋遮板媥 32 祅戍眃耍椴眃骷| 表戠戍 32 祅耍 嗀|y歈 shmmax 戍襏唏鎈戍洟耶 ------------------------------------------------------------------------ 15.2 6 貙 容彀 64 祅戍鏼~鑶豜W鑭嗀 LDAP 儭耶 32 祅瓬 64 祅戍定潲妄擔彀虎嵥戍尚柼耶 蜙p耍愩刖嗀柜譇 32 祅 戍定腺 耍屑胃 db2 create db on 愩刖板雚 64 祅戍蜪o鋇銻耍|隳o皇戍砷鬞昔 "SQL10004C 酨灥定 到熪擁 I/O 砷耶" ------------------------------------------------------------------------ XML Extender Administration and Programming(潲珫次) Release Notes for the IBM DB2 XML Extender can be found on the DB2 XML Web site: http://www-4.ibm.com/software/data/db2/extenders/xmlext/library.html ------------------------------------------------------------------------ MQSeries 劑躒祗腦愩摃媥 DB2 瓬 MQSeries 鉈呃膣幏鬞烈定酨灥戍睦擋獛搨耶 劑 躒戍澂貂彀柜鑶媴戍閱耍烈赴媥蛈瑏w霿戍閱 (UDF)赳ю耍擂養洄彀 DB2 Universal Database 次劑 7.2 珫擋詫廇鼖擋耶 媥釤o劑戍閱耍養養鄧 儭毠削戍睦擋獛搨耍雚媽搨麩q何暖耶 嗀暖睦擋獛搨戍欏僝鬞耍巷囓酀22.15, MQ Series 烈赴暖珫眃赳戍 鬷幏耶 ------------------------------------------------------------------------ 17.1 揅壧烈歧呃 DB2 MQSeries Function 劑躒祗腦愩摃歧呃 DB2 蒝H媥 DB2 MQSeries Function耶 骷繐鞮歈閱蘠歈柰媴 獛耍餪養鄧雚 SQL 媥 DB2 MQSeries Function耶 腺o閱戍祗腦耍巷 赴次劑圳N醳赳戍 SQL Reference 柜躒耶 腺衣閭鬞耍霄服稒s戍麩耑 瓬鍻Z耍巷 http://www.ibm.com/software/data/integration/MQSeries耶 歧呃烈鼖擋 DB2 MQSeries Function 戍劑獛長胃 1. 揅壧 MQSeries耶 2. 揅壧 MQSeries AMI耶 3. 鼖擋烈歧呃 DB2 MQSeries Function 殛鴉耍礔繐媥 DB2 MQSeries Function 虪戍熪闟/繘酀閱耍鞮柛澱鏺揅壧 MQSeries Integrator 詰 MQSeries Publish/Subscribe Function耶 腺 MQSeries Integrator 戍鬞耍巷 http://www.ibm.com/software/ts/mqseries/integrator耶腺 MQSeries Publish/Subscribe 閱戍鬞耍巷ю 3 柰戍 http://www.ibm.com/software/ts/mqseries/txppacs耶 17.1.1 揅壧 MQSeries 柜譇纙J巷俊肄 MQSeries 次劑 5.2 洄揅壧腺鞮戍 DB2 再齗柼耶礔鞮洄揅壧殛 次劑戍 MQSeries耍巷灛柰柜纙J赴揅壧 MQSeriesy AMI赳耶 DB2 次劑 7.2 霄服 DB2 媥蛈 MQSeries 再齗祌劑耶 揅壧 MQSeries 詰{酨戍 MQSeries 揅壧 祌蕶肄樹鬧銻耍養彀蕶肄戍樹鬧赴t枵赳岩y珫耍彀 http://www.ibm.com/software/ts/mqseries/library/manuals耶巷俊肄♂z灁揅壧 獛耍繐]肄w]媴扯z獛搨耶 17.1.2 揅壧 MQSeries AMI 柰譇纙J板揅壧 MQSeries 睦擋獛搨鬞祊貘 (AMI)耶 o板 MQSeries 獛搨]繣祊貘 戍巰耍擂虪扯z瓬獛搨]繣柜譇M郎杞j塒耶 DB2 MQSeries Function 茫繐殛 祊貘戍揅壧耶礔 MQSeries AMI 洄揅壧彀鞮戍 DB2 再齗柼耍巷灛柰柜纙J 赴鼖 擋 DB2 MQSeries Function赳耶礔腮冀揅壧 MQSeries AMI耍屑鞮養鄧雚 DB2 7.2 虪戍揅壧和壧n靲w壧耍詰雚 MQSeries 儭和壧n霠 http://www.ibm.com/software/ts/mqseries/txppacs耍柰 AMI 劑耶 鞮養鄧彀 赴ю 3 - 恙巰赳柰 AMI耶長柅堉鱌耍 纈謰虪鞮 DB2 戍 MQSeries AMI 祌劑耶殛彀 sqllib/cfg 到珫耶殛戍巰投板鏼~鑶蛌 禂甇G AIX 次劑 4.3 瓬鶔s次劑 ma0f_ax.tar.Z HP-UX ma0f_hp.tar.Z Solaris 鏼~ ma0f_sol7.tar.Z Windows 32 祅 ma0f_nt.zip 芋駽 AMI Readme 珫媽翷戍儘鎈 AMI 揅壧獛耍欑彀琳揅壧杯珫耶 17.1.3 鼖擋 DB2 MQSeries Function 彀殛纙J齔繾耍鞮醨歧呃虋鼖擋 DB2 MQSeries Function 戍定耶 enable_MQFunctions 洢擋獛搨板柜譇泉詫戍銻耍|樺照泥洄]肄譂’ MQSeries 蒤A潒揅壧虋擔 DB2 MQSeries 閱戍w]歧呃耍鄧o閱鼖擋肄戍 定耍虋俊砸歧呃B鏼儘鎈耶 1. 黳 Windows NT 詰 Windows 2000耍巷纙J 5耶 2. 彀 UNIX ]肄顪摮G礔鞮彀 UNIX 柼鼖擋o閱耍鞮澱鏺樺醨 DB2 蜰嗀 舌 (q鎈板 de2inst1) 瓬烈j塒 UDF 虎戍媥蛈 ID (q鎈板 db2fenc1)耍 s柱 MQSeries 顪 mqm 珫耶 DB2 閱茫繐殛]肄鄧酨灥 MQSeries耶 3. 彀 UNIX 柼]肄 DB2 胃醨 AMT_DATA_PATH s柱 DB2 渙鬙 戍媴珫耶 鞮養鄧哀 $INSTHOME/sqllib/profile.env耍醨 AMT_DATA_PATH s柱 DB2ENVLIST耶柛養媥 db2set 銻耶 4. 彀 UNIX 柼耍薿s鼖韥定蒤G礔繐鼒鶔擁耍澱鏺薿s鼖韥 定蒤C 5. 彀 UNIX 柼醨到鶔長 $INSTHOME/sqllib/cfg耍彀 Windows 柼醨到鶔長 %DB2PATH%/cfg耶 6. 鸉銻 enable_MQFunctions 鄧歧呃虋鼖擋 DB2 MQSeries 閱戍定耶巷 囓酀17.6, enable_MQFunctions耍鄧灥隳殛銻戍蘠鬷祗腦耶柰媴虪柜柜 削蒤C 彀歈閱蘠歈祌耍醨鼖擋肄戍定虋鵃灚歧呃耶 7. 礔繐媥蚼u祺銻Bz齗赳鵃灚o閱耍巷彀鞮s鼪洄鼖擋戍定耍熪 鋇柰媴銻胃 values DB2MQ.MQSEND('a test') values DB2MQ.MQRECEIVE() 柜譇闉z搨醨鷫鬞昔 "a test" DB2MQ_DEFAULT_Q 媴耍椴柫譇屑醨 鼪搌廌酯C : 鸉 enable_MQFunctions 戍膣刖耍醨擔w] MQSeries 蒤C醨擔 MQSeries 媴扯z獛搨 DB2MQ_DEFAULT_MQM 瓬w]媴 DB2MQ_DEFAULT_Q耶礔 amt.xml耑amthost.xml 瓬 amt.dtd 洄酨彀腺 AMT_DATA_PATH 嵢戍 到耍醨擔o耶 礔 amthost.xml 酨彀耍遮霄鰗 connectionDB2MQ 戍肄霿耍屑|醨s柱嗀譂→鬞戍珫耶鄏孚祌 劑醨Q暖酨長 DB2MQSAVE.amthost.xml耶 ------------------------------------------------------------------------ 17.2 MQSeries 鬞皇搨 DB2 MQSeries 閱儭柧鬞研悚胃堶B熪闟/繘酀 (p/s) 瓬繐臡/廌剽 (r/r)耶 鄧悹僳鷫戍鬞昔|鷫柜戍廇耍遮w齔廌剽耶 彀 p/s 研悚珫耍柜詰 愫譇洢儐舌醨鬞昔鷫洢闟再髕獛搨耍牁鷫鬞昔柜詰愫譇擋耶 繐臡/廌剽烈 堛縥耍椷鷫舌w齔鼪搌廌睦耶 ------------------------------------------------------------------------ 17.3 鬞昔膣呃 MQSeries 劑蟴|繐臡詰儭摃鷫戍鬞昔祌蕶屆膣呃耶 擂恙愩 MQSeries Integrator (MQSI)耍餪|虪鄧 C耑COBOL 詰 XML 戠灉歈 戍鬞昔祌儭耶 彀 MQSI 珫戍膣呃鬞昔板墨鬞昔暖酨定肄霿耶XML 鬞昔q鎈嗀柜譇椻 祗腦戍鬞昔膣呃耍遮養柛zL暖酨定鄑噠z耶鬞昔柛養板鑭嗀膣呃戍耍茫繐 擋舌獛搨俄僦吐詰呃鬞昔洇委耶oю鬞昔較較板蘠曄戍膣呃耍柛餪板祗耍擂謰 媥軝祅槷鑅詰禁肄戍肄襶閞睫j鬞昔珫戍耶赴MQSeries 茨饎F赳虪 o蘠曄膣呃戍鬞昔祌儭耶 zL欣s閱耍醨 XML 鬞昔儭虪聤 DB2 XML 趁銬祅耶 ------------------------------------------------------------------------ 17.4 MQSeries 閱[ MQSeries 閱鐖墨 DB2 UDB 次劑 7.2 虪耍養 SQL 闉z搨霄服鬞鏼~耶 o式 殛儭養媥袑ⅥH摃儭砰躨紂柞戍睦擋獛搨耍蜙p耍媥袛摃定祊貘戍 C 耑Java耑SQL耶柰媴ず戍詻嗀削裷兼b SQL 珫耶 養鄧擋詻嗀癸搨耍雚醋獛搨 ]繣砰躨媥軝 SQL耶 柼翷戍詻嗀 MQSeries 鬞皇搨洄儭耶 嗀 MQSeries 閱戍欏僝鬞耍巷囓酀赴次劑圳N醳赳戍 SQL Reference 柜躒耶 彀劑歧呃珫耍MQSeries 再齗板彀烈 DB2 柜鱌戍定再齗鼭齗珫耶 MQSeries 閱揅壧彀 DB2柼耍虋虪 MQSeries 再齗戍酨灥v貙耶 DB2 雚膼 養彀養酨灥 DB2 Server 戍摃鼭齗柼耶 愫譇雚膼鷑i嵥zL定酨灥 MQSeries 閱耶 zL虪戍閱耍DB2 雚膼鷑i彀 SQL 闉z搨洇鸉鬞鏼~耶 o鬞鏼~養 DB2 睦擋獛搨彀擂謰祌繾q埔耍詰烈醋 MQSeries 睦擋獛搨q 埔耶 enable_MQFunctions 銻板擋僔蒝 MQSeries 閱戍 DB2 定耶 擂醨椻韥擔 媽搨w]歧呃耍雚膼鷛擋獛搨|媥釬鄋[呃耍茫繐扯z韥鏼耶 礔繐灥隳祗腦耍巷 囓酀 enable_MQFunctions 瓬 disable_MQFunctions耶 w]歧呃虪睦擋獛搨]繣宗 柜譇t鼖韥戍妄耍瓬柜譇鶔媽戍礤熪祊貘耶 礔嗀茫繐耍養柱閭歧呃醋戍閱 耶 削 1胃礔繐媥釸w]歧呃僳鷫媽搨鬞昔耍SQL 闉z搨愩柰胃 VALUES DB2MQ.MQSEND('simple message') o|醨鬞昔 simple message 鷫 MQSeries 媴扯z獛搨瓬w]歧呃肄戍 媴耶 MQSeries 戍赴睦擋獛搨鬞祊貘 (AMI)赳耍彀鬞狎韥瓬肄蠽狎韥戍鷫搨祌 肄霿祌繾耍虪M郎杞j塒耶o肄霿奚蟂彀鴉風x酨定珫耍虋媥 AMI 扯z泚 爩鄑噠z耶o養 AMI 睦擋獛搨委熪姆虋@耶DB2 虪戍 MQSeries 閱板鄧 AMI MQSeries 祊貘長祼擳CAMI 儭鴉酊[呃戍媥蚼A欑投長赴AMI 暖酨定赳耍 鄧暖酨歧呃鬞耶 w]歧呃霄服 MQSeries AMI 暖酨定歧呃耍鄧媥 DB2耶 MQSeries AMI 戍譇遭繐鼰楹A再髕獛搨貂瓬屑耍Q祝 DB2 MQSeries 閱 珫耶 再髕獛搨貂板閮貂耍饓鬞昔養鷫詰鼪搌戍貂耶 彀 AMI 暖酨定珫耍臠柜 譇再髕獛搨貂板鄧 MQSeries 媴巰投瓬媴扯z獛搨鉊w霿耶 屑肄霿再髕獛搨 醳戍恙耍睦媥袑X肄戍鬞鏼~耶 遭繐戍再髕獛搨恙霄服鬞昔暉樺鐀瓬 詫耶 虪w]再髕獛搨貂瓬屑肄霿耍遮養墨熪姆舌媥蚼A鄧灁柜纙媽睦擋獛 搨耶 削 1 養鄧柰媴搨薿柞耍鄧腦俊廇肄w]再髕獛搨貂瓬屑巰投胃 削 2胃 VALUES DB2MQ.MQSEND('DB2.DEFAULT.SERVICE', 'DB2.DEFAULT.POLICY', 'simple message') 媴養墨再齗戍柜詰愫譇睦擋獛搨再髕耍椴媴瓬睦擋獛搨饓鎈鏮腺欑再齗 珫耶 彀\愫歧呃珫耍愫薿媴醨Q肄霿長儭嵥戍睦擋獛搨瓬戍耶 廅長o譇z 墨耍彀灁 MQSeries 繐臡耍鑌鎈肄霿嵥戍再髕獛搨貂板薿繐戍耶 彀柰媴削 珫嗀祗腦胃 削 3胃 VALUES DB2MQ.MQSEND('ODS_Input', 'simple message') : 彀殛削蓔洐A冀肄屑耍椷醨媥釸w]屑耶 17.4.1 貙 MQSeries 虪鬞昔鏼~瓬定鏼~戍柮耍鄧彀柜泚鏼祅珫膣幏耍鏼長Q奚@ 耶 Unix 瓬 Windows 柼戍 MQSeries 閱劑儭殛閱耶 ↗媥酚鷫詰鼪搌閱耍柜譇鬞昔戍瘐j板 4000 譇戠祅耶 o柛板媥 MQPublish 閞姥長T昔戍瘐j鬞昔毠洟耶 17.4.2 砷俄 鞮養彀赴MQSeries 睦擋獛搨鬞祊貘銳赳戍衣到 B 珫耍 MQSeries 閱廌 戍廌剽俄耶 ------------------------------------------------------------------------ 17.5 擋妄髕銳 MQSeries Function 養媥袑Aj削戍髕銳耶 劑躒醨頀柜碙鐉M戍髕耍霄 服赴劑鬞赳耑赴睦擋獛搨s鼪赳瓬赴洢儐赳耶 17.5.1 劑鬞 ☆蜙定睦擋獛搨s鼪虎嵥戍 DB2 再齗耍|熪擁 MQSeries DB2 閱戍鬞 昔祌稘劑灉搨耶雚膼鷑i板定再齗戍劑抑詰牁燽彀蓔洐C 彀媽搨髕削蓔洐A雚膼 A 碰駒 MQSEND 閱耍鷫媥蛈瑏w霿w]再髕獛搨 鑅耶 MQSeries 閱廈|彀定再齗戍 DB2 洇鸉耶 獠耍雚膼 B 碰駒 MQRECEIVE 閱耍齁w]再髕獛搨肄霿戍媴珫祌睚蹢O韄到戍鬞昔耍虋醨 廌雚膼鱄C 嵥皇戍耍鸉殛鏼~戍 MQSeries 閱墨 DB2 鸉耶 定雚膼鷑i鄧擋\愫搨僓媥袪搨鬞耶鬞戍欣柜擋妄愩柰胃 * 搌鐖 -- 鄧靲縌@詰愫譇養嵥戍鬞僬峙蘣軝唁篊金鬞耶 鬞僬 養板鸆~睦擋獛搨愩 SAP耍詰撊懖杉剜o姆戍睦擋獛搨耶 oю養雚媴 鼪搌耍虋暖酨彀定式珫耍鄧虪灁柜纙戍Bz詰牁吐耶 * 泚鏼繑牁鷫 -- 泚鏼繐臡洢儐腺媴耍墨虎嵥睦擋獛搨戍愫譇蜙@擋耶 裼耰鸉柜泚鏼耍擂|雚媴祐艚篊門鬞昔耍霄鰗繐鸉戍泚鏼繐 臡耶 媥軝纇N耍愫譇蒝i鄧媷擋暖酨繐臡祌柜媴詻鋅式戍泚鏼繑耶 * 睦擋獛搨埔襶 -- 彀騂譇獛幏鏼戍餼如珫耍鬞昔q鎈擋僓◤潁歈刖耶 o 鬞昔養霄鰗泚鏼繐鸉戍銻詰繐臡耶 q鎈耍o埔襶板嵢戍胚柛餪板 祗耍鱌絛鬞昔戍柜虋w齔廌睦耶 巷囓酀17.5.4.1, Request/Reply q埔耍 鄧灥隳欏僝鬞耶 * 睦擋獛搨q何 -- q何烈埔襶ю耍雚絛獛搨鷫鋇耍遮w齔廌睦耶 椷板耍q何q鎈霄鰗腺洄熪擁祌~髕麩戍耶 17.5.4.2, 熪闟/繘酀 板 q何戍鶔灁藶祌灉搨耶 柰媴髕削蒹X銬柅柼翷祗腦戍媽搨髕削蒤A鄧枵茗抑鬞耶 柛餪板祗耍鬞昔彀 鼭齗 A 烈鼭齗 B 祌繾鷫耶 纙J鐀愩柰胃 1. DB2 雚膼蠲鬾 MQSEND 碰駒耍肄洄肄霿戍癸再髕獛搨耍鄧鋅式鼭齗 B 戍 茗抑媴耶 2. MQSeries DB2 閱鸉舫戍 MQSeries 鏼~鄧鷫鬞昔耶 彀鼭齗 A 柼戍 MQSeries 再齗鼪鬞昔瓬奚ъ耍醨鷫再髕獛搨貂肄霿瓬鼭齗 A 戍{ MQSeries 歧呃詻肄霿戍戍廇耶 再齗讘肄o板鼭齗 B 柼戍媴耶 潒擂| 覃殥N鬞昔鷫鼭齗 B 戍 MQSeries 再齗耍虋彀茫繐zq廇薿灚耶 3. 鼭齗 B 柼戍 MQSeries 再齗鼪搌靲膧瓗 A 祌再齗戍鬞昔耍虋醨舅鑅彀 鼭齗 B 戍戍廇媴耶 4. 鼭齗 B 柼戍 MQSeries 雚膼蘺n臡媴戍睚蹢O韄到祌鬞昔耶 17.5.2 鷫鬞昔 媥 MQSEND耍DB2 媥蛈瑏逌o姆舌養繐鷫戍耍繐鷫戍鑅耍瓬繐鷫戍 繾耶 彀~珫耍oq鎈駒鷽 "Send and Forget"耍式鷫舌骷繐鷫鬞昔耍椴 鶅 MQSeries 戍祝鷫q埔灨肄奚ъ耍俊奚鬞昔養F戍廇耶 柰媴削裾|殛鏼祗 腦耶 削 4胃礔繐鄧屑 highPriority 僔N媥蛈瑏w霿戠鷫再髕獛搨貂 myplace胃 VALUES DB2MQ.MQSEND('myplace','highPriority','test') 彀o斖耍屑 highPriority 囓 AMI 暖酨定詻肄霿戍屑耍醨 MQSeries 暉樺鐀 ]肄長稘收h歃耍 柛養怠鬷醋再髕獛搨戍恙耍蜙p詫耶 鬞昔洇委養墨 SQL 戍摃癸洭槷X瓬媥蛈獀肄戍槷X椴歈耶 o霄服鎕 扛閱耑B氡瓬鎣悚耶 蜙p耍虪柜式 EMPLOYEE耍嗀 VARCHAR 托 LASTNAME耑FIRSTNAME 瓬 DEPARTMENT耍黳臠柜譇 DEPARTMENT 5LGA 珫戍泚鷫 霄鰗殛鬞祌鬞昔耍鞮養鸉柰媴胃 削 5胃 SELECT DB2MQ.MQSEND(LASTNAME || ' ' || FIRSTNAME || ' ' || DEPARTMENT) FROM EMPLOYEE WHERE DEPARTMENT = '5LGA' 礔殛式柛嗀柜譇蘠鬷戍 AGE 托耍擂養柛|Q枵耍愩柰詻胃 削 6胃 SELECT DB2MQ.MQSEND(LASTNAME || ' ' || FIRSTNAME || ' ' || DEPARTMENT|| ' ' || ch ar(AGE)) FROM EMPLOYEE WHERE DEPARTMENT = '5LGA' 獀耍柰媴削ず愩摃媥袛摃嗀戍 SQL 式搨僦l擁鬞昔洇委耶 虪柫譇 式 DEPT耍霄鰗 VARCHAR 托 DEPT_NO 瓬 DEPT_NAME耍養鷫霄鰗泚 LASTNAME 瓬 DEPT_NAME 戍鬞昔胃 削 7胃 SELECT DB2MQ.MQSEND(e.LASTNAME || ' ' || d.DEPTNAME) FROM EMPLOYEE e, DEPT d WHERE e.DEPARTMENT = d.DEPTNAME 17.5.3 跌灥鬞昔 MQSeries DB2 閱養鼪搌詰伸鬞昔耶 伸ㄞP鼪搌祌繾戍嵥B耍彀腺伸廌 媴祌睚蹢O韄到戍鬞昔耍茫雚媴齁耍椴鼪搌鏼~|惉T昔雚媴齁耶 媥 鼪搌鏼~銃^灥戍鬞昔耍譧養鄧跌灥柜歃耍椴媥伸鏼~銃^灥戍鬞昔耍養愫歃跌 灥虎嵥鬞昔耶 柰媴削裾|殛鏼祗腦胃 削 8胃 VALUES DB2MQ.MQREAD() 殛削裺媥蛈A髕獛搨屑戍w]恙耍廌 VARCHAR 戠耍欑戠霄鰗w]再髕獛搨 肄霿戍媴祌睚蹢O韄到戍鬞昔耶 薿繐醳胃巷圳N礔鑭嗀養虪伸ㄕ村T昔耍醨 廌柜譇 NULL 襏耶 殛鏼~|鶔媴耶 削 9胃 VALUES DB2MQ.MQRECEIVE('Employee_Changes') 柼翷削ず愩摃媥釸w]屑耍醨鬞昔雚 Employee_Changes 再髕獛搨肄霿戍媴 祌睚蹢O韄到齁耶 DB2 戍柜譇唏鎈嗀柮戍閱耍板雚媥蛈瑏w霿 (詰 DB2 虪戍) 閱耍擁式戍 柮耶 鞮養鄧礤熪殛式閱耍徾媴洇委養鏼長 DB2 式耶 柰媴削蒟飛o譇瑗 戍灉搨胃 削 10胃 SELECT t.* FROM table ( DB2MQ.MQREADALL()) t 殛泥欒廌柜式耍墨詻嗀w]再髕獛搨肄霿祌媴戍詻嗀鬞昔瓬嗀o鬞昔戍鴶 翷詻槷靋C ↑廌戍式膣呃祌蘠鬷肄霿板肄霿腺衣到珫耍屑柜托|瓮杯鬞 昔洇委耍鏊托屑霄鰗鴶翷耶 礔骷繐廌鬞昔耍養薿s紂柞削蒤G 削 11胃 SELECT t.MSG FROM table (DB2MQ.MQREADALL()) t 式閱廌戍式烈定托鼪跌灥戍式虎嵥耶 o式鞮養鄧擋毗寺戍妄媥 殛式耶 蜙p耍鞮養鄧膣幏柜式烈駙柜式戍洇委耍詰繣媴珫戍鬞昔皪胃 削 12胃 SELECT t.MSG, e.LASTNAME FROM table (DB2MQ.MQREADALL() ) t, EMPLOYEE e WHERE t.MSG = e.LASTNAME 削 13胃 SELECT COUNT(*) FROM table (DB2MQ.MQREADALL()) t 鞮養鄧zL式閱鉈擔蘞浀#A鄧傳式僬囿O媴戍耶 蜙p耍柰媴削 zL再髕獛搨 NEW_EMPLOYEES 詻囓鄏抖媴耍鉈擔巰長 NEW_EMP 戍蘞浀#G 削 14胃 CREATE VIEW NEW_EMP (msg) AS SELECT t.msg FROM table (DB2MQ.MQREADALL()) t 彀殛蓔洐A蘞浀↑埲H霄鰗鬷譇鬞昔戍柜托鉊w霿耶 礔鬞昔板媽搨戍歧呃耍 愩霄鰗禁肄戍譇耍 屑擂|托鼪嵢容鄧媥 DB2 洇閱耍醨鬞昔吐 托珫耶 蜙p耍礔鞮何D鷫蕶屆媴戍鬞昔霄鰗柜譇 18 祅戍置洘耍 屑板柜譇 18 祅戍巰戠耍屑鞮養鄧肄霿柜譇蘞浀#A霄鰗臠柜譇譇顢托戍耍 蜙p胃 削 15胃 CREATE VIEW NEW_EMP2 AS SELECT left(t.msg,18) AS LNAME, right(t.msg,18) AS FNAME FROM table(DB2MQ.MQREADALL()) t 赴DB2 暖酨獛鑅齗赳戍s蕶詫赴MQSeries 茨饎F赳耍養擋鉈擔s戍 DB2 式 閱瓬蘞浀#A醨嗀肄襶戍鬞昔膣呃杯托耶 獀耍q鎈繐醨柜詰愫譇鬞昔洇委暖酨彀定珫耶 o養媥 SQL 戍蘠鬷閱僛 歈耍鄧鵩鏼虋暖酨鬞昔洇委耶 瑗戍削蒝i板胃 削 16胃 INSERT INTO MESSAGES SELECT t.msg FROM table (DB2MQ.MQRECEIVEALL()) t 虪霄鰗 VARCHAR(2000) 柜托戍式 MESSAGES耍柼翷戍闉z搨|雚w]再髕獛 搨媴耍醨鬞昔麰枵式珫耶 養豎纇N耍鄧[珮餼如戍毗寺ю耶 17.5.4 睦擋獛搨睦擋獛搨s鼪 睦擋獛搨鬷幏板\愫鬙讘戍柜祅貔耶 醨菸曤戍睦擋獛搨鬷幏{酨戍嗜 歧呃珫耍詰骷醨s礤熪戍睦擋獛搨鬷幏{酨蓔洐A纈謰q鎈|貘鐖珫氡鑶豜 嵥鐖幏戍鏼~耍鄧呃歈蘠鬷戍泚鏼耶 MQSeries q鎈Q長鬷幏睦擋獛搨戍劑泚 爩耶 養彀毠倌欉w耑n瓬砰躨蓔疪s灥耍MQSeries 虪洈s鼪睦擋獛搨戍 嵥鐖幏祌妄耶 殛躒醨頀倌鷊擋獛搨鬷幏髕瓬愩摃鄧 DB2 僓媥袛椲猺C 廅長遭ガ虎′s寺耍 赴睦擋獛搨鬷幏赳戍毗寺頀櫹櫨柅殛泚鏼戍削耶 廅殛耍薿貂譧彀譇媽戍遭 ガ胃Request/Reply q埔耍瓬 MQSeries Integrator 瓬 Publish/Subscribe耶 17.5.4.1 Request/Reply q埔 赴Request/Reply (R/R)赳q埔妄板碙鐉M戍纇N耍柜譇睦擋獛搨養嵢駙柜譇睦擋獛 搨繐臡再髕耶 鸉殛韥鏼戍珫柜妄耍板斶n臡獛搨醨鬞昔鷫繐臡鸉欣 泚鏼戍再髕虪獛搨耶柜氅泚鏼洄蘠歈耍虪睦獛搨養讘肄醨膣刖 (詰蘠歈俊砸) 廌 繐臡齗耶 椷媥豜W翷戍劑鬞纇N耍餪s鼪鷫舌繐臡烈再髕虪獛搨廌睦耶 唏繐臡獛搨彀~鸉祌容耍樺瞉殊廌剽耍騶屑欣鼭澱鏺擋馰幏臠柜譇廌剽 瓬繐臡耶MQSeries 鎣熪姆獛搨擔oю鼭耍椴板虪柜譇虎 ID耍媥黈 B戍鬞昔嗀虎詫耶 ≡\愫妄養虪殛鼭媥蚸耍瑗戍妄板斶n臡齗擋洄何戍虎 ID 酮挩 鬞昔耍蜙p柰媴詻胃 削 17胃 DB2MQ.MQSEND ('myRequester','myPolicy','SendStatus:cust1','Req1') 殛闉z搨醨稢囓 Req1 s柱柼翷戍 MQSEND 闉z搨珫耍鄧鋇繐臡戍虎 ID耶 礔繐鼪搌殛蕶肄繐臡戍廌剽耍養媥蛌蕍睦戍 MQRECREIVE 闉z搨耍詫廇鼪搌 戍再髕獛搨詻肄霿戍柜譇鬞昔耍烈柰媴虎 ID 虎胃 削 18胃 DB2MQ.MQRECEIVE('myReceiver','myPolicy','Req1') 礔再髕繐臡戍睦擋獛搨哎珫耍遮繐臡齗彀廌剽鷫祌容耍熪鋇柼翷戍 MQRECEIVE耍 屑醨烈虎 ID 幏戍鬞昔耶 礔繐鼪搌再髕獛搨繐臡瓬虎 ID耍媥豜U媴戍闉z搨胃 削 19胃 SELECT msg, correlid FROM table (DB2MQ.MQRECEIVEALL('aServiceProvider','myPolicy',1)) t o|廌再髕獛搨 aServiceProvider 戍柜譇繐臡祌鬞昔瓬虎 ID耶 柜氅鸉柅再髕獛搨耍擂|醨廌剽鬞昔鷫聤 aReauester 祗腦戍媴耶 彀o齔繾耍 再髕繐臡獛搨砏|鸉醋鏼~耶 柼耍虋奚ъ鱌絛再髕獛搨繐臡|彀]肄繾 洇廌睦耶 愩嵥oю戍睦擋獛搨柳歃O耍澱鏺墨熪姆獛搨鄑噠z胚繐臡獛搨澱鏺欒 灝鵃廌剽戍餼如耶 o繾汾擔唏嵥纙Bz戍暉貂耍板繐臡獛搨瓬再髕虪睦獛搨板蘠曄汾擔廇鸉耶 o 養擋腺譂幏戍蒤A睦擋獛搨譧|跛廇s鼪耍柛養擋腺鶔歃嵢戍蒤A愫薿繐 臡詰廌剽|彀Bz獛容樺浩鐖鱌酯C o鐖幏q鎈擋腺暖蒤A鄧肄齔廇 鶔s暖詰鏼~暖酨耶 17.5.4.2 熪闟/繘酀 媽搨鋇次恙 睦擋獛搨鬷幏珫戍駙柜譇柜髕削蒤A板柜睦擋獛搨q何醋睦擋獛搨嗀受戍 麩耶 鞮養委廇醨鬞昔鷫媴耍欑媴墨駙柜譇睦擋獛搨忌蝑C 鬞昔洇委養 鄧板媥蛈瑏w霿戠耍詰養鄧雚定托酮繻g耶 媽搨鬞昔較較板茫繐媥 MQSEND 閱僳鷫戍鬞昔耶 ∥oю鬞昔茫繐嵥鷫愫譇鼪搌舌耍養鄧媥 MQSeries AMI 戍赴牁鷫M赳鼭耶 牁鷫M板媥 AMI 扯z泚爩鉊w霿耶牁鷫M霄鰗譇顢再髕獛搨戍M耶 鷫 牁鷫M戍鬞昔耍|祝殛M珫詻肄霿戍臠柜譇再髕獛搨耶 +w何柜再髕獛搨 柜托臠譇鬞昔嗀受耍o板蕶顢嗀擋戍閱耶 柰媴削ず鷫鬞昔牁鷫M interestedParties胃 削 20胃 DB2MQ.MQSEND('interestedParties','information of general interest'); ∵S屆再髕獛搨睦鼪搌戍鬞昔茫繐鶔愫嚭耍屑茫繐 Publish/Subscribe 柮耶 Publish/Subscribe 鑶釤q鎈虪柜譇養怠鬷戍耑揅曄戍蒤A\愫繘養彀珫熡 韄耍鄧雚愫譇洢儐舌鼪搌鬞昔耶 礔繐儭殛柮耍養媥 MQPublish 祊貘耍烈 MQSeries Integrator 詰 MQ Series Publish/Subscribe 鼭s鼪耶 MQPublish 養檛媥蛈犐擋詫廇肄烈鬞昔虎戍遭ガ耶 遭ガ養儩豜鶔M兼a肄 繐鼪戍鬞昔耶 纙J鐀愩柰胃 1. MQSeries 扯z舌歧呃 MQSeries Integrator 熪闟/繘酀閱耶 2. P受戍睦擋獛搨彀 MQSI 歧呃詻肄霿戍繘酀貂繘酀耍擋詫廇肄嗀受戍 遭ガ耶 臠柜譇擋灥虎戍遭ガ耍虋養鄧顟擋 MQSeries Integrator V2 祌 鄧洇委長嗜戍繘酀纇N耶 薿繐醳胃巷圳N耍再髕獛搨巰投鋅式戍媴嗀肄 霿擋耶 3. DB2 睦擋獛搨洢儐再髕獛搨貂 Weather 戍鬞昔耶 鬞昔鋇洏房板 Sleet耍遮 遭ガ長 Austin耍廅殛q何嗀受戍擋耍鬑何 Austin 戍洏房板 Sleet耶 4. 舫洢儐鬞昔戍鼭板墨 DB2 虪戍 MQSeries 閱僯Bz耶 媥蛈A髕獛搨巰 投 Weather耍醨鬞昔鷫 MQSeries Integrator耶 5. MQSI 雚 Weather 再髕獛搨鼪鬞昔耍鸉 MQSI 歧呃肄霿戍摃Bz獛耍 虋讘肄妣N戍繘菸耶潒 MQSI |醨鬞昔祝幏戍屑祌擋媴耶 6. 洄繘酀 Weather 再髕獛搨耍虋彀 Austin 熡韄摴n戍睦擋獛搨耍醨彀鼪搌再髕 獛搨珫鼪搌鬞昔 Sleet耶 礔繐媥袑蜙w]襏瓬 NULL 遭ガ閞姥芭耍鞮養媥豜U媴闉z搨胃 削 21胃 SELECT DB2MQ.MQPUBLISH(LASTNAME || ' ' || FIRSTNAME || ' ' || DEPARTMENT|| ' ' ||cha r(AGE)) FROM EMPLOYEE WHERE DEPARTMENT = '5LGA' 蘠鬷戍肄詻嗀囓虋媽鬞昔耍悹譧霄鰗 LASTNAME耍闉z搨養愩柰詻胃 削 22胃 SELECT DB2MQ.MQPUBLISH('HR_INFO_PUB', 'SPECIAL_POLICY', LASTNAME, 'ALL_EMP:5LGA', 'MANAGER') FROM EMPLOYEE WHERE DEPARTMENT = '5LGA' 殛闉z搨媥 SPECIAL_POLICY 再髕獛搨耍醨鬞昔洢儐 HR_INFO_PUB 洢闟再髕獛搨 珫耶 鬞昔鋇鷫舌板 MANAGER 遭ガ耶 遭ガ戠祗腦養肄媥蚼u胃赳s鼪戍愫薿 遭ガ耶 彀殛削蓔洐A媥釤o譇遭ガ養儩豜熡韄 ALL_EMP 詰骷熡韄 5LGA耍鄧鼪搌 o鬞昔耶 礔繐鼪搌洢儐戍鬞昔耍鞮澱鏺樺醨鞮戍摴n熡韄彀鬞昔珫耍 鬞昔霄鰗聤肄戍遭ガ虋 鋇鬞昔睦欑鷫戍擋再髕獛搨祌巰投耶 薿繐醳胃巷圳N AMI 擋再髕獛搨嗀肄 霿牁黂扯z鑶蛈A髕獛搨瓬鼪搌舌再髕獛搨耶 牁黂扯z鑶蛈A髕獛搨板擋烈熪儐/ 繘酀牁黂扯z鑶釤q埔戍搨耍 椴鼪搌舌再髕獛搨板幏繘酀繐臡醨鷫戍廇耶 7 柰媴闉z搨彀遭ガ ALL_EMP 珫熡韄摴n耶 削 23胃 DB2MQ.MQSUBSCRIBE('aSubscriber', 'ALL_EMP') 柜氅繘酀柅睦擋獛搨耍鄧遭ガ ALL_EMP 洢儐戍鬞昔耍醨祝擋再髕獛搨詻肄霿戍 鼪搌舌再髕獛搨珫耶 柜譇睦擋獛搨養鄧嗀愫薿戍虋繘酀耶礔繐灥隳幏鞮戍繘酀戍 鬞昔耍鞮養鄧媥袛摃癸戍鬞昔跌灥閱耶蜙p耍礔擋再髕獛搨 aSubscriber 醨 鼪搌舌再髕獛搨肄霿長 aSubscriberReceiver耍椴唏柰媴闉z搨耍屑醨|唏觳ド詫廇 伸柜譇鬞昔胃 削 24胃 DB2MQ.MQREAD('aSubscriberReceiver') 礔繐讘肄鄧柰繐洢儐戍鬞昔烈遭ガ耍鞮養鄧媥釱珫柜式閱耶 柰媴闉z搨|鼪 搌 aSubscriberReceiver 戍容砎譇鬞昔耍虋ず鬞昔烈遭ガ胃 削 25胃 SELECT t.msg, t.topic FROM table (DB2MQ.MQRECEIVEALL('aSubscriberReceiver',5)) t 礔繐鄧遭ガ ALL_EMP 伸ㄧ蜙鬞昔耍鞮養鄧洋T SQL 戍柮耍巷熪鋇胃 削 26胃 SELECT t.msg FROM table (DB2MQ.MQREADALL('aSubscriberReceiver')) t WHERE t.topic = 'ALL_EMP' : 薿繐戍板鞮澱鏺鬙礔 MQRECEIVEALL 媥郬蹠耍椴唏媥酘れ靲媴耍 屑虋唏 骷嗀蠽鬞昔|洢儐遭ガ ALL_EMP耶 o板廅長鸉式閱耍浂矧擋貙耶 ♂z嫀嗀受繘酀蕶屆遭ガ耍鞮澱鏺媥釤闉z搨耍腦俊廇灥繘酀耍蜙p胃 削 27胃 DB2MQ.MQUNSUBSCRIBE('aSubscriber', 'ALL_EMP') 柜氅熪鋇殛闉z搨耍熪闟/繘酀牁黂扯z鑶郩N嫀鷫幏繘酀戍鬞昔耶 椻韥洢闟 定鬞戍駙柜譇薿繐纇N板椻韥洢儐耶 媥 DB2 珫戍熪搨鼭耍鞮養鄧 椻韥洢儐鬞昔耍鏼長熪搨碰駒戍柜倌鰣C ↗醋戍椻韥洢儐纇N酨彀耍 熪獛搨嗜戍妄養鴔噠z舌詰礤熪舌椻墨廇呃鬞昔洇委耍虋泉詫廇肄霿熪韥 鏼耶巷圳N耍摃熪搨戍媥蚼A澱鏺聤鄱鸉慌v烈歈劑戍旟擋耶 柰媴削蒟 腦熪搨愩摃媥 MQSeries DB2 閱耶 柰媴削ず臠歃鐙擋s泚耍洢儐鬞昔板委戍耶 摃繘酀 HR_INFO_PUB 再 髕獛搨虋彀 NEW_EMP 珫熡韄摴n戍媥蛈瑏袚擋獛搨耍醨|鼪搌柜鬞昔耍霄服臠柜 譇s泚戍齔耑巰投瓬郎耶 削 28胃 CREATE TRIGGER new_employee AFTER INSERT ON employee REFERENCING NEW AS n FOR EACH ROW MODE DB2SQL VALUES DB2MQ.MQPUBLISH('HR_INFO_PUB&', 'NEW_EMP', current date || ' ' || LASTNAME || ' ' || DEPARTMENT) ------------------------------------------------------------------------ 17.6 enable_MQFunctions enable_MQFunctions 鼖擋肄戍定祌 DB2 MQSeries 閱耍虋ъ DB2 MQSeries 閱養鄧譂≡a鸉 耶 礔冀揅壧烈歧呃 MQSeries 碉 MQSeries AMI耍銻醨|噬韖耶 騅v 柰媴珫柜醳胃 * sysadm * dbadm * 礔閱戍鰗詰腦俊戍找巰投酨彀耍屑 IMPLICIT_SCHEMA 彀定柼耶 * 礔找巰投 DB2MQ 酨彀耍屑 CREATEIN 鄾擋v彀找柼耶 銻砰妄 >>-enable_MQFunctions----n--database----u--userid---------------> >-----p--password----+--------+---+-------------+-------------->< '-force--' '-noValidate--' 銻囓 -n database 肄繐鼖擋戍定巰投耶 -u userid 肄媥蛈 ID 鄧s鼪定耶 -p password 肄媥蛈 ID 戍q俄耶 -force 肄薿s揅壧齔繾熪{戍翭i睦Q落洐C -noValidate 肄 DB2 MQSeries 閱戍ъ醨鸉耶 削 彀柰媴削蓔洐A洄擔 DB2MQ 閱耶媥蛈稕s哎定 SAMPLE耶 洄媥釸w]找 DB2MQ耶 enable_MQFunctions -n sample -u user1 -p password1 擋妄圳N醳 DB2 MQ 閱彀殛銻椻韥擔戍找 DB2MQ 柰鸉耶 鸉銻祌容胃 * 俊肄洄揅壧 MQ 烈 AMI耍遮 MQSeries 次劑板 5.2 詰鶔s次劑耶 * 俊肄洄肄霿 $AMT_DATA_PATH耶 * 醨到鶔長 DB2PATH 戍 cfg 歃到耶 彀 UNIX 柼胃 * 媥 db2set耍醨 AMT_DATA_PATH s柱 DB2ENVLIST耶 * 俊肄烈 UDF 鸉虎戍媥蛈碖b板 mqm 顪憒抖耶 * 俊肄繐碰駒殛銻戍媥蛈猼O mqm 顪憒抖耶 : MQSeries 5.2 儭 ATX 4.2耶 ------------------------------------------------------------------------ 17.7 disable_MQFunctions disable_MQFunctions 欘擋肄戍定祌 DB2 MQSeries 閱耶 騅v 柰媴珫柜醳胃 * sysadm * dbadm * 礔閱戍鰗詰腦俊戍找巰投酨彀耍屑 IMPLICIT_SCHEMA 彀定柼耶 * 礔找巰投 DB2MQ 酨彀耍屑 CREATEIN 鄾擋v彀找柼耶 銻砰妄 >>-disable_MQFunctions----n--database----u--userid--------------> >-----p--password---------------------------------------------->< 銻囓 -n database 肄定巰投耶 -u userid 肄擋僯s鼪定戍媥蛈 ID耶 -p password 肄媥蛈 ID 戍q俄耶 削 彀柰媴削蓔洐A洄欘擋定 SAMPLE 戍 DB2MQ 閱耶 disable_MQFunctions -n sample -u user1 -p password1 ------------------------------------------------------------------------ 扯z泚爩 倌鷎到 * 嚭珫眃 o 18.1 扯z DB2 Server for VSE & VM 再齗柮 o 18.2 Java 1.2 儭嚭珫眃 o 18.3 彀 Windows 鏼~鑶豜U媥蚴u柼祗腦戍赴潲嚪尚赳砷 o 18.4 OS/2 鑶豜U戍 Java 嚭珫眃 o 18.5 彀 Windows 鏼~鑶豜蘞蘧眐矩照洄蘠歈泚鏼戍赴賊緮酨 灥赳砷 o 18.6 愫鑅鶔s鵃灚s鼪 o 18.7 DB2 for OS/390 戍嚭珫眃 o 18.8 OS/390 嚭珫眃澱繐戍儘獛搨 o 18.9 赴擔繾柳赳戍鶔 o 18.10 DB2 嚭珫眃戍序鬙 o 18.11 UNIX 鑶郩夒珫眃戍序鬙 o 18.12 OS/2 養戍 Infopop 齶ガ o 18.13 jdk11_path 歧呃囓戍祗腦 o 18.14 媥蚼uScript 珫眃赳詰赴蘧眐矩赳熪擁戍 Solaris 鑶蚳砷 (SQL10012N) o 18.15 DPREPL.DFT 戍祗腦 o 18.16 鼖韥愫譇嚭珫眃 applet o 18.17 嚭珫眃鄧 Applet 鸉戍哎柼祗腦 o 18.18 彀 Applet 研搨 (Windows 95) 柰鸉嚭珫眃 o 18.19 媥豜j戍泥欒膣刖 * 鬞珫眃 o 19.1 彀 Windows 鏼~鑶豜U戍赴潲嚪尚赳砷 o 19.2 Netscape 洄礤鼖耍彀 Netscape Navigator 珫礤鼖鴉 Web 膣(UNIX 鑶) o 19.3 鼖韥赴鬞珫眃赳戍齶ガ * F o 20.1 彀擔定F]肄趁銬毠洟 o 20.2 MQSeries 茨饎F o 20.3 OLE DB 茨饎F ------------------------------------------------------------------------ 嚭珫眃 ------------------------------------------------------------------------ 18.1 扯z DB2 Server for VSE & VM 再齗柮 DB2 Universal Database 次劑 7 赴嚭珫眃赳柱鎣 DB2 再齗 for VSE 碉 VM 定戍儭耶赴嚭珫眃赳照詻嗀 VSE 碉 VM 定旨麩戍 DB2 再齗耶 嵥 柛儭擔豯矧耑薿槴舜霅B鶔s郬p襏碉薿ss膣銻耶 薿槴舜頦M薿ss膣茫繐 暖酨獛耍椴欑暖酨獛鸉腺 VSE 碉 VM 遭q柼戍 DB2 再齗耶 殛暖酨獛墨 嚭珫眃詻虪耍譂擋腺 VSE 碉 VM 柰 DB2 再齗戍 VSE 碉 VM 蕶詫耶 鬷幏嚭珫眃委\媥蛈犑噠z DB2耍潲 DB2 再齗鸉腺蠽柜譇樹鬧耶VSE 碉 VM 旨麩戍 DB2 再齗ず彀嚭珫眃遭甇耍柅 DB2 Universal Database 旨麩耶 灥旨麩耍|碰駒扯zo旨麩戍虎睦韥鏼碉洢擋獛搨耶 削蒤A媥蛈瑔i鄧媴 蕶顢定戍豯矧耍灥珫戍柜譇豯矧虋醨祌薿摮C 媥蛈瘐]養鄧媴定戍式 耍虋鸉鶔s郬p襏耍詰肄霿式長纋柞僬垠C 嗀歧呃嚭珫眃耍虋彀 VSE 碉 VM 旨麩戍 DB2 再齗鸉扯z鏼~戍鬞耍巷囓 DB2 Connect User's Guide詰揅壧烈歧呃銬耶 ------------------------------------------------------------------------ 18.2 Java 1.2 儭嚭珫眃 媥 Java 1.2 珫戍嵢儭耍嚭珫眃養鄧儭嵢砰躨耍愩詹鏶砰碉鏶 砰耶 殛儭骷養擋腺 Windows NT 樹鬧耶 儵ル碉媥 Java 1.2耍嚭珫眃繐灁揅壧胃 1. JDK 1.2.2 彀 DB2 UDB CD 戍 DB2\bidi\NT 到柰耶 ibm-inst-n122p-win32-x86.exe 板揅壧獛搨耍 ibm-jdk-n122p-win32-x86.exe 板 JDK 牁鷫耶醨譇盎獞忘柼戍皈到珫耍 潒雚欑到鸉揅壧 獛搨耶 2. 醨擂揅壧彀 \java\Java12 柰耍 板 DB2 戍揅壧尚耶 3. JDK/JRE 揅壧耍繐灥 JDK/JRE 長鑶 VM耶 Java 1.2 揅壧歈閱耍鄧儘鎈搨鼖韥嚭珫眃|媥 Java 1.2耶 儵欘媥 Java 1.2耍巷彀 \java\Java12 柰鬙揅壧 JDK/JRE耍詰鶔 \java\Java12 歃到戍巰戠耶 : 繐Vc \java\Java12 碉 \Java12耶 \Java12 板 DB2 揅壧戍柜倌鰣A虋遮霄服 Java 1.2 戍 JDBC 儭耶 ------------------------------------------------------------------------ 18.3 彀 Windows 鏼~鑶豜U媥蚴u柼祗腦戍赴潲嚪尚赳砷 媥郩夒珫眃哎柼祗腦耍鞮養|Jo皇戍砷胃赴潲戍嚪尚赳耶愩刖鞮犌弔w 壧柅s戍 Web 鈕檍詰 Web 鈕檍s次耍巷俊肄 HTML 碉 HTM 麩碉鶔L戍鈕 齗虎膣幏耶 巷囓酀甇祗腦遭ガ赴礤鼖鶔獛搨戍鼖韥赳耶 ------------------------------------------------------------------------ 18.4 OS/2 鑶豜U戍 Java 嚭珫眃 嚭珫眃澱鏺揅壧彀 HPFS 搨戍忪忘鼭柼耶 ------------------------------------------------------------------------ 18.5 彀 Windows 鏼~鑶豜蘞蘧眐矩照洄蘠歈泚鏼戍赴賊緮酨灥赳砷 彀 DB2 Universal Database for Windows NT 柼耍 彀灚彘}鼖蘧眐矩鈮趷彀 赴Script 珫眃赳詻擔戍泚鏼腦鄔耍熪擁赴賊緮酨灥赳戍砷耶 泚鏼扛你 蘠歈耶 礔赴Script 珫眃赳珫擔戍泚鏼鰗嗀 START 銻耍堉|熪擁o皇戍長耶 長柅鞻o皇戍長耍巷彀歃碉泚鏼洇耍 媥 START/WAIT 銻耍椴繐媥 START 銻耶 ------------------------------------------------------------------------ 18.6 愫鑅鶔s鵃灚s鼪 愫鑅鶔s鵃灚s鼪彀次劑 7 赴嚭珫眃赳戍閱耍長癸膃圻蜀站蜸蹠耶赴茗 抑赳鵃灚s鼪閱儵鸉戍癸蒤A 茫繐次劑 7耶 儵彀次劑 6 鸉愫鑅鶔 s鵃灚s鼪閱耍巷彀癸蓔砏嚭珫眃耍虋彀蠽鸉擂耶 ------------------------------------------------------------------------ 18.7 DB2 for OS/390 戍嚭珫眃 顟擋OS/390 戍 DB2 UDB 嚭珫眃鄑噠z騅v洢擋獛搨戍媥蚼C 腺 OS/390 戍 DB2 UDB耍洢擋獛搨板汾擔嗀鐀蕶詫戍祅貔耍彀擂Q DB2 嚭珫眃扯z祌容耍澱鏺 騅v碉揅壧彀蓔妣C 定 DB2 for OS/390 氡鑶蚼A嚭珫眃|肄霿 "CC390" 定耍鏼長嚭珫眃戍 洇倔儭耶 巷繐殛定耶 潒彀嚭珫眃到詰鬞珫眃鏼~鬞珫耍鑭嗀蕶顢 DB2 for OS/390 次劑 7.1耍椷板耍欑麩儭 OS/390 次劑 7.1 DB2 戍耶 愫 DB2 for OS/390 次劑 6 戍蕶屆耍碉 DB2 for OS/390 次劑 7.1 虎耶嗀 DB2 for OS/390 次劑 7.1 戍蕶屆耍彀到珫鑭嗀次劑巰投耶 彀嚭珫眃歧呃 DB2 for OS/390 次劑 7.1 氡鑶豜鶖耍詻嗀欑次劑戍麩嗀酨灥v貙耶 儵椻嚭珫眃酨灥碉媥 Generate DDL 耍巷揅壧 Generate DDL 胃 * 腺次劑 5耍媥 DB2 for OS/390 次劑 5 靲w壧 DB2Admin耶 * 腺次劑 6耍揅壧洟戍獛搨]繣閭鎣閱耍腺 DB2 for OS/390 次劑 7.1 扯 z蕶詫椴躨餪愩 PTF 耶 * 腺次劑 7.1耍Generate DDL 長汾擔肄祌 DB2 for OS/390 次劑 7.1 扯 z蕶詫祌柜倌鰣C 儵雚嚭珫眃酨灥暖酨獛鑅齗耍彀鼖韥 DB2 UDB 嚭珫眃耍澱鏺灁揅壧耶 擂板 DB2 睦擋獛搨礤熪雚膼鬫彷@倌鰣C 儵彀泚鏼霠長 OS/390 氡鑶蚴s DB2耍巷媥郩q膼鱆[呃茨饎獛搨泚爩耶 1. 彀赴僬垠v贄貘耍肄椻歧呃烈定戍s哎盭耶 2. 彀赴q埔灨肄赳贄貘耍蘠歈譂’杉q埔鬞耶 3. 彀赴定赳贄貘耍腺定巰投肄氡鑶軝W投耶 4. 彀赴躒貂醳赳贄貘耍灥歧呃躒貂醳 (擋戍)耶 5. 彀鏼~鑶灥赴MVS/ESA, OS/390赳耶 6. 柜柰蘠歈耍鄧蘠歈歧呃耶 礔繐zLhD鼭齗鄎s DB2 for OS/390 氡鑶蚼A 巷芋駽柼翷hD鼭齗戍纙J 1-6耶潒胃 1. 彀雚膼蘼瓗耍鼖韥嚭珫眃耶 2. 彀赴鑶蚼v蘮柼柜柰挽k耍嫀灥s柱耶 3. 彀赴s柱鑶蚼v洇耍彀鑶軝W投枵hD鼭齗巰投耶 4. 彀茗抑枵 DB2DAS00耶 5. 黳 TCP/IP q埔灨肄 (彀赴q埔灨肄赳囓斖)耍 巷彀遭q巰投肄h D鼭齗戍遭q巰投耶 6. 彀再髕獛搨巰投枵 523耶 7. 柜柰俊肄僬s柱鑶蚼C 鞮睦欑養鄧彀鑶釬蘮柰貘表s柱戍hD鼭齗耶 8. 姆礤hD鼭齗巰投耶 9. 彀赴蒤v蘮柼柜柰挽k耍嫀灥s柱耶 10. 彀赴s柱蒤v珫耍柜柰駻s耍 媴鋇hD鼭齗柼養擋戍蒤C 愩刖h D鼭齗長 Windows NT 鑶蚼A屑|彀 DB2 柰哀 DB2 for OS/390 氡鑶 蚼C 11. 灥蒤C 殛裾|椻韥穭柞q埔灨肄囓耶 12. 柜柰俊肄僬s柱蒤C 13. 礤鼖裱蘮耍養鄧表浂s柱戍蒤C 14. 姆礤蒤C 15. 彀定蘮柼柜柰挽k耍 嫀灥s柱耶 16. 柜柰駻s耍ずhD鼭齗柼戍劑抑定耶 愩刖鞮繐彀赴s柱定赳 珫s柱 DB2 氡鑶蚼A 巷腺赴定巰投赳枵氡鑶軝W投耶 醳胃 枵氡鑶 (詰板定) 戍劑抑顢巰耶 17. 柜柰俊肄耶 {彀耍鞮洄鑌歈閱廇彀嚭珫眃s柱氡鑶蚼C 礤鼖定耍|ず DB2 for OS/390 氡鑶蚼C "嚭珫眃 390" 躒戍柜譇沮蠮鋇胃 OS/390 戍 DB2 UDB 嚭珫眃養旚z扯z洄騅v IBM DB2 洢擋獛搨戍媥蚼C 礔長 DB2 UDB for OS/390 譇顢繘菸蕶詫戍祅麩珫戍洢擋獛搨耍 彀墨 DB2 嚭珫眃扯z祌容耍澱鏺鑌L騅v遮揅壧彀蓔洐C 殛躒睦長胃 OS/390 戍 DB2 嚭珫眃養旚z扯z洄騅v IBM DB2 洢擋獛搨戍媥蚼C 礔長譇顢繘菸恙戍祅麩珫戍洢擋獛搨澱鏺鑌L騅v遮揅壧彀蓔洐A 浂墨 DB2 嚭珫眃鄑噠z耶 ------------------------------------------------------------------------ 18.8 OS/390 嚭珫眃澱繐戍儘獛搨 醨 APAR PQ36382 矧擋 DB2 for OS/390 次劑 5 碉 DB2 for OS/390 次劑 6 戍 390 蕶詫耍媥 DB2 UDB 嚭珫眃次劑 7 僤鬾o氡鑶蛈彷姥逌{搨耶 矧擋 APAR 柰媴戍 FMID胃 DB2 for OS/390 Version 5 390 Enablement: FMID JDB551D DB2 for OS/390 Version 6 390 Enablement: FMID JDB661D ------------------------------------------------------------------------ 18.9 赴擔繾柳赳戍鶔 "<<" 瓬 ">>" 盭洄椻赴擔繾柳赳珫颳耶 ------------------------------------------------------------------------ 18.10 DB2 嚭珫眃戍序鬙 彀赴t枵赳柜岩戍赴嚭珫眃戍揅壧烈歧呃赳柜珫耍赴序鬙鬞赳 柜躒 |鬑巆鞮彀醨赴嚭珫眃赳擋長 applet 礔熪擁齶ガ耍睦愩摃雚祺銻甇 珫薿]鞮 雚膼鰶s檍戍 CLASSPATH耶 劑躒|祗腦愩摃雚容翷戍祺銻甇鼖韥鈕檍耍 椷 峨冀虪鼖韥鈕檍戍銻耶 礔繐鼖韥 Internet Explorer耍巷枵 start iexplore耍 潒 Enter 耶 礔繐鼖韥 Netscape耍巷枵 start netscape耍潒 Enter 耶 o銻娩糶]鈕檍洄]彀鞮戍 PATH 珫耶 愩礔潒耍巷醨閭枵 鞮戍 PATH 珫耍 詰板炵黈鈕檍戍揅壧到耍薿s熪鋇 start 銻耶 ------------------------------------------------------------------------ 18.11 UNIX 鑶郩夒珫眃戍序鬙 愩刖鞮潲妄彀 UNIX 悚鑶郩裲秭夒珫眃耍屑]肄 JAVA_HOME 嵢 Java 牁 鷫胃 * Java 揅壧彀 /usr/jdk118耍巷]肄 JAVA_HOME /usr/jdk118耶 * 腺 sh耑ksh耑bash shell胃 鋇 JAVA_HOME=/usr/jdk118. * 腺 csh 詰 tcsh shell胃 setenv JAVA_HOME /usr/jdk118 ------------------------------------------------------------------------ 18.12 OS/2 養戍 Infopop 齶ガ 愩刖鞮板彀 OS/2 柼鸉嚭珫眃耍媥釬它R 1024x768 瓬 256 耍 虋鼖擋柅 WorkPlace Shell Palette Awareness耍屑櫹鋇{甇戍 Infopop |鄧艨 戠ず彀艨甓鴽柰耶 儵儘殛齶ガ耍鶔ず]肄長 256 鄧柼耍詰欘媥 Workplace Shell Palette Awareness耶 ------------------------------------------------------------------------ 18.13 jdk11_path 歧呃囓戍祗腦 彀嚭珫眃祗腦洇耍JDK 1.1 揅壧尚 (jdk11_path) 歧呃囓戍祗腦耍 腺氡癸ガ矧 擋柰柅柜耶 赴矧擋赳柰蘠鬷戍媴長胃 * 劑抑碉茗抑雚膼鬫材定再齗 * 雚膼 * 爩嗀劑抑雚膼鬫材定再齗 * 爩嗀劑抑瓬茗抑雚膼鬫彷睦釬定再齗 * 爩嗀劑抑雚膼鬫妨ヰP定再齗 ------------------------------------------------------------------------ 18.14 媥蚼uScript 珫眃赳詰赴蘧眐矩赳熪擁戍 Solaris 鑶蚳砷 (SQL10012N) 彀灥赴Script 珫眃赳詰赴蘧眐矩赳珫戍 Solaris 鑶蚸耍養|熪擁柰媴 砷胃 SQL10012N - →枵肄戍定 "/udbprod/db2as/sqllib/function/unfenced/ db2scdar!ScheduleInfoOpenScan"耍鼪搌唏w齔戍鏼~鑶蚳砷耶 SQLSTATE=42724耶 o板墨腺 Solaris 鸉膣齗珫戍砷詻癚耶鞮骷茫矧擋柰媴戍獛搨耍饓養鶔 儘殛齶ガ胃 105490-06 (107733 ^躥柅 105490) for Solaris 2.6 ------------------------------------------------------------------------ 18.15 DPREPL.DFT 戍祗腦 彀赴嚭珫眃赳珫耍赴泚爩]肄赳翭韄劑祌赴纋柞赳贄戍祗腦纙J 5d 柞D胃 醨暖酨赴嚭珫眃赳戍泚鏼到 (蜙p耍SQLLIB\BIN)耍 愩殛柜酯A鑶袛i鄧媥釱鏼長w]耶 睦柞長胃 醨暖酨赴嚭珫眃赳戍泚鏼到 (SQLLIB\CC)耍 愩殛柜酯A鑶袛i鄧媥釱鏼長w]耶 ------------------------------------------------------------------------ 18.16 鼖韥愫譇嚭珫眃 applet 鞮彀柜鬧鼭齗柼嵥鼖韥柜譇鄧柼戍嚭珫眃 applet耶o醳貙譂擋腺詻嗀儭 鈕檍詻鸉戍嚭珫眃 applet耶 ------------------------------------------------------------------------ 18.17 嚭珫眃鄧 Applet 鸉戍哎柼祗腦 #u嚭珫眃赳板鄧 applet 搨鸉耍F1 骷爦彀爩嗀 Infopop 閱戍甇 詰翭韄劑珫B鏼耶 鞮養鄧彀柰媴祅麩珫 F1 耍駒鋇 Infopop胃 * DB2 Universal Database for OS/390 * F 柼翷醳鄧鴉戍赴嚭珫眃赳祅麩芥潲妄媥 F1 駒鋇祗腦耶 殛礔繐ず擂 祅麩戍祗腦耍巷媥蚼u祗腦赳盭詰赴祗腦赳柰詹閱式耶 ------------------------------------------------------------------------ 18.18 彀 Applet 研搨 (Windows 95) 柰鸉嚭珫眃 礔肄戍媥蛈 ID 碉鄺俄潲耍堉潲妄礤鼖赴Script 珫眃赳耶 熡枵赴嚭珫眃赳 耍巷俊肄媥蛈 ID 碉鄺俄板騶嗀耶 ------------------------------------------------------------------------ 18.19 媥豜j戍泥欒膣刖 堉媥蛈稢擁廌毠皪媴戍泥欒耶眈譂幏媥蛈瑔釱僰w鵃舫廌戍媴耶 腺養廌鄧欨繣詰鄧觻繣媴戍泥欒耍嗀柰媴譇齶ガ胃 1. 茫繐旟愫繾浂灥隳膣刖耶 2. 茫繐毠皪戍雚膼蠲O鯬浂奚酨膣刖耶 長柅惎o譇Bz鶔閭堉顟耍DB2 醨毠皪膣刖鐖牁軝\愫沮耶 鄧柜歃柜譇沮戍 搨跌灥瓬ず泥欒膣刖耶 膣刖愩柰胃 1. 〞d欒戍柜譇沮養鄧照耍嵥洄跌灥件l沮耍|ず繾耶 2. ≡b摃肄繾柼雚膼蘱埸x酨泥欒膣刖戍柜譇沮耍|雚膼鬫村O鯬 茫臡耶 嚭韄鯬珫戍泥欒膣刖媴胃 1. 礤鼖赴泚爩]肄赳翭韄劑戍赴柜赳贄貘耶 2. 彀瘐j襏鱦沮珫耍灥胃 o 削蓔妝e耍養貙赴削蓔妝e赳甇珫ず戍膣刖媴耶 彀枵珫 肄膣刖鐖戍沮毠洟 (媴)耶 o 祺銻珫眃耍養貙赴祺銻珫眃赳戍赴泥欒膣刖赳贄貘柼ず戍膣刖媴耶 彀枵珫肄膣刖鐖戍沮毠洟 (媴)耶 ↗媥蚼u削蓔妝e赳甇詰赴祺銻珫眃赳戍赴泥欒膣刖赳贄貘柼戍泥欒膣刖耍 韄鯬 珫媴奚蟂彀韄鯬珫戍泥欒媴耶 殛緮|毠腺瘐j襏]肄耶柜 柰柰柜纙耍跌灥膣刖鐖戍柰柜譇沮耶 +U柜纙唏鏼擋珫耍式鞮洄F膣刖鐖 黦抑耶 ------------------------------------------------------------------------ 鬞珫眃 ------------------------------------------------------------------------ 19.1 彀 Windows 鏼~鑶豜U戍赴潲嚪尚赳砷 媥釬鬞珫眃耍鞮|熪{愩柰戍砷胃赴潲嚪尚赳耶 愩刖鞮犌弔w壧柅s戍 Web 鈕檍詰 Web 鈕檍s次耍巷俊肄 HTML 碉 HTM 麩碉鶔L戍鈕檍虎膣幏耶 巷 囓酀甇祗腦遭ガ赴礤鼖鶔獛搨戍鼖韥赳耶 ------------------------------------------------------------------------ 19.2 Netscape 洄礤鼖耍彀 Netscape Navigator 珫礤鼖鴉 Web 膣(UNIX 鑶) 愩刖洄鑌礤鼖 Netscape Navigator耍虋ず劑抑 DB2 HTML 麩詰鴉郁霠耍 灚 雚赴鬞珫眃赳礤鼖鴉郁霠醨癚 Netscape 熪擁砷耶 砷| "Netscape 巰投長 戍詰到"耶 礔繐鬙讘o譇齶ガ耍巷彀礤鼖鴉郁霠祌容耍邱}鼖戍 Netscape 鈕檍耶 Netscape 醨薿s鼖韥虋鱌絛鴉郁霠耶 巷圳N耍顟擋洄礤鼖戍 Netscape 僳}鼖劑抑 DB2 HTML 麩|熪擁o譇砷耶 ------------------------------------------------------------------------ 19.3 鼖韥赴鬞珫眃赳戍齶ガ 彀欣鑶豜W耍礔鞮媥蚼u礤絛閱式赳耑赴柜譇纙J赳詰 db2ic 銻鉊I駒赴 鬞珫眃赳耍鼖韥t|唏鎈低耶 礔Jo譇齶ガ耍巷鼖韥赴嚭珫眃赳耍 潒灥 祗腦 --> 鬞珫眃耶 ------------------------------------------------------------------------ F ------------------------------------------------------------------------ 20.1 彀擔定F]肄趁銬毠洟 養鄧媥蛃擔定F僯]肄s定祌媥蛈犌〝繾戍 (板到詰皈式 戍式繾) 趁銬毠洟碉w樺灥毠洟囓耶骷嗀↗媥蛈犌〝繾彀赴媥蛈犌 赳F肄柜譇黂鑅鱦耍浂|鼖擋殛蕶詫耶 ------------------------------------------------------------------------ 20.2 MQSeries 茨饎F DB2 次劑 7.2 虪s戍 MQSeries 茨饎F耶殛F擔柜譇式耍 媥 DB2 MQSeries Functions 伸 MQSeries 媴耍 DB2 MQSeries Functions 長次劑 7.2 珫戍s閱耶 拚鶅鞮戍]肄耍殛F養醨臠柜屑 MQSeries 鬞昔長柜譇嗀肄 襶戍戠耍 詰柜譇禁肄戍托戠耶 擔戍式養拚鶅鞮戍]肄僦吐 戠耍 醨臠柜屑 MQSeries 鬞昔廌歈柜媴式耶 殛F養旚z彀式 祌柼擔蘞浀#Aw MQSeries 鬞昔碉式膣刖耶 o譇F養雚赴暖酨獛 鑅齗赳詰赴暖珫眃赳僔裲珥C 劑F戍茫臡長胃 * MQSeries 次劑 5.2 * MQSeries 睦擋獛搨鬞祊貘 (AMI) * DB2 MQSeries Function 腺o茫臡戍欏僝鬞耍巷囓酀MQSeries耶 腺削蒟P MQSeries 茨饎F戍鵏耍巷灛 http://www.ibm.com/software/data/db2/udb/ide 戍鵏沮蠮耶 ------------------------------------------------------------------------ 20.3 OLE DB 茨饎F 殛F灨饎鞮擔柜譇式耍雚儭 Microsoft OLE DB 癸戍駙柜譇定 虪舌伸耶 駙鴉耍鞮養擔柜譇 DB2 式耍墨 OLE DB 式黽虪耰 戍耍 鞮養擔 OLE DB 式戍蘞浀#Co譇F養雚赴暖酨獛鑅齗赳 詰赴暖珫眃赳僔裲珥C 劑F戍茫臡長胃 * OLE DB 虪舌 (愩 Oracle 詰 Microsoft SQL Server) * OLE DB 儭閱 腺削蒟P OLE DB 茨饎F戍鵏耍巷灛 http://www.ibm.com/software/data/db2/udb/ide 戍鵏沮蠮耶 ------------------------------------------------------------------------ Business Intelligence 倌鷎到 * Business Intelligence 鵏 o 21.1 鑌L繘戍 Business Intelligence 鵏 * 暖珫眃扯z銳 o 22.1 序鬙 o 22.2 ]鑅 Excel 長暖僬 o 22.3 肄霿瓬鸉獛 o 22.4 鋇鴶翷 o 22.5 長 Submit OS/390 JCL 泚鏼泊獛搨 (VWPMVS) 肄霿襏 o 22.6 鶔暖削膃蝔 o 22.7 暖珫眃鬞昔 o 22.8 彀 DB2 OLAP Integration Server 珫擔歧虋枵 o 22.9 醨 Classic Connect 烈暖珫眃f黂媥 o 22.10 暖珫眃蜪呃 o 22.11 媥 Invert 黈獛搨 o 22.12 鄧 DB2 次劑 7 暖鋅z獛搨酨灥 DB2 次劑 5 + 22.12.1 騥 DB2 次劑 5 再齗 + 22.12.2 鶔鋅z獛搨歧呃 + 22.12.2.1 UNIX 暖鋅z獛搨 + 22.12.2.2 Microsoft Windows NT耑Windows 2000 碉 OS/2 暖鋅z獛搨 o 22.13 IBM ERwin 鴶翷灥鋇獛搨 + 22.13.1 洇委 + 22.13.2 n茫臡 + 22.13.3 獛搨 + 22.13.4 擔癸砰躨 + 22.13.5 枵癸砰躨赴暖珫眃赳 + 22.13.6 枵癸砰躨赴鬞悚到扯z獛搨赳 + 22.13.7 序鬙 + 22.13.8 ERwin 烈 DB2 暖珫眃戍杯 + 22.13.8.1 ERwin 烈鬞悚到扯z獛搨戍杯 o 22.14 肛赴暖珫眃赳戍巰投烈鶐 + 22.14.1 + 22.14.1.1 劑繐臡 + 22.14.1.2 Trillium n鑶豜鷑 + 22.14.1.3 醨赴Trillium 歃鑶蚼v烈赴暖珫眃赳f黂 媥 + 22.14.1.4 枵 Trillium 鴶翷 + 22.14.1.5 杯鴶翷 + 22.14.1.6 貙 + 22.14.2 紂柞 Trillium 歃鑶 JCL + 22.14.3 彀 UNIX 碉 Windows 柼紂柞 Trillium 歃鑶 Script + 22.14.4 肄霿 Trillium 歃鑶釱BJ + 22.14.5 媥蚼uTrillium 歃鑶蚼v媥蛈瑏w霿獛搨 + 22.14.6 砷Bz鎈搨 + 22.14.6.1 砷廌剽俄 + 22.14.6.2 矩 o 22.15 MQ Series 烈赴暖珫眃赳戍鬷幏 + 22.15.1 擔 MQSeries 鬞昔戍蘞浀 + 22.15.1.1 劑繐臡 + 22.15.1.2 貙 + 22.15.1.3 擔 MQSeries 鬞昔戍蘞浀 + 22.15.2 枵 MQSeries 鬞昔碉 XML 鴶翷 + 22.15.2.1 劑繐臡 + 22.15.2.2 貙 + 22.15.2.3 枵 MQSeries 鬞昔烈 XML 鴶翷 + 22.15.2.4 媥 MQSeries 媥蛈瑏w霿獛搨 + 22.15.2.5 砷廌剽俄 + 22.15.2.6 砷矩 o 22.16 Microsoft OLE DB 烈赴蘧狾A髕赳儭 + 22.16.1 擔 OLE DB 式戍蘞浀 + 22.16.2 擔 DTS 霄戍蘞浀 o 22.17 柱皪 COMMIT f黂 replace 媥 o 22.18 祅麩鷲巰 o 22.19 AIX 瓬 Solaris 鏼~蓔W Sybase 僬垢艛n戍 OPEN CLIENT o 22.20 削蜪n到鶔儘 o 22.21 3 ]肄暖僬 + 22.21.1 杯 Microsoft Access 珫戍鶗到暖僬 o 22.22 10 @暖定 + 22.22.1 膣式 DB2 UDB RUNSTATS 獛搨戍纙J歃ю悚 o 22.23 w]暖嚭定 o 22.24 暖嚭定扯z甇 o 22.25 鶔鏼擋珫暖嚭定 o 22.26 擔碉鱌絛]肄暖嚭定 o 22.27 擔次劑戍 SQL 纙J o 22.28 彀赴獛研悚赳甇珫耍鶔僬姜袛癸 o 22.29 s柱祗腦赴暖珫眃赳旨麩 o 22.30 鸉赴削蓔妝e赳 o 22.31 哀 Create DDL SQL 闉z搨 o 22.32 騥 Visual Warehouse 鸆~照 o 22.33 擔癸式瓬遭繐 o 22.34 媥 Merant ODBC X韥獛搨 o 22.35 s ODBC X韥獛搨 o 22.36 肄霿 OS/2 定珫戍暖僬姜袛癸 o 22.37 忌趜暖嚭定戍扛你 o 22.38 媥 SQL 茨饎獛搨烈 TBC_MD 削裱定 o 22.39 媥 FormatDate o 22.40 鶔砰躨]肄 o 22.41 媥蚼u擁襏式赳黈獛搨 o 22.42 @定s鼪 o 22.43 ]肄茗抑赴暖珫眃赳雚膼 o 22.44 肄霿 DB2 for VM 暖僬 o 22.45 肄霿 DB2 for VM 詰 DB2 for VSE 癸式 o 22.46 鼖擋嗀肄襶戍ル顢戠儭 o 22.47 Data Joiner 砷鋇s膣齶ガ o 22.48 暖珫眃]肄碉鸉纋柞 o 22.49 序鬙鍻Z o 22.50 酨灥僬姜M癸 o 22.51 儭戍唏 IBM 定僬咻杖s柱醳 o 22.52 彀暖珫眃珫韥擔僬 o 22.53 媥 Common Warehouse Metadata Interchange (CWMI) 枵瓬 鋇鴶翷 + 22.53.1 媽祊 + 22.53.2 枵鴶翷 + 22.53.3 彀鸉枵洢擋獛搨祌鶔s鴶翷 + 22.53.4 鋇鴶翷 o 22.54 OS/390 Runstats 洢擋獛搨纙J o 22.55 OS/390 枵洢擋獛搨纙J o 22.56 Common Warehouse Metamodel (CWM) XML 儭 o 22.57 Bz研悚擁齗 o 22.58 找研悚擁齗 o 22.59 澱繐枵 o 22.60 赴暖珫眃赳熪妮鬧閭鎣閱 o 22.61 媴尳纙J鬞 * Data Warehouse Center Application Integration Guide(潲珫次) o 23.1 Additional metadata templates + 23.1.1 Commit.tag + 23.1.1.1 Tokens + 23.1.1.2 Examples of values + 23.1.2 ForeignKey.tag + 23.1.2.1 Tokens + 23.1.2.2 Examples of values + 23.1.3 ForeignKeyAdditional.tag + 23.1.3.1 Tokens + 23.1.3.2 Examples of values + 23.1.4 PrimaryKey.tag + 23.1.4.1 Tokens + 23.1.4.2 Examples of values + 23.1.5 PrimaryKeyAdditional.tag + 23.1.5.1 Tokens + 23.1.5.2 Examples of values * 暖珫眃哎柼祗腦 o 24.1 肄霿纋柞戍式詰蘞浀 o 24.2 鸉爩嗀 AS/400 鋅z獛搨戍 Essbase VWPs o 24.3 媥豜挖G暖珫眃鴶翷甇瓬洄膣幏戍洇委甇 o 24.4 鴉鉞 o 24.5 纋柞翭韄劑 o 24.6 枵癸砰躨 o 24.7 s柱戍膣 o 24.8 枵式 o 24.9 RUNSTATS 碉 REORGANIZE TABLE 哎柼祗腦鐖幏 o 24.10 赴q何赳贄貘耍赴暖洇委赳烈赴獛赳翭韄劑 o 24.11 赴鋅z獛搨抑赳翭韄劑戍鋅z獛搨研 * DB2 OLAP Starter Kit o 25.1 OLAP Server 霠 o 25.2 儭戍鏼~鑶蛈A髕獛搨瞉 o 25.3 蘠歈 DB2 OLAP Starter Kit 彀 UNIX 柼戍揅壧 o 25.4 歧呃 OLAP Starter Kit 戍 ODBC + 25.4.1 彀 UNIX 鑶蛌[呃僬 + 25.4.1.1 歧呃 ODBC + 25.4.1.2 哀 odbc.ini + 25.4.1.3 s柱僬持 odbc.ini + 25.4.1.4 ODBC 戍 DB2 ]肄襏削 + 25.4.1.5 ODBC 戍 Oracle ]肄襏削 + 25.4.2 彀 UNIX 鑶豜W歧呃 OLAP 鴶翷悚到 + 25.4.3 彀 Windows 鑶豜W歧呃僬 + 25.4.4 彀 Windows 鑶豜W歧呃 OLAP 鴶翷悚到 + 25.4.5 彀鞮歧呃僬峙鶖 o 25.5 雚 OLAP Starter Kit 柼扯z獛搨熡枵 + 25.5.1 Starter Kit 熡枵削 o 25.6 椻擔碉歧呃 OLAP Starter Kit 戍削裱定 o 25.7 騥睦擋獛搨 OLAP Starter Kit 次劑 7.2 o 25.8 洄何齶ガ烈貙 o 25.9 OLAP 灚式柱褵鐖 EQD 噬 * 鬞悚到扯z獛搨扯z銳 o 26.1 鬞悚到扯z獛搨鱌絛]肄洢擋獛搨 + 26.1.1 + 26.1.2 次v齶ガ + 26.1.3 揅壧齶ガ o 26.2 鄧 DB2 次劑 7 鬞悚到扯z獛搨酨灥 DB2 次劑 5 鬞悚到 o 26.3 ]鑅鬞悚到 o 26.4 烈擂恙黈鴶翷 o 26.5 媥 flgnxoln 銻黈鴶翷 o 26.6 媥 MDISDGC 銻黈鴶翷 o 26.7 碰駒獛搨 * Information Catalog Manager Programming Guide and Reference(潲珫次) o 27.1 Information Catalog Manager Reason Codes * 鬞悚到扯z獛搨媥豜銳 * 鬞悚到扯z獛搨胃哎柼鬞昔 o 29.1 鬞昔 FLG0260E o 29.2 鬞昔 FLG0051E o 29.3 鬞昔 FLG0003E o 29.4 鬞昔 FLG0372E o 29.5 鬞昔 FLG0615E * 鬞悚到扯z獛搨胃哎柼祗腦 o 30.1 Web 鬞悚到扯z獛搨 * DB2 Warehouse Manager 揅壧銳 o 31.1 暖黈獛搨戍n茫臡 o 31.2 SAP R/3 Connector + 31.2.1 揅壧樺讘麩 o 31.3 Web Connector + 31.3.1 揅壧樺讘麩 * Query Patroller Administration Guide(潲珫次) o 32.1 DB2 Query Patroller Client is a Separate Component o 32.2 Migrating from Version 6 of DB2 Query Patroller Using dqpmigrate o 32.3 Enabling Query Management o 32.4 Location of Table Space for Control Tables o 32.5 New Parameters for dqpstart Command o 32.6 New Parameter for iwm_cmd Command o 32.7 New Registry Variable: DQP_RECOVERY_INTERVAL o 32.8 Starting Query Administrator o 32.9 User Administration o 32.10 Creating a Job Queue o 32.11 Using the Command Line Interface o 32.12 Query Enabler Notes o 32.13 DB2 Query Patroller Tracker may Return a Blank Column Page o 32.14 Query Patroller and Replication Tools o 32.15 Appendix B. Troubleshooting DB2 Query Patroller Clients ------------------------------------------------------------------------ Business Intelligence 鵏 ------------------------------------------------------------------------ 21.1 鑌L繘戍 Business Intelligence 鵏 FixPak 2 霄服柅繘L戍 Business Intelligence 鵏瓬暖珫眃削裱 定 (鶔儘柅\愫次劑 7.1 珫詻酨彀戍齶ガ)耶長柅矧擋繘L戍暖珫眃削 定耍 巷鸉柰媴醳胃 愩刖鞮腮冀揅壧削裱定耍巷媥蚼u柜譇纙J赳熪妮鬧鉈擔s戍削裱定耶 柜柰 礤絛耍 灥 獛搨鐖 --> IBM DB2 --> 柜譇纙J耶 愩刖鞮彀樺容洄揅壧柅削裱定耍巷醨削裱定 DWCTBC耑TBC_MD 瓬 TBC 鵛鞥耶 愩刖鞮削裱定s柱柅摃繐奚酨戍耍巷彀鵛鞥定祌容醨樵耶礔 繐鵛鞥o柧譇削裱定胃 1. 礤鼖 DB2 祺銻甇耍柜柰礤絛耍 嫀灥 獛搨鐖 --> IBM DB2 --> 祺銻甇 耶 2. 彀 DB2 祺銻甇珫耍枵柰媴柧祺銻 (枵臠柜 Enter)胃 db2 drop database dwctbc db2 drop database tbc_md db2 drop database tbc 3. DB2 祺銻甇耶 4. 媥蚼u柜譇纙J赳熪妮鬧鉈擔s戍削裱定耶柜柰 礤絛耍 灥 獛搨 鐖 --> IBM DB2 --> 柜譇纙J耶 ------------------------------------------------------------------------ 暖珫眃扯z銳 ------------------------------------------------------------------------ 22.1 序鬙 暖珫眃序鬙鬞鵱 DB2 Troubleshooting Guide耶 ------------------------------------------------------------------------ 22.2 ]鑅 Excel 長暖僬 彀赴 3 ]肄暖僬垠v戍赴彀 Windows NT 柼]鑅唏 DB2 定暖僬 赳 珫耍嗀 Microsoft Excel 戍沮蠮鍇柜譇纙J耶s戍纙Jず彀鄧柰戍纙J 3 祌 珫耶 愩刖鞮儘彀媥 Microsoft Excel 95/97 ODBC X韥獛搨酨灥 Excel 灚式耍鞮澱鏺 長灚式珫戍臠譇泚鏼式擔柜譇洄祺巰戍式耶礔繐長臠柜譇泚鏼式擔洄祺巰戍 式胃 1. 灥鞮繐戍托碉媴耶 2. 柜柰 Excel ---> 麰枵 ---> 巰投 ---> 肄霿耶 3. 巷俊砸赴肄霿巰投赳甇戍赴囓酯v霄鰗柅鞮彀纙J 1 珫詻灥戍 耶 愩刖鑭嗀耍巷柜柰赴囓酯v瑔k戍媥耍鉧]鰗詻嗀鞮洄灥戍 耶 4. 長洄癸韄戍枵巰投 (詰媥釸w]巰投)耶 5. 柜柰赴俊肄赳耶 ------------------------------------------------------------------------ 22.3 肄霿瓬鸉獛 彀赴 5 肄霿瓬鸉獛赳戍赴雚暖珫眃鴉鼖韥纙J赳珫耍 巷圳N彀 暖再齗泚鏼霠瓬鋅z獛搨抑柼茫繐 JDK 1.1.8 詰鶔s戍次劑耍 愩刖鞮鼖韥戍纙J 嗀祅憒抖W投耶 ------------------------------------------------------------------------ 22.4 鋇鴶翷 彀 12 赴鋇瓬枵暖珫眃鴶翷赳戍赴醨鴶翷鋇癸砰躨 赳o柜躒珫耍纙J 5 睦愩柰詻胃 愩刖鞮Q鋇烈鞮儘鋇祌獛虎戍獛式鬞耍 巷M枵獛式耶 ------------------------------------------------------------------------ 22.5 長 Submit OS/390 JCL 泚鏼泊獛搨 (VWPMVS) 肄霿襏 彀 180 贄耍赴肄霿 Submit OS/390 JCL 泚鏼泊獛搨赳(VWPMVS) 躒洇纙J 8耍 祗腦彀 JES 嵥柜譇到柰肄霿 .netrc 耶欑獛搨峨擔柅 .netrc 耶 愩刖o譇酨彀耍欑獛搨|彀鱌絛到柰擔擂耶 愩刖 .netrc 洄鑌酨彀耍 屑欑獛搨|鶔{酨戍巰虋擔s耶獛搨蘠歈Bz獛耍s擔戍 .netrc |Q飁耍嫀鄏孚戍巰鶔長 .netrc耶 ------------------------------------------------------------------------ 22.6 鶔暖削膃蝔 * 彀暖削膃蝔嬥妣A赴照碉削蜧y翷赳柜躒珫耍僬咻〝戍媴 洇鰗 GEOGRAPHIES式耶 * 彀暖削膃蝔鴞妣u共纙J赳柜躒珫耍共恙研搨獛洇耍柰媴闉z搨 板儘俊戍耍廅長癸式板彀鞮共鵃灚研搨纙J詻擔胃 暖珫眃礤絛擔癸式耍虋ず灁甇耶 ------------------------------------------------------------------------ 22.7 暖珫眃鬞昔 彀 Microsoft Windows NT 瓬 Windows 2000 柼耍赴暖珫眃赳|醨麩韄彀 鑶蛈杜麩矩珫耶麩 ID |睦赴暖珫眃赳戍鬞昔俄柼耶嗀赴 暖珫眃赳鬞昔戍鬞耍巷囓酀 鬞昔囓楯銳耶 ------------------------------------------------------------------------ 22.8 彀 DB2 OLAP Integration Server 珫擔歧虋枵 315 贄戍 20 嗀砷耶柰媴銻浂板儘俊胃 "C:\IS\bin\olapicmd" < "C:\IS\Batch\my_script.script" > "C:\IS\Batch\my_script.log" 礔尚珫戍到巰投珫鰗嗀曉 (愩胃Program Files)耍鞮澱鏺媥袪矧襶服搳 "C:\IS\bin\olapicmd"耶 ------------------------------------------------------------------------ 22.9 醨 Classic Connect 烈暖珫眃f黂媥 * 彀赴衣到 F 醨 Classic Connect 烈暖珫眃f黂媥蚼v珫耍 359 贄戍 赴揅壧 CROSS ACCESS ODBC X韥獛搨赳躒戍洇委洄長柰媴鼀翷胃 鸉 DB2 Warehouse Manager 次劑 7 戍椻繘揅壧耍鄧揅壧 CROSS ACCESS ODBC X韥獛搨耍虋灥赴Classic Connect X韥獛搨赳祅麩耶殛X韥獛搨竀 DB2 Warehouse Manager 癸揅壧戍柜倌鰣C CROSS ACCESS ODBC X韥獛搨|Q揅壧 SQLLIB 到戍 ODBC32 氡到珫耶 彀揅壧蘠歈耍鞮澱鏺椻醨X韥獛搨戍尚 (蜙p耍C:\Program Files\SQLLIB\ ODBC32)閭 PATH 鑶袚耶愩刖鞮洄揅壧擂次劑戍 CROSS ACCESS ODBC X韥獛搨耍 ...\SQLLIB\ODBC32\ 尚舅擂次劑尚戍容貘耶鏼~鑶釳| 擋霄服 CROSS ACCESS ODBC X韥獛搨戍尚珫戍柜譇到耶 * 柰媴獛睦欑繐閭 赴衣到 F 醨 Classic Connect 烈暖珫眃f黂 擋赳珫胃 揅壧 Classic Connect ODBC X韥獛搨胃 1. 麰枵 Warehouse Manager CD-ROM 麾忘鼭珫耶 熪妮鬧餪|礤鼖耶 2. 柜柰熪妮鬧戍揅壧耶 3. 彀赴灥恙赳甇珫耍巷俊肄灥柅 DB2 Warehouse Manager 耍 潒柜柰柰柜纙耶 4. 彀赴灥揅壧ю悚赳甇珫耍巷灥椻繘揅壧耍 潒柜柰柰柜纙耶 5. 彀赴灥祅麩赳甇珫耍灥 Classic Connect X韥獛搨瓬 暖鋅z獛 搨耍M詻嗀擂戍耍潒柜柰柰柜纙耶 6. 彀赴礤絛盎赳甇耍泥鞮戍耶愩刖鞮繐鶔摃醳耍 巷 柼柜纙廌繐鶔醳戍甇耶柜柰柰柜纙耍礤絛揅壧耶 ------------------------------------------------------------------------ 22.10 暖珫眃蜪呃 彀 371 贄戍赴衣到 G 暖珫眃蜪呃赳珫耍 式珫嗀柜譇儘俊戍醳耶 C:\Program Files\SQLLIB\ODBC32虋鑭嗀閭 PATH 耶 PATH 詻鷽 戍鸅柜鶔s長 C:\Program Files\SQLLIB\BIN耶 ------------------------------------------------------------------------ 22.11 媥 Invert 黈獛搨 岩珫 Invert 黈獛搨養鄧拚鶅囓鉈擔癸式耍 椷板擂鑭嗀擁戍 癸式|嗀齔戍鋇托耍澱鏺彀癸式珫腦曉戍擔o托耶 ------------------------------------------------------------------------ 22.12 鄧 DB2 次劑 7 暖鋅z獛搨酨灥 DB2 次劑 5 DB2 次劑 7 暖鋅z獛搨墨 DB2 次劑 7 揅壧獛歧呃耍 儭 DB2 次劑 6 碉 DB2 次劑 7 戍酨灥耶儵酨灥 DB2 次劑 5 戍耍鞮澱鏺灥柰媴珫柜醳 妄胃 * 騥 DB2 次劑 5 再齗 DB2 次劑 6 詰 DB2 次劑 7耶 * 腺譂’李@~鑶豜砎鋅z獛搨歧呃耍養鄧酨灥 DB2 次劑 5 戍耶 DB2 次劑 7 暖鋅z獛搨儭 DB2 次劑 2 詰祌容次劑戍酨灥耶 22.12.1 騥 DB2 次劑 5 再齗 嗀騥 DB2 次劑 5 再齗戍鬞耍巷囓酀鏼~鑶蛈 DB2 Universal Database t枵耶 22.12.2 鶔鋅z獛搨歧呃 柰媴鬞祗腦愩摃鶔嵧鏼~鑶豜齙Nz獛搨歧呃耶 騥 DB2 再齗 DB2 次劑 6 詰鶔s次耍颳歧呃戍鶔耶 22.12.2.1 UNIX 暖鋅z獛搨 ]肄 UNIX 暖鋅z獛搨耍CLI 詰 ODBC 酨灥銻 DB2 次劑 5 祌戍酨灥胃 1. 揅壧 DB2 次劑 6 鸉繾雚膼鱄C椻柰媴 URL 灥雚膼龢U耍養鄧隳鸉 繾雚膼鱄G http://www.ibm.com/software/data/db2/udb/support 2. 鶔s暖鋅z獛搨歧呃耍DB2INSTANCE 嵢 DB2 次劑 6 蒤C 3. 哀 DB2 次劑膃孛蜙定耍酨灥暖鋅z獛搨耶 4. 熪鋇鋅z鎈鏮獛搨獛 ID 戍飁銻耍欘鋅z鎈鏮獛搨獛耶鋅z鎈鏮獛搨 醨椻韥薿s鼖韥耶飁獛茫繐嗀 root v貙耶 22.12.2.2 Microsoft Windows NT耑Windows 2000 碉 OS/2 暖鋅z獛搨 ]肄 Microsoft NT耑Windows 2000 詰 OS/2 暖鋅z獛搨耍酨灥 DB2 次劑 5 戍 耶 1. 彀鑭嗀揅壧 DB2 次劑 7.2 暖鋅z獛搨戍泚鏼霠耍揅壧 DB2 Connect Enterprise Edition 次劑 6耶 DB2 Connect Enterprise Edition 板 DB2 Universal Database Enterprise Edition 碉 DB2 Universal Database Enterprise - Extended Edition 戍柜 牁耶愩刖揅壧o DB2 恙戍次劑 6耍潲鏺駙鴉揅壧 DB2 Connect耶 貙: 彀虎嵥戍 Windows NT 詰 OS/2 泚鏼霠耍揅壧 DB2 愫薿次劑耶 鞮養 鄧彀擂 Windows NT 泚鏼霠耑 OS/2 泚鏼霠詰 UNIX 泚鏼霠柼揅壧 DB2 Connect耶 2. 歧呃暖鋅z獛搨碉 DB2 Connect 次劑 6耍酨灥 DB2 次劑 5 戍耶欏僝 鬞耍巷囓酀 DB2 Connect 媥豜銳耶鄧柰長澱繐纙J戍[胃 a. 彀 DB2 次劑 5 鑶蚼A媥 DB2 祺銻Bz齗哀次劑 5 戍定耍酨 灥暖鋅z獛搨耶 b. 彀 DB2 Connect 鑶蚼A媥 DB2 祺銻Bz齗灁哀胃 + DB2 次劑 5 鑶蛈 TCP/IP 躒貂 + DB2 次劑 5 鑶蛈材定 + DB2 次劑 5 鑶蛈 DCS 熡到醳 c. 腺暖鋅z獛搨泚鏼霠耍媥 DB2 祺銻Bz齗灁哀胃 + DB2 Connect 鑶蛈 TCP/IP 躒貂 + DB2 Connect 鑶蛈材定 嗀哀定戍鬞耍巷囓酀 DB2 Universal Database 揅壧烈歧呃銬 3. 腺暖鋅z獛搨泚鏼霠耍醨 DB2 CLI 和壧n碉zL DB2 Connect 詻酨灥戍嵧 譇定灁s膣耶 柰媴 DB2 銻虪s膣 v5database 戍削蒤A 柜譇糶]詫戍 DB2 次劑 5 戍 定耶 媥 DB2 祺銻Bz齗熪鋇柰媴銻耶db2cli.lst 瓬 db2ajgrt 戍 鑅彀 \sqllib\bnd 到珫耶 db2 connect to v5database user userid using password db2 bind db2ajgrt.bnd db2 bind @db2cli.lst blocking all grant public 珫 userid 板 v5database 戍媥蛈 ID耍 椴 password 板媥蛈 ID 戍q 俄耶 db2cli.list Qs膣 DB2 次劑 5 定耍|熪擁砷耶熪擁砷耍板廅長 殛歧呃虋儭毠悚旨麩耶o醳砷|洋T暖鋅z獛搨 DB2 次劑 5 定戍酨灥耶 茫繐嗀 DB2 Universal Database 次劑 5 戍 FixPak 14 (腺 2000 搤 6 熪 )耍 浂zL DB2 Connect 靲s灥 DB2 次劑 5 戍耶巷囓 FixPak 洇 戍 APAR 哀襶 JR14507耶 ------------------------------------------------------------------------ 22.13 IBM ERwin 鴶翷灥鋇獛搨 22.13.1 洇委 n茫臡 獛搨 擔癸砰躨 枵癸砰躨赴暖珫眃赳 枵癸砰躨赴鬞悚到扯z獛搨赳 序鬙 ERwin 赴暖珫眃赳杯 ERwin 赴鬞悚到扯z獛搨赳杯 劑躒祗腦愩摃媥 IBM ERwin Metadata Extract Program 僔q ER1 灥鋇鴶翷 耍鄧瓬擔赴DB2 暖珫眃赳詰赴鬞悚到扯z獛搨 (DataGuide)赳癸砰躨 耶 鴶翷灥鋇獛搨|灥鋇詻嗀旨麩 (愩暖酨腺枵 ER1 珫戍定耑式瓬托 )耍 虋遮醨鴶翷研悚柞枵赴暖珫眃赳詰赴鬞悚到扯z獛搨赳癸砰躨 珫耶擔旨麩祌繾 (愩定碉式祌繾耍鄧瓬式碉祌繾) 戍詻嗀睦娩 癸膌耍柛|跌灥瓬擔墨瓬竀竘槷蠾妣u鬞悚到扯z獛搨赳祌閮研悚耶 鰗定戍式椴躨耍|擔柜譇巰長 DATABASE 戍w]定耶鰗找戍式 椴躨耍|媥釸w]找 USERID耶研悚巰投椴躨耍|媥 ER1 巰耶嗀 ER1 詫杯赴暖珫眃赳詰赴鬞悚到扯z獛搨赳戍欏僝鬞耍巷囓酀赴ERwin 烈 DB2 暖珫眃戍杯赳碉赴ERwin 烈鬞悚到扯z獛搨戍杯赳耶 鴶翷灥鋇獛搨儭爩嗀皖搨定戍詻嗀 ER1 研悚耍 霄服 DB2耑Informix耑 Oracle耑Sybase耑ODBC 僬峙 Microsoft SQL Server耶 22.13.2 n茫臡 鑶蚽薚幏柰媴戍n茫臡鄧鸉鴶翷灥鋇獛搨胃 * Windows NT 4.0 詰鄧柼 * ERwin 3.5.2 (壧嗀 Service Pack 3 Build 466) 鑶蚽薚幏柰媴戍n茫臡鄧枵 ERwin 癸砰躨胃 暖珫眃胃 IBM DB2 Universal Database 次劑 7.2 鬞悚到扯z獛搨胃 IBM DB2 Warehouse Manager 次劑 7.2 研吏癸砰躨 (.tag) 澱鏺腺 VWS_TEMPLATES 詻戍到珫耶 ю悚癸砰躨 (.typ) 澱鏺腺 DGWPATH 詻戍到珫耶 22.13.3 獛搨 鴶翷灥鋇獛搨揅壧彀 IBM DB2 到戍 sqllib\bin 歃到珫耶 殛獛搨醨柰媴 揅壧鞮戍到珫胃 flgerwin.exe 遭繐戍騥獛搨 erwext.dll 癸砰躨擁齗 DLL cdmerwsn.dll ERwin API 鴉柳ю顢 DLL 礔繐鼖韥灥鋇獛搨耍巷雚銻柼熪鋇 flgerwin 銻耶 22.13.4 擔癸砰躨 礔繐擔赴暖珫眃赳詰赴鬞悚到扯z獛搨赳癸砰躨耍 巷鸉 flgerwin.exe 獛搨虋虪譇遭繐囓耶柜譇囓長鴶翷椻珫灥鋇戍 ER1 耶柫譇囓長鋇癸砰躨戍巰投耶稗w]耍灥鋇獛搨醨 MERGE 囓閭枵赴 暖珫眃赳癸砰躨珫耶 銻砰妄長胃 flgerwin inputFile.er1 outputFile.tag [-dwc] [-icm] [ -m] [-u] [-a] [-d] 擔枉扛找戍銻砰妄長胃 flgerwin inputFile.er1 outputFile.tag [-dwc] [-starschema] -dwc 巷擔赴暖珫眃赳癸砰躨耶鞮養媥 -dwc 戍擋詫囓 -m 烈 -starschema耶 -icm 巷擔赴鬞悚到扯z獛搨赳癸砰躨耶 -icm 養擋戍擋詫囓長 -m耑-u 耑-a 瓬 -d耶 -starschema 巷擔 ERwin 研悚枉扛找癸砰躨耶 -m 肄旨麩柼戍韥鏼長 MERGE耶 -u 肄旨麩柼戍韥鏼長 UPDATE耶 -a 肄旨麩柼戍韥鏼長 ADD耶 -d 肄旨麩柼戍韥鏼長 DELETE耶 鴶翷灥鋇獛搨媥蛈妒O鴶翷椴唏耶蘠歈 ERwin 癸砰躨枵瓬媥 癸式 祌容耍鞮澱鏺幏q俄瓬媥蛈 ID耶醨鴶翷烈{酨戍定幏 胃 彀洇委 --> 定 --> 媥蛈 ID 柰鶔赴暖珫眃赳 擋舌 ID 碉q俄耍 惄幏洄幏戍定媥蛈 ID 碉q俄耶 zL鴶翷灥鋇獛搨耍鞮養鄧枵癸砰躨鏼長癸耶 彀稒s枵戍鴶翷 珫耍腮冀鯔J柜式耶鞮養鄧擋閮詰式妄照o 式耍潒擔柜譇 暖纙J僣鯔J雚 ERwin 枵戍式肄霿耶 枵 ER1 澱鏺B腺養柞枵扛你耶鸉鴶翷灥鋇獛搨耍 ER1 饓歈鸅 戌爭A耶礔繐鶔長伸/柞枵研搨耍巷媥軝p柰詻削蓁蒝戍銻胃 attrib -r erwinsimplemode.er1 珫耍erwinsimplemode.er1 板 ERwin 貕戠戍巰投耶 礔 ER1 洄媥袑u{ ERwin 藶沮鏼~珫耍詰灝鵃欣譇砷扛如耍 屑鴶翷 灥鋇獛搨鄧鸅戌爭A暖酨 ER1 耶礔 ER1 B腺鸅戌爭A耍 鞮|搌柜譇蘘` 獛搨砷鬞昔耶鴶翷灥鋇獛搨|ず容Bz戍式巰投耶 ∴y翷灥鋇 獛搨蘠歈Bz耍鞮|搌柜屑囓楯鬞昔耶 ♂z墨醨式椻韥膣幏歈式鉈擔枉扛找耍 茫繐柜沮繾浂蘠歈 Bz獛耍椴詻茫繐戍繾鞮媥蛈圻〝椴肄耶 彀Bz獛齔繾耍椻韥膣幏 長坐耶暖酨祌耍椻韥膣幏|歈艨耶 媥軝蕖竘擁戍貙巰投鄎T奚貙巰投板鸅柜戍耶 彀Bz獛齔繾耍鞮|搌鬞昔 "熪{薿戍托耶 托醨潲妄Q灥鋇耶" o板柜譇 囓楯鬞昔耍虋洋T灥鋇獛搨戍鐀顟蘠歈耶 ▽~鉞戍巰投烈容詻Bz式珫 戍托祌巰投虎嵥耍|ず殛鬞昔耶 22.13.5 枵癸砰躨赴暖珫眃赳 鞮養鄧枵癸砰躨赴暖珫眃赳耶鞮養鄧媥蚼u暖珫眃赳詰祺銻 耶 礔繐媥蚼u暖珫眃赳枵癸砰躨耍巷胃 1. 柜柰 礤絛 --> 獛搨鐖 --> IBM DB2 --> 嚭珫眃耶饓|礤鼖 DB2赴嚭珫 眃赳耶 2. 礤鼖赴暖珫眃赳虋熡枵耶 3. 彀暖柼柜柰餒耶饓|礤鼖赴枵赳甇耶 4. 柜柰 枵鴶翷 -> ERwin耶饓養礤鼖枵鴶翷甇耶 5. 彀枵珫耍枵枵癸砰躨戍巰投耍虋柜柰俊肄耶 6. 灥鋇枉扛找耍鄧肄霿 ERwin 枉扛找鴶翷研悚長暖找耶 蘠歈枵祌耍鞮養鄧柜柰照 --> 駻s鄧照s戍纙J耶 礔繐媥袑R銻枵癸砰躨耍巷胃 iwh2imp2 tag-filename log-pathname target-control-db userid password tag-filename 癸砰躨戍蘠鬷尚碉巰投耶 log-pathname 矩戍蘠鬷尚巰投耶 target-control-db 枵戍癸定巰投耶 userid 擋靲s灥嚭定戍媥蛈 ID耶 password 擋靲s灥嚭定戍q俄耶 礔繐鶔 DB2 定肄霿悹歈長赴暖珫眃赳珫戍柜譇僬垠A 鞮養鄧鶔癸 砰躨胃 * 黳鞮繐鏼長僬咻杜C柜譇定耍醨 ISWH 癸雚 ISWH(Y) 鶔長 ISWH(N)耶 * 黳鞮繐鏼長僬咻杜C柜譇定耍醨娩癸雚 :RELTYPE.TYPE(LINK) SOURCETYPE(SCGTARIR) TARGETYPE(DATABASE) 鶔長 :RELTYPE.TYPE(LINK) SOURCETYPE(SCGSRCIR) TARGETYPE(DATABASE)耶 枵癸砰躨耍鞮|搌柰媴鬞昔胃 Message: DWC13238E The object of type "COLUMN" identified by "DBNAME(___) OWNER(___) TABLE(___) COLUMNS(___)" is defined twice in the tag language file. o板柜譇囓楯鬞昔耍鞮戍枵洄鐀顟蘠歈耶 礔鞮嗀戍爩嗀嵥巰戍鴉鉞耍詰 嗀戍爩嗀兌跛洋T戍ю洄祺巰托耍 詰擂ю戍餼如耍鞮|搌殛鬞昔耶 照泥鞮戍研悚板騶嗀薿戍托巰投耍 潒灁譂’妨殢ぉC 22.13.6 枵癸砰躨赴鬞悚到扯z獛搨赳 枵癸砰躨赴鬞悚到扯z獛搨赳嗀譇妄耶 鞮養鄧媥蚼u鬞悚到扯z 舌赳詰媥蛃銻耶 媥蚼u鬞悚到扯z舌赳僳枵癸砰躨胃 1. 柜柰礤絛 --> 獛搨鐖 --> DB2 --> 鬞悚到扯z獛搨耶 2. 柜柰悚到 --> 枵耶饓|礤鼖赴枵赳甇耶 3. 柜柰餬僬j餬癸砰躨耍潒柜柰枵耶 蘠歈枵祌耍鞮養鄧柰遭搣媥耍o|礤鼖柜譇甇耍ず詻嗀枵戍研悚瓬 定耶 礔繐媥袑R銻祊貘枵癸砰躨耍巷枵柰媴銻胃 DGUIDE /USERID userid /PASSWORD password /DGNAME dgname /IMPORT filename /LOGFILE filename /ADMIN /RESTART (B|C) /USERID 擋靲s灥嚭定戍媥蛈 ID耶 /PASSWORD 媥蛈 ID 戍q俄耶 /DGNAME 赴鬞悚到扯z獛搨赳巰投耶 /IMPORT 癸砰躨戍蘠鬷尚碉巰投耶 /LOGFILE 矩戍蘠鬷尚巰投耶 /ADMIN 鞮鄧扯z舌蟛欉n枵耶 /RESTART 枵醨雚癸砰躨礤慍B鼖韥 (醳 B)耍詰雚柼柜譇俊肄貂鼖韥 (醳 C耍w]襏)耶 22.13.7 序鬙 礔鞮搌砷鬞昔耍巷彀殛B戍鬞昔珫鬙讘砷養灥戍韥鏼耶 噬戍 ER1 枵詰癸鋇耶 鴶翷灥鋇獛搨茫繐蕶肄歃戍譇囓耶 柜譇囓長 ER1 巰耍柫譇囓 長癸鋇巰投耶 礔肄{酨戍癸砰躨巰投耍屑|Q柞耶 Windows 鑶釹蘘`獛搨耶 枵 ER1 養B腺鸅戌爭A耶礔暖酨 ER1 熪擁齶ガ耍椴遮鴶翷灥鋇獛搨 醨欑 鑅腺鸅收蜙倔洐A屑|熪擁殛餼如耶巷彀銻 Shell 珫熪鋇柰媴銻胃 attrib -r inputFile.er1 鄧醨 ER1 扛你鶔長伸/柞枵耶 潲妄礤鼖癸砰躨耶 照泥鑶豜疪潲y歈潲妄彀{忪忘鼭礤鼖詰擔戍摃齶ガ耶 研吏戍尚耶 冀]肄 VWS_TEMPLATES耶照泥赴暖珫眃赳板騶洄揅壧耶 ю悚戍尚耶 冀]肄 DGWPATH耶照泥赴暖珫眃赳板騶洄揅壧耶 冀儭戍再齗次劑胃... 鞮覃槷蕅珫灥鋇戍枵 ER1 暖酨彀獛搨儭戍癸再齗柼耶 巷鼖韥 ERwin耑礤鼖 ER1 耍潒柜柰再齗 --> 癸再齗耍鄧瓬譂’圻蜀 [巷囓酀 n茫臡]耶暖酨 ER1 耶 腦戍 ERwAPI 砷耶 熪擁 ERwin API 砷耍獛搨潲妄灥隳砷戍虎鬞耶 巷俊肄 ERwin 3.5.2 洄揅 壧耶鞮澱鏺熡韄 ERwin API耶 礔繐熡韄 ERwin API耍巷雚揅壧 ERwin 獛搨詻彀戍到鸉柰媴銻胃 regsvr32 er2api32.dll耶 鞮|表鬞昔 "DllRegisterServer in er2api32.dll succeeded"耶 鞮養鄧雚赴暖珫眃赳鼖韥灥鋇獛搨耍詰雚銻 Shell 熪鋇 flgerwin 銻僔 韥灥鋇獛搨耶 灥鋇獛搨砷胃... 照泥砷鬞昔虋灥譂↖秝@耶o睚養板洇哩ˇX獛搨砷耍 巷嵢 IBM ~髕鋅 式鬑齶ガ耶 腦戍灥鋇獛搨砷耶 熪擁腦戍砷耶o睚養板洇郃砷耍巷嵢 IBM ~髕鋅式鬑齶ガ耶 灥鋇獛搨廅砷椴耶 熪擁潲妄鐀顟蘠歈灥鋇獛搨戍砷耶 巷囓酀衣閭戍砷鬞昔鄧鬙讘齶ガ耍詰皖翪 IBM ~髕鋅式耶 22.13.8 ERwin 烈 DB2 暖珫眃戍杯 劑躒祗腦遭繐 ERwin 旨麩竀砯p摃睦赴暖珫眃赳癸胃 定 - WarehouseDatabase.tag 詰 SourceDatabase.tag ERwin 祺銻癸 暖珫眃 徫禾W投 NAME 暖僬姜郬暖癸戍巰投 徫仰@舌 RESPNSBL 皖翪 定巰投 DBNAME 定巰投 定次劑 DBTYPE 定ю悚 徫弁飛 SHRTDESC 祗腦 式 - Table.tag ERwin 祺銻癸 暖珫眃 式巰投 NAME 式巰投 式巰投 TABLES 式巰投 定巰投 DBNAME 潲 式嗀舌 OWNER 式找 式鬙 SHRTDESC 祗腦 托 - Column.tag ERwin 祺銻癸 暖珫眃 托巰投 NAME 托巰投 ю悚 NATIVEDT ю悚 LENGTH 洟 SCALE 洟 Null 醳 NULLABLE 鼪襏 () 鑅 POSNO 潲 遭繐 KEYPOSNO 潲 定巰投 DBNAME 潲 式嗀舌 OWNER 潲 式巰投 TABLES 潲 托鬙 SHRTDESC 祗腦 22.13.8.1 ERwin 烈鬞悚到扯z獛搨戍杯 劑躒祗腦遭繐 ERwin 旨麩竀砯p摃睦赴鬞悚到扯z獛搨赳癸胃 定 - Database.tag ERwin 祺銻癸 赴鬞悚到扯z獛搨赳祊貘 徫禾W投 NAME 定巰投 徫仰@舌 RESPNSBL 定嗀舌 定巰投 DBNAME 定巰投 定次劑 DBTYPE 定ю悚 徫弁飛 SHRTDESC 媽獘戍祗腦 式 - TableOrView.tag ERwin 祺銻癸 赴鬞悚到扯z獛搨赳祊貘 式巰投 NAME 式巰投 式巰投 TABLES 式巰投 定巰投 DBNAME 定巰投 式嗀舌 OWNER 式嗀舌 式鬙 SHRTDESC 媽獘戍祗腦 ERwin API TABLVIEW 肄霿鋅式柜譇蘞浀 托 - ColumnOrField.tag ERwin 祺銻癸 赴鬞悚到扯z獛搨赳祊貘 托巰投 NAME 托巰投 ю悚 DATATYPE 托戍ю悚 LENGTH 托戍 洟 SCALE 托戍洟 Null 醳 NULLS 托養騶長襏 (?) 鑅 POSNO 托鑅 遭繐 KEYPOSNO 遭繐珫托戍鑅 ERwin API ISKEY 托板騶長戍柜倌 (?) ERwin API UNIQKEY 托板騶長鸅柜 (?) 定巰投 DBNAME 定巰投 式嗀舌 OWNER 式嗀舌 式巰投 TABLES 式巰投 托鬙 SHRTDESC 媽獘戍祗腦 ERwin ISTEXT 板騶長戠 (?) ERwin API IDSRES 戍鬙吐 研悚 - Model.tag ERwin 祺銻癸 赴鬞悚到扯z獛搨赳祊貘 ER1 巰 NAME 研悚巰投 徫仰@舌 RESPNSBL 灁柜纙鬞... 徫弁飛 SHRTDESC 媽獘戍祗腦 - Entity.tag ERwin 祺銻癸 赴鬞悚到扯z獛搨赳祊貘 巰投 NAME 巰投 衣 SHRTDESC 媽獘戍祗腦 肄霿 LONGDESC 欏鉒飛 嗀舌 RESPNSBL 灁柜纙鬞... 竀 - Attribute.tag ERwin 祺銻癸 赴鬞悚到扯z獛搨赳祊貘 旨麩巰投 NAME 旨麩巰投 衣 SHRTDESC 媽獘戍祗腦 肄霿 LONGDESC 欏鉒飛 ю悚 DATATYPE 歈戍ю悚 LENGTH 歈戍 ------------------------------------------------------------------------ 22.14 肛赴暖珫眃赳戍巰投烈鶐 22.14.1 媥蚼u暖珫眃赳碉赴Trillium n鑶蚼v鄖z巰投烈鶐耶 赴Trillium n鑶蚼v板柜譇巰投烈鶐肛恙耍 養鄧薿s搨耑癸瓬 ъ巰投碉鶐耶墨雚媥蛈瑏w霿獛搨鼖韥赴Trillium 歃鑶蚼v獛搨耍鞮養鄧 彀赴暖珫眃赳珫媥蚼uTrillium n鑶蚼v耶 ♂z雚赴Trillium 歃鑶蚼v Script 詰 JCL 枵鴶翷耍|醨媥蛈瑏w霿獛搨s柱赴暖赳鯗扛膣呃珫耶 赴暖珫眃赳洄虪烈 Vality and Evolutionary Technologies, Inc 戍泚爩祌 鬷幏耶 22.14.1.1 劑繐臡 * 鞮澱鏺彀暖鋅z獛搨抑詰茗抑遭q柼揅壧赴Trillium n鑶蚼v耶 * 彀 UNIX 碉 Windows 樹鬧柼耍澱鏺醨赴Trillium n鑶蚼v戍 bin 到尚 s柱鑶袚 PATH 珫耍浂鼖擋鋅z獛搨獛僤鬾赴Trillium 歃 鑶蚼v獛搨耶 彀 UNIX 柼耍鼖韥 vwdaemon 獛祌容耍澱鏺醨 PATH 閭枵 IWH.environment 珫耍鄧蘠歈鸉耶 * 媥蛈瑔鏺爩 Trillium n戍媥郩`ル耶 柰式ずn茫臡耶 鏼~鑶 澱繐戍n UNIX Trillium n鑶 次劑 4.0 赴暖扯z獛搨赳次劑 7.2 暖鋅 z獛搨 Windows NT 烈 Windows 2000 Trillium n鑶 次劑 4.0 赴暖扯z獛搨赳次劑 7.2 暖鋅 z獛搨 鄧茗抑酨灥椴躨耍遭q澱鏺揅壧 ftpd 碉 rexecd 鎈鏮獛搨耶 OS/390 揅壧彀茗抑 OS/390 遭q戍赴Trillium n鑶蚼v次劑 4.0 揅壧彀 UNIX耑Windows NT 柼戍赴 暖扯z獛搨赳次劑 7.2 暖鋅z獛搨 澱鏺揅壧 TCP/IP 3.2 (詰鄧柼) 譧儭長茗抑遭q戍 OS/390 鏼~鑶 22.14.1.2 Trillium n鑶豜鷑 赴Trillium n鑶蚼v墨魯譇遭繐祅麩氁@胃 黈齗耑吐齗耑geocoder 瓬黂 齗耶媥釤o祅麩長柜敺\耍 鄧鸉巰投烈鶐肛鏼~耶鞮養鄧雚赴Trillium 歃鑶蚼v(柜譇媥蛈瑏w霿獛搨) 鸉o祅麩耶 黈齗 媥袪黈齗酮歭瓬醨僬拼黈歈肄戍鋇搨耶 吐齗 媥郬吐齗僝轕W投碉鶐僬拼耍鄧瓬擔僬拼虎戍鴶翷耶 廇z哀俄獛搨 (Geocoder) 媥 geocoder 醨僬拼烈犨祝再髕獛搨鷽洃耍 鄧虪摃坑 鬞耍蜙p轈麩舌詰 ZIP+4 戠俄耶geocoder 柛養zL赴郬p怠泥赳 鸉洃鏼~耶 黂齗 媥豜黂齗閞父ю巰投碉鶐鄧ル顢薿韄到耶 鞮養鄧媥豜黂齗鸉囓 閞牛耍鄧洃柜譇韄到烈柜氂O到耶 22.14.1.3 醨赴Trillium 歃鑶蚼v烈赴暖珫眃赳f黂媥 彀赴暖珫眃赳珫耍鞮養鄧枵赴Trillium 歃鑶蚼v鴶翷瓬擔媥蛈瑏w 霿獛搨纙J耶殛纙J|碰駒劑抑暖鋅z獛搨抑詰茗抑暖鋅z獛搨抑柼戍 赴Trillium 歃鑶蚼vScript耶 彀赴暖珫眃赳珫耍赴Trillium 歃鑶蚼v Script 板柜譇爩嗀僬峙袛癸戍纙J耶僬奐板擋腺柜譇赴Trillium 歃鑶 蚼v祺銻戍枵耶 癸板 Script 珫獀柜譇 Trillium 祺銻詻擔戍鋇 耶 潒耍養盎殛纙J駙柜譇Bz獛耍f黂擂纙J媥蚼C 柰ず赴Trillium 歃鑶蚼v枵瓬鋇烈赴暖珫眃赳珫僬峙袛癸 祌繾戍娩耶 1. 削 Trillium Script REM Running the converter pfcondrv -parmfile c:\tril40\us_proj\parms\pfcondrv.par REM Running the parser pfprsdrv -parmfile c:\tril40\us_proj\parms\pfprsdrv.par REM Running the Matcher cfmatdrv -parmfile c:\tril40\us_proj\parms\pfmatdrv.par 2. pfcondrv.par 戍洇委 INP_FNAME01 c:\tril40\us_proj\data\convinp INP_DDL01 c:\tril40\us_proj\dict\input.ddl 3. pfmatdrv.par 戍洇委 OUT_DDNAME c:\tril40\us_proj\data\maout DDL_OUT_FNAME c:\tril40\us_proj\dict\parseout.ddl 4. 赴Trillium 歃鑶蚼v纙J肄霿 c:\Tril40\us_proj\data\convinp (source file) -> Trillium Batch System Step -> c:\tril40\us_proj\data\maout (target file) 22.14.1.4 枵 Trillium 鴶翷 礔繐枵 Trillium 鴶翷赴暖珫眃赳胃 1. 擔赴Trillium 歃鑶 Script赳詰 JCL耶鞮養鄧媥袛摃 Script 詰 JCL 紂柞泚爩鉈擔 Script 詰 JCL 耶 2. 鄧挽k柜柰暖耍潒柜柰枵鴶翷 -> Trillium耍礤鼖 赴Trillium 歃鑶蚼v甇耶 3. 彀 Script 詰 JCL 珫耍枵鞮繐鸉戍赴Trillium 歃鑶蚼vScript 詰 JCL 祌巰投耶 4. 彀枵珫耍枵柜歃彀肄戍 Script 詰 JCL 珫鸉祌赴Trillium 歃鑶蚼v獛搨戍枵巰投耶 5. 彀枵 DDL 珫耍枵祗腦枵戍枵 DDL 祌巰投耶殛澱鏺養 彀暖鋅z獛搨抑媥蚼C 6. 彀鋇珫耍枵 Script 詰 JCL 珫獀柜譇赴Trillium 歃鑶蚼v獛 搨戍鋇巰投耶 7. 彀鋇 DDL 珫耍枵祗腦鋇戍鋇 DDL 祌巰投耶殛澱鏺養 彀暖鋅z獛搨抑媥蚼C 8. 擋戍胃彀鋇砷珫耍 枵鞮繐媥蛈夾鋇砷巰投耶殛砷| 雚赴Trillium 歃鑶蚼v獛搨跌灥鸉齔砷耶o砷韄到腺 stderr 矩 珫耶鄧劑抑遭q椴躨耍礔鞮冀彀殛肄巰投耍 屑|擔w]鋇砷耶嗀 鋇砷戍欏僝鬞耍巷囓酀遭ガ赴砷Bz鎈搨赳耶 9. 柜柰s哎癸蒤C 10. 礔鞮枵戍 Trillium 鴶翷腺暖鋅z獛搨抑柼耍 巷柜柰劑抑遭q 耶 礔鞮枵戍 Trillium 鴶翷板腺暖鋅z獛搨抑柼耍 巷柜柰茗抑遭 q耍潒肄茗抑遭q耶 巷囓酀劑躒獠戍遭ガ赴肄茗抑遭q 赳耶 11. 柜柰俊肄耍鄧枵 Trillium 鴶翷虋金馰蘧O劑耶 12. 礔 Script 詰 JCL 板雚w]鋅z獛搨抑鸉耍巷彀赴洇委赳翭韄劑珫肄擋 腺赴Trillium 歃鑶蚼v纙J戍暖鋅z獛搨抑耶 枵鏼~蘠歈耍柰媴暖旨麩|s柱赴暖赳鯗扛膣呃珫耶 * Trillium 歃鑶 scriptName 研吏耍 珫 scriptName 板 Script 詰 JCL 戍巰投耶 * 赴Trillium 歃鑶蚼vBz獛耶 * 鸉媥蛈瑏w霿獛搨戍赴Trillium 歃鑶蚼v纙J耶 * 枵鴶翷肄戍暖僬峙袛癸耶僬峙袚癸長禁肄耶 * 赴Trillium 歃鑶蚼v獛搨顪摮C 肄茗抑遭q 礔繐肄茗抑遭q耍巷胃 1. 柜柰茗抑遭q耍潒枵鰗嗀鞮枵戍鴶翷祌茗抑鑶蛈 TCP/IP 遭q 巰投耶礔灥赴茗抑遭q赳耍屑癸Q擔長劑抑耍 廅長茗抑癸 儭耶鞮養鄧s柱 FTP 纙J僓堹抑歈長肄戍劑抑癸耶 2. 彀茗抑鏼~鑶釹M珫耍柜柰鞮酨灥戍茗抑遭q祌鏼~鑶蚼C 3. 彀茗抑媥蛈 ID 珫耍枵鞮酨灥戍茗抑遭q祌媥蛈 ID耶 4. 彀q俄醳M珫耍灥擋腺詻繐酨灥戍茗抑遭q祌q俄醳胃 茫繐q俄 肄酨灥茗抑遭q戍鴶翷茫繐q俄耶 跌灥q俄 肄雚媥蛈瑏w霿獛搨跌灥q俄耶 彀q俄獛搨珫耍枵醨跌灥q俄戍q俄獛搨巰投耶 殛獛搨澱鏺 腺暖鋅z獛搨抑耍虋遮醨q俄柞枵鋇戍柜珫耶 彀獛搨囓珫耍枵q俄獛搨戍囓耶 柜譇囓澱鏺板柞枵q 俄戍鋇耶 獠枵q俄 肄獠嫀枵q俄耶 彀鸉赴Trillium 歃鑶蚼v獛搨戍纙J祌赴洇委赳翭韄劑珫耍枵q 俄耶 22.14.1.5 杯鴶翷 長柅擔僬姜M癸戍鴶翷耍Trillium |伸 Trillium DDL 耶 殛 DDL |黈歈柰媴赴暖珫眃赳ю悚胃 UNIX耑Windows NT 瓬鏼~鑶蛈 DDL ю悚 暖ю悚 ASCII CHARACTER CHARACTER(n) ASCII NUMERIC EBCDIC CHARACTER EBCIDIC NUMERIC 擂ю悚 NUMERIC : 鸅嗀赴Trillium n鑶蚼v彀 OS/390 鏼~鑶豜W鸉耍EBCDIC CHARACTER 碉 EBCIDIC NUMERIC ю悚浂儭耶 n 鋅式戠珫戍戠祅耶 22.14.1.6 貙 鞮養鄧zL赴暖珫眃赳珫戍枵鴶翷鏼~瓬 Trillium DDL耍 彀枵瓬 鋇 DDL 珫肄柜薿|耶 L耍虎睦戍暖僬峙郬暖癸彀 赴暖珫眃赳珫f黂 SQL 纙J詰削蓔妝e媥蚼C 廅長枵鴶翷鏼~|落 櫨L鬷譇韄到戍薿|耍詻鄧鞮砏養肄o耍 椷擂謰彀膣刖僬峙袛癸珫 ↓@托媥蚼C 礔肄柅砷耍屑 Script 戍巰投霄鰗摃耶 22.14.2 紂柞 Trillium 歃鑶 JCL 礔繐紂柞 Trillium 歃鑶 JCL 耍柰媴茫臡澱鏺幏耶 * 泚鏼巰投澱鏺板媥蛈 ID 閭柼柜譇戠祅耶 * 泚鏼澱鏺祝鷫洄奚蟂鋇ю顢珫耶 * 鸉赴Trillium 歃鑶蚼v獛搨戍臠柜譇泚鏼纙J耍 澱鏺枵肄霿學枮鐖 戍 SYSTERM DD 闉z搨耶殛鐖霄鰗赴Trillium 歃鑶蚼v獛搨戍砷耶 鋇 JCL 祌容耍殛鐖|椻韥Q飁耶 嗀砷Bz鎈搨瓬鬑戍欏僝鬞耍 巷囓酀遭ガ赴砷Bz鎈搨赳耶 Script 詰 JCL 彀茗抑遭q柼鸉耍澱鏺肄鋇砷胚 騶屑耍砷鬞昔 |Q韄到瓬鷫赴暖珫眃赳耶 彀 UNIX 詰 Windows 柼耍跌灥砷鬞昔 媽戍妄板紂柞駙柜譇碰駒赴Trillium 歃鑶蚼vScript 戍 Script耍虋醨癸 砷鷫鋇耶 5. 枵 SYSTERM DD 闉z搨戍泚鏼纙J削 //SYSTERM DD UNIT=&UNIT, // DISP=(MOD,CATLG,KEEP), // SPACE=(400,(20,20),,,ROUND), // DSN=&PROJPREF.&TRILVER.&PROJECT.STDERR; 22.14.3 彀 UNIX 碉 Windows 柼紂柞 Trillium 歃鑶 Script 礔赴Trillium 歃鑶蚼vScript 詰囓霄鰗枵戍虎尚耍 媥蛈瑔鏺醨 Script 礤慍戍 cd 闉z搨舅鑅 Script 戍到珫耶 22.14.4 肄霿 Trillium 歃鑶釱BJ 彀肄霿赴Trillium 歃鑶蚼v纙J祌容耍鞮澱鏺醨詻繐媥蛈 Trillium 鴶翷 枵Bz獛珫耶s柱赴Trillium 歃鑶蚼v纙JBz獛珫胃 1. 礤鼖Bz獛研悚擁齗珫戍Bz獛耶 2. 柜柰擋鱦柼戍 Trillium 歃鑶釸媥耶 3. 柜柰 Trillium 歃鑶逌{搨 -> programName耍珫 programName 板鞮繐 擋戍赴Trillium 歃鑶蚼v獛搨巰投耶 4. 柜柰熰儐柼鞮繐ず纙J詻彀戍鑅耶 5. 蘠歈 DB2 Universal Database 祗腦珫遭ガ赴肄霿柜譇鸉媥蛈瑏w霿獛搨戍纙 J赳洇戍纙J耶 22.14.5 媥蚼uTrillium 歃鑶蚼v媥蛈瑏w霿獛搨 赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨廈衣腺 Windows NT 碉 UNIX 戍赴DB2 暖珫眃赳次劑 7.2 珫耶鞮枵 Trillium 鴶翷詻擔戍赴Trillium 歃鑶 蚼v纙J耍醨鸉赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨耶 媥蛈瑏w霿獛搨|碰駒 赴Trillium 歃鑶蚼vScript 詰 JCL耶柰式霄鰗擋腺赴Trillium 歃鑶蚼vScript 詰 JCL 戍囓胃 囓 襏 茗抑遭q * localhost 長w]襏耶礔赴Trillium 歃鑶蚼v揅壧彀暖鋅z獛搨抑耍 屑媥軝襏耶 * 礔赴Trillium 歃鑶蚼v揅壧彀茗 抑鏼~鑶豜W耍屑堹抑遭q巰 投耶 Script 詰 JCL Script 詰 JCL 戍巰投 茗抑鏼~鑶 茗抑遭q柼鏼~鑶蛈抖W投耶 礔茗抑遭 q囓長 localhost耍屑鑶豜Bz殛 囓耶 嗀襏長胃 * MVS for OS/390 鏼~鑶 * UNIX for AIX耑SUN Solaris耑HP-UX 瓬 NUMA/Q 鏼~鑶 * WIN for Windows NT 詰 2000 鏼~ 鑶 茗抑媥蛈 ID 嗀鸉茗抑祺銻戍v貙祌媥蛈 ID耶礔 RemotehostName 戍襏長 localhost耍屑鑶 豜Bz殛囓耶 q俄醳 灥隳q俄戍妄耶嗀襏長胃 ENTERPASSWORD 礔q俄彀柰柜譇囓祝耍屑媥 殛襏耶 PASSWORDNOTREQUIRED 礔茫繐q俄耍屑媥軝襏耶 GETPASSWORD 礔獛搨巰投彀柰柜譇囓祝耍屑 擋殛襏耶 貙胃 * 殛獛搨澱鏺腺鋅z獛搨抑耑醨q 俄柞枵鋇戍柜珫耍 鄧瓬彀 鐀顟鸉廌 0耶 * q俄囓襏澱鏺板q俄獛搨戍巰 投耶 * 獛搨囓襏澱鏺板鄧矧襶服搳戍戠 耶 * 戠珫柜譇囓澱鏺板柞枵q俄 詻彀戍鋇巰投耶 q俄 嗀襏長q俄詰q俄獛搨巰投耶q 俄獛搨澱鏺腺暖鋅z獛搨抑耶 獛搨囓 q俄獛搨戍囓耶 鋇砷 鋇砷戍巰投耶 : 殛式珫詻嗀囓戍ю悚長 CHARACTER耶 22.14.6 砷Bz鎈搨 彀 Windows NT 瓬 UNIX 鏼~鑶豜W耍赴Trillium 歃鑶蚼v獛搨醨砷鬞昔柞枵癸 砷 (stderr) 珫耍椴彀 OS/390 鏼~鑶豜W耍板柞枵 SYSTERM 鐖珫耶 礔繐跌灥 Windows NT 詰 UNIX 鏼~鑶蛈妣uTrillium 歃鑶蚼v獛搨砷耍 澱鏺 醨癸砷薿s嵢鋇砷耶 礔繐跌灥 OS/390 鏼~鑶蛈妣uTrillium 歃鑶蚼v獛搨砷耍 JCL 澱鏺枵 SYSTERM DD 闉z搨耶 礔彀赴枵鴶翷赳甇珫肄鋇砷巰耍鞮澱鏺薿s嵢詰醨癸鋇暖 酨砷珫耶 赴暖珫眃赳|伸殛虋廌洇鰗 ERROR 戠戍詻嗀長 砷鬞昔耶 詻嗀赴Trillium 歃鑶蚼v獛搨砷鬞昔霄鰗 ERROR 戠耶 礔暖鋅z獛搨抑柼鸉戍 Script 詰 JCL 珫冀肄鋇砷耍 屑赴暖珫 眃赳|椻韥擔柜譇巰虋醨癸砷鋇薿s嵢欑耶 礔熪{摃砷耍屑 |飁砷耶砷暖酨腺 VWS_LOGGING 詻肄戍到珫耶 欑巰長 tbsudp-date- time.err耍珫 date 板擔戍鑶豜齔耍椴 time 板擔戍 鑶蚸繾耶 柰媴巰ず鋇砷巰戍搨胃 tbsudp-021501-155606.err 22.14.6.1 砷廌剽俄 砷俄 祗腦 0 歈閱 4 翭i胃q俄養潲妄耍詰 赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨酨 灥皈酨熪擁洇郃砷耶 巷照泥q俄扛你耍詰 VWS_LOGGING 詻肄到柰擔戍詻嗀皈 酨扛你耶 8 囓襏詰儘俊耶 巷囓楯矩詰 麩僓隳儘俊砰妄耶 12 赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨z L FTP s鼪茗抑遭q熪擁齶ガ耶 照 泥 FTP s哎詰遭q巰投耑媥蛈 ID 瓬 q俄耶 16 赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨潲 妄擔矩詰洇風耶 照泥媥蛈睚潲儘俊騅v瓬忪忘繾板騶 洄妣耶 20 潲妄鸉 OS/390 JCL耍詰赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨zL FTP 雚 OS/390 飁詰灥隳熪擁砷耶 照泥 JESLogFile 僛鋇砷廅耶 48 VWS_LOGGING 詰潲妄擔 矩耶 巷囓楯矩鄧灥隳欏僝鬞耶 56 潲妄鸉 Windows NT 詰 UNIX Script耍 詰赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨 s鼪茗抑遭q熪擁砷耶照泥s哎詰 遭q巰投耑媥蛈 ID 瓬q俄耶 500 Script 詰 JCL 廌砷耍詰冀廌 砷耍椷砷霄鰗耶 巷囓楯矩鄧 灥隳欏僝鬞耶彀 OS/390 柼耍巷囓酀 JESLogFile耶 22.14.6.2 矩 #uTrillium 歃鑶蚼v媥蛈瑏w霿獛搨鸉耍赴暖珫眃赳醨詻嗀巇跛鬞 暖酨彀矩珫耶欑矩巰投長 tbsudp-date-time.log耍 珫 date 板擔 戍鑶豜齔耍椴 time 板擔戍鑶蚸繾耶 欑矩擔腺鋅z獛搨抑柼墨 VWS_LOGGING 詻肄戍到珫耶 礔赴Trillium 歃鑶蚼v媥蛈瑏w霿獛搨鐀顟 鸉耍屑|飁欑矩耶 ------------------------------------------------------------------------ 22.15 MQ Series 烈赴暖珫眃赳戍鬷幏 {彀耍赴暖珫眃赳養旚z酨灥 MQSeries 鬞昔媴戍耍鏼長柜譇 DB2 定蘞浀#C虪F鉈擔 DB2 式瓬虪鞮彀珫酨灥戍 DB2 蘞浀#C臠 柜譇 MQSeries 鬞昔Q長柜譇嗀肄襶戍戠耍 拚鶅鞮戍W僦吐虋廌長 柜譇膣刖媴耶殛鴉耍竀 XML 麩戍 MQSeries 鬞昔養酨灥長暖僬垠C媥蚼u 暖珫眃赳耍鞮養鄧雚 MQSeries 鬞昔媴瓬赴DB2 XML 趁銬祅麩酨灥肄霿 (DAD)赳枵鴶翷耶 22.15.1 擔 MQSeries 鬞昔戍蘞浀 22.15.1.1 劑繐臡 DB2 Universal Database 次劑 7.2. DB2 Warehouse Manager 次劑 7.2 MQSeries 儭耶嗀 MQSeries 茫臡戍欏僝鬞耍巷囓酀MQSeries耶 嗀]肄暖 僬咻材鬞耍巷囓酀媥蛈瑏w霿戍祌揅壧鱦沮耶 22.15.1.2 貙 * ‵s暖僬拼定耍|彀鋅z獛搨鼭齗柼哀定顢巰耶 L耍& 擔 MQSeries 碉 XML 蘞浀〝耍赴暖珫眃赳糶]定顢巰柛肄霿腺雚 膼蘼瓗柼耍虋醨覃潁媥郬暖僬拼定媥蛈 ID 碉q俄僯s鼪擂耶 礔 鐀顟蘠歈耍屑|碰駒F虪鞮擔蘞浀#C礔噬韖戍耍屑|ず柜屑翭i鬞 昔耍椴鞮澱鏺彀F珫哀詰駙柜譇定顢巰耶 * 巷囓酀赴次劑圳N醳赳戍 SQL Reference 鱦沮耍鄧灥隳 MQ 鬞昔戍瘐j 耶 22.15.1.3 擔 MQSeries 鬞昔戍蘞浀 擔 MQSeries 鬞昔戍蘞浀#G 1. 雚赴暖珫眃赳甇珫耍姆礤暖僬扁虷芣呃耶 2. 姆礤霄鰗蘞浀’攻暖僬垠C 3. 鄧挽k柜柰蘞浀→蘮耍潒柜柰 MQSeries 鬞昔擔...耶 饓|礤鼖 MQSeries F耶蘠歈殛F耍|彀赴暖珫眃赳珫擔柜譇s 蘞浀#C ”肄蘞浀&耍堉|酨灥 MQSeries 媴耍虋遮彀F珫拚鶅鞮戍 W耍 醨臠柜譇鬞昔吐長嗀肄襶戍戠耶 22.15.2 枵 MQSeries 鬞昔碉 XML 鴶翷 22.15.2.1 劑繐臡 DB2 Universal Database 次劑 7.2. DB2 XML Extender 次劑 7.2. MQSeries 儭耶嗀 MQSeries 茫臡戍欏僝鬞耍巷囓酀MQSeries耶 嗀]肄暖 僬咻材鬞耍巷囓酀媥蛈瑏w霿戍祌揅壧鱦沮耶 22.15.2.2 貙 礔癸式洇酨彀遭繐詰鴉鉞耍屑枵|噬韖耶 彀枵祌容耍鞮澱鏺韥飁赴 暖赳珫o襏戍肄霿耶 22.15.2.3 枵 MQSeries 鬞昔烈 XML 鴶翷 礔繐枵 MQSeries 鴶翷赴暖珫眃赳胃 1. 暖癸定胃 o 鞮澱鏺肄霿暖癸抑鄧瓬熡韄碉鼖擋黈獛搨耶 o 鞮澱鏺 DB2 XML Extender 鼖擋暖癸抑耶欏僝鬞耍巷囓酀 DB2 XML Extender 次劑 7.2 次劑圳N醳耶 o 擔 XML Extender 酨灥肄霿 (DAD) 耍赴暖珫眃赳愩摃 醨 XML 麩洇委杯暖式耶媥 DAD 定鼖擋 XML 鐖幏耶 欏僝鬞耍巷囓酀 DB2 XML Extender 次劑 7.2 次劑圳N醳耶 2. 鄧挽k柜柰暖耍潒柜柰枵鴶翷 -> MQSeries耍礤鼖枵鴶翷 甇耶 3. 彀 AMI 再髕獛搨珫耍枵鷫詰跌灥鬞昔詻彀戍再髕獛搨貂耶 4. 彀 AMI 屑珫耍枵鬞鑶袛釱僤鬾鏼~戍屑耶 5. 彀 DAD 珫耍枵 DB2 XML Extender DAD 戍巰投耍詰柜柰虱秎 襶 (...) 僬j餬鄧灥耶殛澱鏺板劑抑耶 6. 彀暖癸抑珫耍雚槷XM珫灥鸉纙J詻彀戍暖癸抑巰投耶 暖癸抑澱鏺洄蘠歈肄霿耶 7. 彀找珫耍枵擋鉊w霿 DAD (鰗 qualifer) 珫式巰投戍找巰 投耶w]找擋鞮樺容詻灥暖癸抑戍熡枵媥蛈 ID耶 8. 癸醳胃 礔繐殛纙J彀鸉齔灥鋅癸式洇委耍巷柜柰灥鋅式洇委盭耶 礔繐殛纙J彀鸉齔K閭癸式洇委耍巷柜柰K閭式洇委盭耶 9. 柜柰俊肄耶 醨狎u枵鴶翷赳甇耶 枵鏼~蘠歈耍柰媴暖旨麩|s柱赴暖赳鯗扛膣呃珫耶 * 巰長 MQSeries 碉 XML 戍遭搣鱦耶 * 巰長 MQSeries 碉 XML 戍Bz獛耶 * 巰長 MQSeries 碉 XML 戍媥蛈瑏w霿獛搨顪摮C * 祗腦腺 DAD 珫詻嗀暖癸抑式戍肄霿耶 * .. step. * . program template. 礔暖癸鋅z獛搨抑烈劑抑鼭齗嵥耍鞮澱鏺鶔纙J囓胃 1. 鄧挽k柜柰纙J耍潒灥洇委耶 柜柰洇委翭韄劑珫戍囓癸蒤C 2. 醨 DAD 囓戍巰投鶔長茗抑暖癸鋅z獛搨抑柼虎嵥 DAD 戍巰投耶 3. 巷俊肄赴Bz獛醳赳癸蓔浀妣u鋅z獛搨抑赳霄鰗w齔戍鋅z獛搨抑耶 22.15.2.4 媥 MQSeries 媥蛈瑏w霿獛搨 MQSeries 碉 XML 暖酨獛投長 MQXMLXF耍 擂廈衣腺 Windows NT 碉 UNIX 戍赴DB2 暖珫眃赳次劑 7.2 珫耶 鞮枵 MQSeries 碉 XML 鴶翷詻擔戍纙J| 鸉殛暖酨獛耶 柰式鴶翷囓胃 囓 襏 MQSeries ServiceName 鬞昔鷫詰雚珫跌灥鋇鄏圻A髕獛搨 貂巰投耶 MQSeries PolicyName 鬞鑶袛釱僤鬾鏼~戍屑巰投耶 DAD 巰 DB2 XML Extender DAD 戍巰投 TargetTableList 鄧r貂鱦j戍纙J祌癸式M 醳 REPLACE 詰 APPEND RUN ID 纙J次劑襶俄 (譂擋韄) : 殛式珫詻嗀囓戍ю悚長 CHARACTER耶 礔醳爩嗀襏 REPLACE耍屑暖酨獛|飁癸式珫詻嗀媴耶 欑暖酨獛柛|碰駒 DB2 XML Extender 暖酨獛耍黳詻嗀{酨戍 MQSeries 鬞昔彀癸式珫枵 耶 22.15.2.5 砷廌剽俄 ↖鬾殛纙J耍暖酨獛|廌砷俄 SQLCODE -443 碉 SQLSTATE 38600耶 礔繐 巇跛砷耍巷囓酀柰式珫養戍巇跛戠耶 砷俄 祗腦 AMIRC=xxxxx;<矩巰投> xxxxx 板靲 AMI 柳戍廌剽俄耶 欏僝 鬞耍巷囓酀 MQSeries 麩耶<矩巰 投> 矩戍鑅耶 XMLRC=xxxxx;<矩巰投> xxxxx 板靲 DB2 XML Extender 戍廌剽 俄耶 嗀廌剽俄戍祗腦耍巷囓酀 DB2 XML Extender 麩耶 <矩巰投> 矩戍鑅耶 SQLCODE=xxxxx;<矩巰投> xxxxx 板鸉 SQL 繐臡廌戍唏s SQLCODE耶 <矩巰投> 矩戍 鑅耶 礔板詻嗀砷耍巷囓酀矩鄧灥隳欏僝鬞耶 22.15.2.6 砷矩 MQXMLXF 鸉耍赴暖珫眃赳醨詻嗀巇跛鬞暖酨彀矩珫耶 矩巰 投長 mqxf.log耍珫 板祝暖酨獛戍 RunID耶赴 暖珫眃赳|彀 VWS_LOGGING 詻戍到珫擔欑耶 礔冀肄霿殛 耍屑|彀皈到珫擔矩耶 礔繐 VWS_LOGGING 鋇{彀 Unix 樹鬧戍暖酨獛珫耍鞮睦欑彀 db2start 祺銻祌容耍媥 db2set 祺銻僔N VWS_LOGGING s柱 DB2ENVLIST 珫耶 柰堛禶蓁R銻削蒤C 6. 祺銻削 db2set DB2ENVLIST="AMT_DATA_PATH VWS_LOGGING" 礔纙J鐀顟鸉耍醨飁矩耶 ------------------------------------------------------------------------ 22.16 Microsoft OLE DB 烈赴蘧狾A髕赳儭 {彀耍赴暖珫眃赳養旚z酨灥 OLE DB 虪舌戍耍鏼長柜譇 DB2 定 浀#C鞮養鄧媥蚼u暖珫眃赳虪戍 OLE DB 茨饎F耍 擔 DB2 OLE DB 式 瓬虪鞮彀珫酨灥戍 DB2 蘞浀#C Microsoft Data Transformation Services (DTS) 養旚z彀 OLE DB 僬姜M癸祌繾 枵耑鋇瓬黈耍鄧鑅暖碉珫眃耶 DTS 廈 Microsoft SQL Server 揅壧耶詻嗀 DTS 鏼~暖酨彀 DTS 霄珫耍鞮養鄧媥 Microsoft OLE DB Provider for DTS Packages 僤鬾瓬 酨灥 DTS 霄耶廅長鞮養鄧酨灥 DTS 霄鏼長 OLE DB 僬垠A詻鄧柛養鄧zL OLE DB 茨饎F耍鄧 OLE DB 僬姜 擋戍虎嵥搨耍 DTS 霄擔蘞浀#C ♂z彀鸉齔酨灥蘞浀〝耍|鸉 DTS 霄耍椴遮 DTS 霄珫鏼~戍癸式歈擔戍蘞浀#C 彀赴暖珫眃赳珫擔蘞浀+鶖耍鞮養鄧媥釱擂摃蘞浀+@皇廇媥 擂耶 蜙p耍鞮養鄧彀 SQL 纙J珫醨 DB2 式烈 OLE DB 僬急幏彀柜鱌耶 ♂z 擋 SQL 纙J珫擔戍蘞浀〝耍|碰駒 DTS 虪舌虋鸉 DTS 霄耶 n茫臡胃 * DB2 Universal Database for Windows NT 次劑 7.2耍愩暖癸抑定 * DB2 Warehouse Manager 次劑 7.2 * 礔暖癸抑定洄彀次劑 7.2 祌容擔耍鞮澱鏺彀揅壧 DB2 UDB for Windows NT 次劑 7.2 祌耍鸉 db2updv7 祺銻 * ‵s暖僬拼定耍|彀暖鋅z獛搨抑柼哀定顢巰耶 L耍 鼖韥F耍赴暖珫眃赳|糶]定顢巰柛肄霿彀雚糨u鏼霠柼耍 虋 醨覃潁媥郬暖僬拼定媥蛈 ID 碉q俄僯s鼪擂耶 礔s鼪歈閱耍屑 F|鼖韥虪鞮擔蘞浀#C礔s鼪噬韖耍 屑|ず柜屑翭i鬞昔耍椴鞮澱鏺彀 F珫哀詰駙柜譇定顢巰耶 * 礔繐ル顢 DTS 霄珫蕶肄戍式耍鞮澱鏺彀擔癸式戍 DataPumpTask 祌赴泚鏼泊獛洇委赳甇戍赴醳赳癸蓔洐A灥 DSO 媴鐖虪舌耶 礔 礤鼖愫薿 DSO 媴鐖虪舌竀珥A屑譧|媥釹柜譇灥戍纙J膣刖耶 ”灥欣 蘞浀&耍|廌癸式戍媴鐖耍椷落砉z彀纙J珫擔戍擂詻嗀媴 鐖耶 * ↘F枵式巰投耍巷媥釱BJ巰投耍 ず腺欑鏼~戍赴泚鏼泊獛洇 委赳翭韄劑祌赴醳赳贄貘珫耶 * DTS 霄s鼪戠烈 dtsrun 祺銻戍砰妄虎嵥耶 22.16.1 擔 OLE DB 式戍蘞浀 擔 OLE DB 式戍蘞浀#G 1. 雚赴暖珫眃赳甇珫耍姆礤暖僬扁虷芣呃耶 2. 姆礤霄鰗蘞浀’攻暖僬垠C 3. 鄧挽k柜柰蘞浀→蘮耍潒柜柰 OLE DB 式擔耶 饓|礤鼖 OLE DB 茨饎F耶 殛F|v纙矧鞮蘠歈彀暖僬拼定珫 擔s蘞浀’李@~耶 22.16.2 擔 DTS 霄戍蘞浀 礔繐長 DTS 霄擔蘞浀#G 1. 雚赴暖珫眃赳甇珫耍姆礤暖僬扁虷芣呃耶 2. 姆礤霄鰗蘞浀’攻暖僬垠C 3. 鄧挽k柜柰蘞浀→蘮耍潒柜柰 Microsoft OLE DB Provider for DTS Packages耶 饓|礤鼖 OLE DB 茨饎F耶殛F|v纙矧鞮蘠歈彀暖僬拼定珫擔 s蘞浀’李@~耶 嗀 DTS 戍欏僝鬞耍巷囓酀 Microsoft Platform SDK 2000 麩耍 洇委長愩摃 鑅s鼪 DTS 虪舌F茫繐戍虪舌戠祌欏鉒飛ㄜC ------------------------------------------------------------------------ 22.17 柱皪 COMMIT f黂 replace 媥 彀噸ю悚長 Replace 戍纙J珫耍鸅嗀麰枵s耍浂|媥蚻W皪俊肄耶 彀柜 俊肄削洇耍絛|Q飁耶礔鞮茫繐飁椴擁矩韄到耍 巷彀鸉爩 嗀衣閭噸ю悚戍 SQL 纙J祌容耍鸉枵曉戍纙J耶 ------------------------------------------------------------------------ 22.18 祅麩鷲巰 赴暖珫眃赳彀 Windows NT 柼紂柞o胃 AGNTnnnn.Log 霄鰗鷲鬞耶nnnn 長暖鋅z獛搨戍戠獛 ID耍 拚鶅鏼~鑶 蚼A擂養鄧板 4 詰 5 耶 AGNTnnnn.Set 霄鰗鋅z獛搨戍裼]肄耶nnnn 長暖鋅z獛搨戍戠獛 ID耍拚鶅 鏼~鑶蚼A擂養鄧板 4 詰 5 耶 w]到長 x:\program files\sqllib\logging耍 珫 x 板揅壧 DB2 詻彀戍忪忘 鼭耶 ------------------------------------------------------------------------ 22.19 AIX 瓬 Solaris 鏼~蓔W Sybase 僬垢艛n戍 OPEN CLIENT 彀 3 赴]鑅暖僬垠v耍彀 AIX 貘戍式 3赴AIX 柼儭戍僬咻杉s鼪 茫臡赳鄧瓬 Solaris 鏼~蓔貘戍式 4赴Solaris 鏼~蓔W儭戍僬咻 s鼪茫臡赳珫耍赴愩摃s鼪胃赳托珫戍 Sybase 熡到睦欑霄鰗駙柜譇オ鴉戍纙J耶 擂纙Jず彀鄧柰戍纙J 3 珫耶 3. 揅壧 OPEN CLIENT 巷圳N胃彀 Windows NT 詰 Windows 2000 樹鬧柼s鼪 Sybase 僬垠A 茫繐 OPEN CLIENT耶 ------------------------------------------------------------------------ 22.20 削蜪n到鶔儘 彀 Data Warehouse Center 扯z銳柜岩戍赴 3 ]肄暖僬垠v珫腺 Driver 竀狾材尚虋儘俊耶柰媴尚浂板儘俊戍胃 6 Driver=/home/db2_07_01/3.6/odbc/lib/ivinf12.so 8 Driver=/home/db2_07_01/3.6/odbc/lib/ivsyb1112.so 10 Driver=/home/db2_07_01/3.6/lib/ivor814.so 11 Driver=/home/db2_07_01/3.6/odbc/lib/ivmsss14.so ------------------------------------------------------------------------ 22.21 3 ]肄暖僬 22.21.1 杯 Microsoft Access 珫戍鶗到暖僬 Microsoft Access 定戍鶗到彀暖珫眃珫板鄧櫹L 1GB 托毠洟戍 LONG VARCHAR ю悚鄏▽耶 礔繐儭舫戍鑶蛌[呃耍暖珫眃|兌跛櫹 L 128 KB 戍襏耶 礔繐鞻彀暖僬峙洇I跛鶗到襏耍 巷鞮彀纙J珫媥蛈 祌容耍樺醨鼪搌鶗到戍托ю悚雚 LONG VARCHAR 鶔長 CLOB耶 愩刖鞮鑭嗀鶔托戍ю悚耍摃毠腺 128 KB 戍襏|Q兌跛耶 OS/390 瓬 OS/400 茫繐儭 CLOB ю悚戍 DRDA耶 OS/390 雚 DB2 次劑 6 礤絛 儭 CLOB ю悚耶 OS/400 雚次劑 4耑爩嗀 DB FixPak 4 戍次歃 4 詰鶔s次劑 (PTF SF99104) 礤絛儭 CLOB ю悚耶 礔板 OS/400耍揅壧忪忘次劑 4耍1999 搤 2 戍次歃 4耍柛儭 CLOB ю悚耶 ------------------------------------------------------------------------ 22.22 10 @暖定 22.22.1 膣式 DB2 UDB RUNSTATS 獛搨戍纙J歃ю悚 RUNSTATS 獛搨戍纙J歃ю悚椻暖癸伸虋柞枵暖癸耶彀肄霿殛纙J戍襏祌 容耍 巷樺醨癸膣赴獛研悚赳甇戍纙J歃ю悚耶 ------------------------------------------------------------------------ 22.23 w]暖嚭定 彀 Windows NT 詰 Windows 2000 揅壧 DB2 戍齔繾耍 愩刖彀 Windows NT 鑶逌n到 珫鑭嗀ル顢鏼擋珫戍暖嚭定耍 DB2 |彀暖珫眃擔碉鱌絛]肄w] 暖嚭定耶顟擋鱌絛]肄獛耍暖珫眃擔嚭式耍鄧暖酨暖珫 眃鴶翷耶 w]暖嚭定戍巰投長 DWCTRLDB耶熡枵耍暖珫眃肄 DWCTRLDB 長 暖嚭定w]襏耶儵泥表暖嚭定戍巰投耍柜柰暖珫眃赴熡枵赳 甇戍灁藶盭耶 ------------------------------------------------------------------------ 22.24 暖嚭定扯z甇 暖嚭定扯z甇彀 Windows NT 詰 Windows 2000 揅壧悚 DB2 齔繾灁揅 壧耶顟擋殛甇鶔鏼擋珫戍暖嚭定耑擔碉鱌絛]肄s暖嚭定 耑騥 IBM Visual暖詻媥蛈攻暖嚭定耶柰媴頀柼翷戍狎韥耶 媥郬暖嚭定扯z甇容欘暖再齗耶 ------------------------------------------------------------------------ 22.25 鶔鏼擋珫暖嚭定 愩刖鞮繐媥酓@擋珫戍暖嚭定鄧鴉戍暖嚭定耍巷媥郬暖嚭 定扯z甇醨欑定熡韄長鏼擋珫戍嚭定耶熡枵暖珫眃耍肄鏼擋 珫暖嚭定鄧鴉戍巰投耍鞮|隳砷戍鬞昔耍祗腦鞮詻肄戍定碉暖 再齗詻肄戍定虎幏耶 熡韄定胃 1. 柜柰礤絛 --> 獛搨鐖 --> IBM DB2 --> 暖嚭定 2. 彀s嚭定珫耍枵鞮繐媥蛈攸夒定祌巰投耶 3. 彀找珫耍枵定茫繐戍找巰投耶 4. 彀媥蛈 ID 珫耍枵酨灥定詻茫繐戍媥蛈 ID 巰投耶 5. 彀q俄珫耍枵媥蛈 ID 戍q俄耶 6. 彀ъ鄺俄珫耍嫀柜歃枵q俄耶 7. 柜柰俊肄耶 甇奚礤鼖耶鬞昔ず熡到獛戍扛你鬞昔耶 8. 獛蘠歈耍芣甇耶 ------------------------------------------------------------------------ 22.26 擔碉鱌絛]肄暖嚭定 愩刖鞮繐擔w]襏鄧鴉戍暖嚭定耍巷彀揅壧獛齔繾擔耍詰板彀暖嚭 定扯z甇灁揅壧祌擔耶媥軝w壧獛彀烈暖再齗虎嵥碉嵥戍泚 鏼霠柼擔定耶 儵鶔揅壧齔繾詻擔暖嚭定巰投耍巷鸉椻繘揅壧耍虋鶔肄霿劑抑暖 嚭定甇洇戍巰投耶揅壧獛鄧鞮詻肄戍巰投擔定耍鱌絛]肄 暖珫眃詻媥蛈材定耍熡韄定長鏼擋珫暖嚭定耶 儵彀洄揅壧暖再齗鄧鴉戍泚鏼霠擔暖嚭定耍巷彀椻繘揅壧齔繾耍灥 暖劑抑嚭定耶揅壧獛醨擔欑定耶揅壧蘠歈耍巷22.25, 鶔鏼 擋珫暖嚭定洇戍纙J耍彀暖再齗泚鏼霠媥郬暖嚭定扯z甇耶 揅壧齔繾耍巷肄定巰投耶 鱌絛]肄暖珫眃詻媥蛈材定耍熡韄欑 定長鏼擋珫暖嚭定耶 儵彀揅壧獛擔碉鱌絛]肄暖嚭定耍巷腺暖再齗泚鏼霠媥郬暖嚭 定扯z甇耶愩刖s戍暖嚭定彀暖再齗泚鏼霠耍屑澱鏺樺彀 暖再齗泚鏼霠擔欑定虋醨擂哀枵到耶芋駽 22.25, 鶔鏼擋珫暖嚭 定洇戍纙J耶 揅壧齔繾耍巷肄定巰投耶 熡枵暖珫眃耍柜柰灁藶盭耍虋枵鏼擋珫暖嚭定巰投耶 ------------------------------------------------------------------------ 22.27 擔次劑戍 SQL 纙J 彀擔次劑戍 SQL 纙J耍腺媥郩郎p耍 鞮養|楯洌彀次劑托擔唏鸅柜戍 豯矧耍鄧柱灁飁次劑戍耶腺毠皪暖式巷楯洌o柜貂耍廅長麰枵皪戍 媴|洋T麰枵戍耶 ------------------------------------------------------------------------ 22.28 彀赴獛研悚赳甇珫耍鶔僬姜袛癸 彀赴獛研悚赳甇珫耍愩刖鶔柅僬姜袛癸耍醨|椻韥暖酨詻鷽戍鶔耶愩刖鞮 鷽柅摃擂戍鶔(洃愩s柱纙J)耍鞮澱鏺腦俊廇暖酨鶔耍鄧F學枮鶔戍 戍耶礔繐暖酨鶔耍巷柜柰 "獛 --> 暖酨"耶 ------------------------------------------------------------------------ 22.29 s柱祗腦赴暖珫眃赳旨麩 彀暖珫眃珫耍腺翭韄劑戍祗腦耍鞮養鄧肄愫F 254 譇戠祅耶殛瘐j襏灥 鋅柅哎柼祗腦珫詻肄戍瘐j耶 ------------------------------------------------------------------------ 22.30 鸉赴削蓔妝e赳 * 鞮潲妄歈閱廇鸉彀貕戠僬持媥 AS/400 鋅z獛搨戍赴削蓔妝e赳繐臡耶 潒鞮養鄧擔貕戠僬垠A 虋悹媥 AS/400 鋅z獛搨熪鋇削蓔妝e繐 臡耍椷板o醳繐臡|噬韖耶 * 彀獛研悚擁齗珫戍暖癸鸉赴削蓔妝e赳耍養|搌砷鬞昔耶 o譇砷烈暖僬垠B暖癸耑獛纙J戍鋅z獛搨抑祌養擋詫嗀耶 柜譇 纙J養擋戍鋅z獛搨抑祌媴式耍板暖僬 IR 鋅z獛搨抑耑暖癸 IR 鋅z 獛搨抑耑殛蕶顢纙J養擋戍鋅z獛搨抑鐖詻隳戍膣刖 (詻戍纙J長鋅z 獛搨抑洇委翭韄劑戍獀柜贄詻戍纙J)耶蜙p耍照鸉 FTP Put 獛搨 (VWPRCPY) 戍獛戍赴削蓔妝e赳耶鋅z獛搨抑肄霿戍鋅z獛搨抑灥獛珫詻 媥蛈杜BJ耶♂z癸鸉赴削蓔妝e赳耍q鎈媥蚳灥媴珫戍柜譇鋅 z獛搨抑耶椷板耍定@鏼~|洋T鋅z獛搨抑媴戍歃耶愩刖灥戍鋅 z獛搨抑烈僬姜袛癸戍鑶豜嵥耍削蓔妝e醨噬韖耶 ------------------------------------------------------------------------ 22.31 哀 Create DDL SQL 闉z搨 腺礤熪研搨柰耍哀癸式戍 Create DDL SQL 闉z搨耍 |表柰媴銻柤鷤駼戍 鬞昔胃" Create DDL SQL 闉z搨戍摃鶔醨瓮杯彀式肄霿詰舫戍式柼耶繐 ~胄" 鶔|瓮杯彀舫戍式柼耶落祅僤T昔耍~鶔 Create DDL 闉z搨耶 彀礤熪研搨纙J珫耍殛鬞昔戍儘次睦愩柰詻胃"Create DDL SQL 闉z搨戍摃 鶔醨瓮杯彀式肄霿珫耶繐~胄" 腺鵃灚詰擁研搨珫戍纙J耍殛鬞昔板儘俊戍耶醨纙J鵃灚研搨耍|擔 戍癸式耶暖珫眃|鶔欑式耶 ------------------------------------------------------------------------ 22.32 騥 Visual Warehouse 鸆~照 愩刖繐醨 Visual Warehouse 鴶翷嵥纙祌鸆~照騥暖珫眃耍 鞮 養彀騥暖嚭定祌容醨鸆~照共赴擁赳扛你耶愩刖鸆~照彀赴擁 赳扛你耍 擂戍獛餪|騥暖珫眃耶愩刖鸆~照彀赴擁赳扛你耍 擂餪|騥赴鵃灚赳扛你耍椴鑭嗀獛耶養醨騥纙J共赴擁赳扛你耶鞮 澱鏺樺彀暖珫眃嫀歃擔嵥纙纙J耍 潒飁騥纙J耶 ------------------------------------------------------------------------ 22.33 擔癸式瓬遭繐 暖珫眃擔殛纙J戍癸式耍虋鑭嗀擁殛癸式戍遭繐耶欣黈 獛搨耍 愩 Moving Average耍|媥袑裶擁戍式僤瑼矙僬咻〝耍僬咻〝柛鏺 繐遭繐耶彀鞮媥袛H黈獛搨擁戍式祌容耍 巷樺彀 DB2 嚭珫眃戍式柼 挽k鉊w霿殛式戍遭繐耍 潒柜柰鶔耶 ------------------------------------------------------------------------ 22.34 媥 Merant ODBC X韥獛搨 愩刖繐酨灥 Windows NT 柼戍 Microsoft SQL Server耍 巷媥 Merant ODBC X韥獛 搨鄎T砸鑶釬尚板騶霄鰗 sqllib\odbc32 到耶 ------------------------------------------------------------------------ 22.35 s ODBC X韥獛搨 愩刖鞮醨媥豜w膣酨灥 Merant ODBC 僬咻材暖珫眃 AIX 詰 Sun 鋅z獛 搨耍虋遮醨酨灥 DB2 定耍 巷鶔 .odbc.ini 珫 DB2 僬拭堛q戍 赴Driver=赳竀秮埻A愩柰詻胃 AIX胃X韥獛搨巰投長 /usr/lpp/db2_07_01/lib/db2_36.o AIX 戍削 ODBC 僬急n到胃 [SAMPLE] Driver=/usr/lpp/db2_07_01/lib/db2_36.o Description=DB2 ODBC Database Database=SAMPLE Sun胃X韥獛搨巰投長 /opt/IBMdb2/V7.1/lib/libdb2_36.so Sun 戍削 ODBC 僬急n到胃 [SAMPLE] Driver=/opt/IBMdb2/V7.1/lib/libdb2_36.so Description=DB2 ODBC Database Database=SAMPLE ------------------------------------------------------------------------ 22.36 肄霿 OS/2 定珫戍暖僬姜袛癸 肄霿 OS/2 定戍暖僬姜郬暖癸耍 巷擋毠柞戠噸枵定巰投耶 ------------------------------------------------------------------------ 22.37 忌趜暖嚭定戍扛你 DB2 嚭珫眃詰祺銻Bz齗養|鋇暖嚭定板騶嗀柜癚戍扛你耶殛扛 你鋇暖再齗鑭嗀熪鋇擂鱌絛戍鼖韥暖矩齗耶 ------------------------------------------------------------------------ 22.38 媥 SQL 茨饎獛搨烈 TBC_MD 削裱定 彀 TBC_MD 定珫詻鰗戍暖削蓔洐A鞮養鄧媥 SQL 茨饎獛搨鶔 Select Scenario SQL 纙J珫戍 SQL耍 廅長 SQL 板彀 SQL 茨饎獛搨擁祌哀 戍耶 ------------------------------------------------------------------------ 22.39 媥 FormatDate 礔繐媥 FormatDate 耍巷彀赴洇委赳翭韄劑戍赴SQL 闉z搨赳贄柼耍柜柰 鑅 SQL耍僳i SQL 纙J耶 FormatDate 戍鋇板ю悚 varchar(255)耶 鞮養雚 Function Parameters-FormatData 贄貘珫戍ю媴耍 灥齔耑繾耑詰齔/繾鶔 耶 ------------------------------------------------------------------------ 22.40 鶔砰躨]肄 彀 AIX 碉 Solaris 鏼~蓔洐A 揅壧獛|長鬞悚到]肄繐洢闟戍砰躨耍 虋 鋇 OLAP 鬷幏再齗耶愩刖鞮Q彀揅壧媥釤o砰躨耍 巷枵柰媴銻 (柜 鬷) 鄧堉擔n膣耶 彀 AIX /usr/bin/ln -sf /usr/lpp/db2_07_01/msg/locale/flgnxolv.str /usr/lpp/db2_07_01/bin/flgnxolv.str 砰躨 砰躨戍砰躨 (locale) 巰投戍搨長 xx_yy 彀 Solaris 鏼~ /usr/bin/ln -sf /opt/IBMdb2/V7.1/msg/locale/flgnxolv.str /opt/IBMdb2/V7.1/bin/flgnxolv.str 砰躨 砰躨戍砰躨 (locale) 巰投戍搨長 xx_yy ------------------------------------------------------------------------ 22.41 媥蚼u擁襏式赳黈獛搨 ♂z媥蚼u擁襏式赳黈獛搨戍鶔s襏托戍襏醳耍 黈獛搨譧鶔s式 珫鑭嗀襏戍媴耶(柛餪板耍襏長 NULL)耶♂z彀式珫麰枵擂媴耍 唏鞮薿 s鸉黈獛搨耍騶屑襏長襏耶 長柅鞻殛齶ガ耍巷鸉柰媴韥鏼胃 * 彀鱌絛鸉黈獛搨祌耍巷媥釱ˇN曄唐唻醳鄧擔詻嗀媴戍襏耶 ------------------------------------------------------------------------ 22.42 @定s鼪 DB2 再齗扯z戍定洄欘詰薿s鼖韥耍 暖再齗虋|@劑抑詰茗 抑定戍s鼪耶礔鞮繐欘詰薿s鼖韥 DB2耍巷柜欘詰薿s鼖韥暖再齗耶 ------------------------------------------------------------------------ 22.43 ]肄茗抑赴暖珫眃赳雚膼 ♂z彀爩嗀暖再齗戍擂泚鏼霠柼耍 揅壧 DB2 扯z雚膼鰳P暖泚爩僯] 肄暖珫眃扯z雚膼魕耍 鞮澱鏺s柱暖珫眃詻媴戍 TCP/IP 靇襶再髕獛搨 聤雚糨u鏼霠耶巷彀再髕獛搨s柱柰媴醳胃 vwkernel 11000/tcp ------------------------------------------------------------------------ 22.44 肄霿 DB2 for VM 暖僬 ♂z長 DB2 for VM 定 (雚 DRDA hD酨灥) 肄霿暖僬咿耍 CLOB 烈 BLOB ю悚嗀媥郬蹠胃 * 鞮媥蚴d蓔妝e鈮趷 CLOB 烈 BLOB 戍ю悚耶 * 鞮媥釱 SQL 纙J戍 CLOB 烈 BLOB ю悚戍托耶 殛貙板 DB2 for VM 次劑 5.2 再齗戍洄何貙耍潲妄媥 DRDA LOB 旨 麩 DB2 次劑 7 雚膼鱄C ------------------------------------------------------------------------ 22.45 肄霿 DB2 for VM 詰 DB2 for VSE 癸式 ♂z彀暖珫眃肄霿 DB2 for VM 詰 DB2 for VSE 癸式耍 巷灥騅烈 洢擋v貙耶DB2 for VM 烈 DB2 for VSE 虋冀儭暖珫眃擁戍 GRANT 銻砰妄耶 ------------------------------------------------------------------------ 22.46 鼖擋嗀肄襶戍ル顢戠儭 鼖擋養儭 Sybase 烈 Microsoft Windows NT 戍 SQL Server 嗀肄襶戍ル顢戠 胃巷灥 ODBC Driver Setup 翭韄劑灁藶贄貘戍 Enable Quoted Identifiers 耶 鼖擋養儭 UNIX 戍 Sybase 戍嗀肄襶戍ル顢戠耍 巷哀 .odbc.ini 珫戍 Sybase 僬姥]服s鼪竀 EQI=1耶 ------------------------------------------------------------------------ 22.47 Data Joiner 砷鋇s膣齶ガ 媥 DataJoiner 烈 DB2 7.1 次 + FixPak 2 詰鶔s次劑戍朗養|隳柜譇砷 鬞昔耍鋇s膣嗀齶ガ耶 蜙p耍彀媥 DataJoiner 僬垢P暖珫眃 7.2 次鋅z獛搨耍鞮養|熪擁 膣砷胃 DWC07356E 黳纙J "?" 戍 次劑 "0"耍ю悚 importTableNames 戍銻祌鋅z獛搨Bz獛噬韖耶 SQL0001N s膣詰容鑅哀藶秋鐀顟蘠歈耶 SQL0001N NULLID.SQLL6D05 和壧n耶SQLSTATE=51002 RC = 7356 RC2 = 8600 礔繐鶔儘欑齶ガ耍巷s柱柰媴 db2cli.ini 胃 [COMMON] DYNAMIC=1 彀 UNIX 鑶豜W耍db2cli.ini 板彀 .../sqllib/cfg 到耶 彀 Windows NT 柼耍db2cli.ini 板彀 .../sqllib 到耶 ------------------------------------------------------------------------ 22.48 暖珫眃]肄碉鸉纋柞 1. 灁暖珫眃]肄碉鸉纋柞耍纋柞嚭式澱鏺彀暖嚭定碉暖 癸定洇耶 纋柞茫繐纋柞嚭式酨彀腺嚭碉癸定洇耶彀 ASN 找珫養鄧纋 柞嚭式耍擂謰礤絛腺 IBMSNAP耶 愩刖嚭式虋酨彀耍♂zzL嚭珫 眃鉊w霿纋柞僬咿耍纋柞嚭式|彀定洇椻韥擔耶胃嚭式柛 柜肄酨彀腺癸 DB 珫耶 儵隳彀癸 DB 詻擔嚭式耍巷媥郩夒珫眃 擔纋柞僬垠A潒嫀齁纋柞僬垠A骷蟂柰嚭式耶 詰舌耍媥 DJRA (Data Joiner Replication Administration) 恙鉊w霿嚭式耶 2. 揅壧碉媥 DJRA 儵媥 DJRA 鉊w霿嚭式耍屑澱鏺樺灁揅壧耶DJRA 鷫長 DB2 戍柜 樵耶儵揅壧 DJRA耍巷灛 d:\sqllib\djra 到耍虋柜柰 djra.exe 和壧n 耶醨 DJRA 揅壧鞮戍鑶蚼C祌耍儵彀 Windows NT 戍礤絛閱式酨灥 DJRA耍巷柜柰 Windows NT 戍 DB2耍灥纋柞耍灥纋柞扯z泚爩耶DJRA 祊貘碉柜戍 NT 睦擋獛搨眈虎嵥耶詻鸉戍臠柜譇耍擂擔柜歑n鸉 戍 SQL耍椷板峨鑭嗀颳鸉耶媥蛈瑔鏺椻暖酨詻擁戍 SQL耍潒耍灥鸉 SQL 灁鸉耶 3. ]肄鸉跌灥獛搨碉矧擋獛搨 儘彀鵃灚珫戍鑶蚼A嗀愩摃歧呃鑶釱僤鬾跌灥獛搨碉矧擋獛搨戍銻耍巷囓 酀 Replication 峪碉囓楯銳耶s膣跌灥碉矧擋獛搨珫醨Q媥蛈抖U譇 定耶圳N耍鞮茫繐擔q俄耶暖珫眃|長肄齔纋柞搨椻韥擔 q俄耶 4. 肄霿嚭珫眃洇纋柞僬 媥郩夒珫眃肄霿纋柞僬垠C暖珫眃儭砎纋柞悚ю胃媥蛈稘劑耍 繾貂耍劑浩鐖耍鶔浩鐖碉皈鑅式 (CCD 式)耶媥蛈稘劑耑繾貂碉 琳皈鑅式戍悚ю耍茫繐纋柞僬咻〝嗀柜譇遭繐耶擂纋柞悚ю屑茫繐耶 Q肄霿長纋柞僬咻夾枵式耍巷韄隳o柜貂耶舫柼耍纋柞僬囿O絛 僬咻〝碉擔祌 CD 式 (鶔) 戍肄霿耍鶔齁砯癸式容奚 蟂彀 CD 式洇耶 彀嚭珫眃洇肄霿纋柞僬垠AASN.IBMSNAP_REGISTER |柞枵 柜醳韄到耍鄧肄霿欑僬姜M擂戍 CD 式耶CD 式彀嵥柜繾洇擔耍椷板耍 礤絛擂斖慍鑭嗀耶肄霿纋柞僬垠A鞮養鄧骷枵托耍詰 枵容碉托耶zL嚭珫眃纋柞僬峙鐨韘彷鄖醳耶鞮詻戍容 碉托|黈s CD 式洇詻擔戍托耶CD 式洇耍托碉 絛僬咻〝托巰投嵥巰耶托巰投戍柜譇戠祅長 X耶 5. 枵纋柞僬待暖珫眃 柜氅彀嚭珫眃擔纋柞僬垠A鞮養鄧醨擂枵暖珫眃耶枵僬咿耍巷 俊肄柜柰赴養鄧纋柞戍式赳耶o鬑巆柅暖珫眃表表 ASN.IBMSNAP_REGISTER 式洇戍韄到耍嗀蠽式Q肄霿長纋柞僬垠C 6. 彀暖珫眃洇肄霿纋柞纙J 彀獛研悚擁齗珫耍灥砎纋柞悚ю珫戍柜胃劑浩鐖耑鶔浩鐖耑繾 貂耑皈鑅式耑媥蛈稘劑耶儵肄霿劑浩鐖詰鶔浩鐖纋柞ю悚耍巷囓酀鄧柰 嗀愩摃彀暖珫眃揅壧劑浩鐖詰鶔浩鐖纋柞耶長纋柞ю悚灥譂’ 纋柞僬垠C愩柼詻祗耍媥蛈稘劑耑繾貂碉琳皈鑅式戍纋柞悚ю茫繐枵 僬待柜譇遭繐耶s鼪纋柞僬待纋柞纙J耶礤鼖纋柞纙J戍洇委耶灛囓 癸蒤C灥詻繐戍托耶 灥鉈擔癸式耶灥暖癸耶 灛B z獛醳虋穭柞囓耶赴俊肄赳耶 7. 鼖韥跌灥獛搨 DOS 甇洇耍巷枵胃ASNCCP source-database COLD PRUNE COLD 囓 COLD 戍鼖韥耍虋飁酨彀腺 CD 式戍摃耶PRUNE 囓 跌灥獛搨@ IBMSNAP_PRUNCNTL 式耶黺^灥獛搨~鸉耶繐鷶鋇耍 巷顟擋 DOS 甇洇戍 Ctrl-Break 柰銻欘耶圳N耍鼖韥矧擋獛搨容巷鼖韥跌 灥獛搨耶 8. 纋柞纙J鵃灚 (Promote-To-Test) 廌暖珫眃耍腺肄霿戍纋柞纙J耍醨纙J赴鵃灚赳研搨耶o| y歈肄齔纋柞搨鬞柞枵纋柞嚭式耶鞮醨表s柱 IBMSNAP_SUBS_SET 耑IBMSNAP_SUBS_MEMBR耑IBMSNAP_SUBS_COLS耑 IBMSNAP_SUBS_EVENT戍韄到耍鄧 儭肄齔纋柞耶 癸式柛|彀癸定珫擔耶礔纋柞ю悚長媥蛈稘劑 耑繾貂耑琳皈鑅式耍癸式茫繐柜譇遭繐耶灛嚭珫眃鉈擔遭繐 耶圳N耍彀嵥戍托斖耍嗀纋柞癸式柛茫繐鸅柜豯矧耶戠俄酨彀腺 暖珫眃珫耍彀式擔耍擂|擔o鸅柜豯矧耍詻鄧耍鞮茫繐椻洳 擔o豯矧耶圳N耍愩刖彀嚭珫眃洇肄霿遭繐耍嵥耍托珫洄嗀柜譇鸅柜 豯矧耍♂z彀擔遭繐廌廌翭i鬞昔耶落疪翭i鬞昔耶 9. 纋柞纙J擁 (Promote-To-Production) 彀擁齔繾耍|鷽摃肄齔纋柞搨鶔耶o蘠曄碉擂纙J戍赴 暖珫眃赳鏼~虎嵥耶 10. 鸉纋柞纙J 纋柞纙JQ共長鵃灚研搨餪養鄧鸉耶僬咻〝灁養鶔容耍巷樺鸉 柜歃耶灛赴泚鏼灁珫赳(Work-in-Progress;WIP) 躒耍灥纋柞纙J耶鸉 擂耶纙J鸉耍IBMSNAP_SUBS_EVENT 式洇戍麩韄到|鶔s耍 IBMSNAP_SUBS_SET 戍肄齔纋柞韄到長鑅鏼擋珫耶肄齔纋柞矙柼鸉耶肄齔纋 柞鸉耍鋅z獛搨碰駒矧擋獛搨Bz鏼擋珫戍肄齔纋柞耶 祌耍鶔s絛 咻〝耍詻鶔戍醨鵱 CD 式耶愩刖鸉柰媴纋柞纙J耍矧擋獛搨嫀柜 歃鸉耍鶔醨雚 CD 式齁窋癸式耶 11. 纋柞纙J蹢鵃灚 (Demote-To-Test) 彀蹢鵃灚齔繾耍|鷽摃肄齔纋柞搨鶔耶o蘠曄碉擂纙J戍赴 暖珫眃赳鏼~虎嵥耶 12. 纋柞纙J蹢礤熪 (Demote-to-Development) ♂z醨纋柞纙J蹢礤熪耍肄齔纋柞鬞|椻纋柞嚭式洇齁耶蹢 擁蘠歈耍蕶肄肄齔纋柞|彀纋柞嚭式洇蟂柰韄到耶癸式柛|彀殛 Q颳耶CD 式|譂≡a奚蟂柰酯A廅長擂竀m磟g僬咻孛w霿耶 13. 愩摃彀暖珫眃]肄劑浩鐖詰鶔浩鐖耶 o 枵式耶養鄧Q GROUP BY 闉z搨媥蛈夾枵式耶 蜙p耍媥酓t 嗀o托戍枵式胃SALES耍REGION耍DISTRICT耶 o 纋柞纙J耶劑詰鶔浩鐖耶礤鼖纙J洇委耶 + 彀矧擋獛搨鸉耍擂澱鏺鸉ю SELECT SUM(SALES), REGION, DISTRICT GROUP BY REGION, DISTRICT 戍 SELECT 闉z搨耶 廅殛耍 彀灥戍鋇托珫耍鞮澱鏺 REGION耑DISTRICT 瓬柜譇繣托 SUM(SALES)耶媥釳s柱繣托盭耶 削蓔洢悃枵 SUM(SALES) 腺赴式搨赳耶暖酨擂耶 + WHERE 氡魅耶嗀柜醳纋柞茫臡胃 彀鞮]肄骷茫 GROUP BY 氡魅戍纋 柞纙J耍 澱鏺虪 DUMMY WHERE 氡魅 (洃愩 1=1)耶繐醨 "WHERE" o譇戠閭 WHERE 氡魅珫耶廅殛耍劑浩鐖戍暖珫 眃 GUI 洇耍骷嗀柜譇 WHERE 氡魅枵耶彀殛珫耍蜙p胃 枵胃 1=1 GROUP BY REGION, DISTRICT 赴鶔浩鐖赳耍 嗀 赴WHERE 氡魅赳碉赴GROUP BY 赳譇枵胃 赴WHERE 氡魅赳 枵胃 1=1耍赴GROUP BY赳枵胃 GROUP BY REGION, DIST RICT + ]肄甩U戍纙J洇委耍餪愩鞮]肄擂纋柞ю悚柜耶赴俊肄赳鄧 暖酨纙J耍虋擔癸式旨麩耶 o 礤鼖癸式旨麩耶鶔繣托式搨戍鋇托巰投歈長嗀戍托 巰投耍虋遮肄托戍嗀戍ю悚耶暖酨癸式旨麩耶 o 彀纋柞纙J鸉共鵃灚 (Promote-to-Test)耶擔癸式耶茫繐遭 繐耶 o 鸉纙J愩擂纋柞纙J耶 ------------------------------------------------------------------------ 22.49 序鬙鍻Z * 礤鼖矧擋獛搨戍鷲耍彀暖洇委熰貘]肄鋅z獛搨襏 = 4耶鋅z獛搨礤鼖矧 擋獛搨蘠鬷戍鷲耍▽Nz獛搨鷲 = 4 耶 愩刖彀 CD 式珫鑭嗀摃耍屑養板跌灥獛搨鑭嗀鼖韥耍詰擔鶔 戍絛僬咻〝鑭嗀鶔s耶 * 獛翭韄劑祌q何贄貘戍犨麩再齗椻哎柼祗腦珫坑柅耶 * 犨麩再齗茫繐儭 ESMTP耍暖珫眃q何浂泚鏼耶彀赴礤鼖泚鏼灁 珫赳甇戍祗腦珫耍柜柰 "暖 --> 泚鏼灁珫"耍 椴板 "暖珫眃 --> 泚鏼灁珫"耶 ------------------------------------------------------------------------ 22.50 酨灥僬姜M癸 柰媴式媴耍暖珫眃詻儭戍僬姜M癸祌次劑瓬次歃耶 式 7. IBM 暖僬姜蓔儭戍次劑碉次歃 僬 次劑剔次歃 IMS 5.1 DB2 Universal Database for Windows NT5.2 - 7.1 DB2 Universal Database 5.2 - 7.1 Enterprise-Extended Edition DB2 Universal Database for OS/2 5.2 - 7.1 DB2 Universal Database for AS/400 3.7 - 4.5 DB2 Universal Database for AIX 5.2 - 7.1 DB2 Universal Database for Solaris 5.2 - 7.1 Operating Environment DB2 Universal Database for OS/390 4.1 - 7.1 DB2 DataJoiner 2.1.1 DB2 for VM 5.3.4 詰鶔s次 DB2 for VSE 7.1 僬 Windows NT AIX Informix 7.2.2 - 8.2.1 7.2.4 - 9.2.0 Oracle 7.3.2 - 8.1.5 8.1.5 Microsoft SQL Server 7.0 Microsoft Excel 97 Microsoft Access 97 Sybase 11.5 11.9.2 式 8. IBM 暖癸詻儭戍次劑碉次歃 癸 次劑剔次歃 DB2 Universal Database for Windows NT6 - 7 DB2 Universal Database 6 - 7 Enterprise-Extended Edition DB2 Universal Database for OS/2 6 - 7 DB2 Universal Database for AS/400 3.1-4.5 DB2 Universal Database for AIX 6 -7 DB2 Universal Database for Solaris 6 -7 Operating Environment DB2 Universal Database for OS/390 4.1 - 7 DB2 DataJoiner 2.1.1 DB2 DataJoiner/Oracle 8 DB2 for VM 3.4 - 5.3.4 DB2 for VSE 3.2, 7.1 CA/400 3.1.2 ------------------------------------------------------------------------ 22.51 儭戍唏 IBM 定僬咻杖s柱醳 柰式詻媴耍板詻儭祌唏 IBM 定僬咻杖s柱醳胃 定 鏼~鑶 定雚膼鰳薋D Informix AIX Informix-Connect 烈 ESQL/C 次劑 9.1.4 詰鶔s 次 Informix Solaris 鏼~ Informix-Connect 烈 ESQL/C 次劑 9.1.3 詰鶔s 次 Informix Windows NT Informix-Connect for Windows Platforms 2.x 詰 Informix-Client Software Developer's Kit for Windows Platforms 2.x Oracle 7 AIX Oracle7 SQL*Net 瓬 Oracle7 SQL*Net 媷擋 定 (顟擋 genclntsh script 詻擔) Oracle 7 Solaris 鏼~ Oracle7 SQL*Net 瓬 Oracle7 SQL*Net 媷擋 定 (顟擋 genclntsh script 詻擔) Oracle 7 Windows NT SQL*Net {次劑戍儘俊 DLL耍鴉閭 OCIW32.DLL耶 蜙p耍SQL*Net 2.3 茫媥 ORA73.DLL耑CORE35. DLL耑 NLSRTL32.DLL耑 CORE350.DLL 瓬 OCIW32.DLL耶 Oracle 8 AIX Oracle8 Net8 瓬 Oracle8 SQL*Net 媷擋定 (顟擋 genclntsh8 script 詻 擔) Oracle 8 Solaris 鏼~ Oracle8 Net8 瓬 Oracle8 SQL*Net 媷擋定 (顟擋 genclntsh8 script 詻 擔) Oracle 8 Windows NT 礔繐酨灥茗抑瞉長 8.0.3 次鄧柼戍 Oracle8 定 再齗耍鞮堉鏺揅壧 Oracle Net8 Client 次劑 7.3.4.x耑8.0.4 詰鶔s 次耶 彀 Intel 鑶豜W耍鞮澱鏺 彀鞮戍尚珫揅壧 Oracle Net8 Client 戍 儘俊 DLL (愩胃Ora804.DLL耑 PLS804.DLL 瓬 OCI.DLL)耶 Sybase AIX 彀唏 DCE 蓔 (ibsyb15 ODBC X韥獛搨)胃 libct 定 彀 DCE 蓔 (ibsyb1115 ODBC X韥獛搨)胃 Sybase 11.1 雚膼 定 libct_r Sybase Solaris 鏼~ 彀唏 DCE 蓔 (ibsyb15 ODBC X韥獛搨)胃 libct 定 彀 DCE 蓔 (ibsyb1115 ODBC X韥獛搨)胃 Sybase 11.1 雚膼 定 libct_r Sybase Windows NT Sybase Open Client-Library 10.0.4 詰 鶔s次瓬譂’ Sybase Net-Library耶 ------------------------------------------------------------------------ 22.52 彀暖珫眃珫韥擔僬 ↗媥 Relational Connect 瓬 "Create Nickname" 闉z搨鉈擔僬咿耍 腺彀暖珫眃珫枵式戍虎耍欑僬恪N潲妄媥蚼C礔繐醨僬 擋鏼僬咻〝詰癸式耍巷鸉柰媴纙J胃 1. 肄霿僬-癸耍椴枵摃式耶 2. 姆礤暖珫眃遭甇戍暖僬/癸鯗扛膣呃耍 虋彀詻儵僬-癸戍"式 "柼柜柰挽k耶 3. 柜柰肄霿耶 4. 媥酚}鼖戍翭韄劑肄霿僬垠A 虋俊肄長臠柜譇僬姜w霿柅托耶 礔茫欏僝鬞耍巷囓酀赴鬞珫眃赳珫戍"肄霿暖僬咻〝"詰"肄霿暖癸式 "耶 ------------------------------------------------------------------------ 22.53 媥 Common Warehouse Metadata Interchange (CWMI) 枵瓬鋇鴶翷 22.53.1 媽祊 柅容儭戍癸砰躨耍暖珫眃{彀柛養鄧枵瓬鋇鴶翷幏 Common Warehouse Metamodel (CWM) 癸戍 XML 耍 鄧瓬雚 XML 枵瓬 鋇鴶翷耶枵瓬鋇o稒 CWM 戍 XML 餪板詻戍 Common Warehouse Metadata Interchange (CWMI)耶 鞮養鄧雚柰媴暖珫眃旨麩枵瓬鋇鴶翷胃 * 暖僬 * 暖癸 * 遭搣鱦耍霄服獛耑僬垠B癸瓬纙J * 媥蛈瑏w霿獛搨 CWMI 枵瓬鋇洢擋獛搨容儭蕶肄ю悚戍鴶翷耍霄服胃 獛耑暖找 耑嚪尚纙J耑薿|娩耑媥蛈瘐釬s摮C 暖珫眃|擔柜譇霄鰗枵瓬鋇獛膣刖戍矩耶q鎈矩|擔彀 x:\program files\sqllib\logging 到 (珫 x: 板揅壧 DB2 戍忪忘鼭)耍詰板鞮 肄彀 VWS_LOGGING 戍到耶矩板貕戠戍胚鞮養鄧擋摃戠哀獛 搨鈮趷擂耶 22.53.2 枵鴶翷 鞮養鄧彀暖珫眃珫枵鴶翷耍詰舌雚祺銻枵鴶翷耶 zL枵獛詻擔戍s旨麩|聤w]戍暖珫眃揅曄顪摮C礔茫欏僝 鬞耍巷囓酀次劑圳N醳珫戍赴彀枵鶔s鼭鄺奚@赳耶 愩刖板枵腺欣纙J戍鴶翷耍屑養鄧醨愫譇烈纙J虎皖耶腺纙J戍鴶 翷|暖酨彀 XML 珫耍 椷板嗀纙J|嗀虎皖戍板暖酨長 BLOB耶BLOB 鴶翷戍巰烈 XML 虎嵥耍 椷板擂板彀譇顢戍珫耍巰長戠耶詻 嗀虎戍纙J彀枵澱鏺彀虎嵥戍到珫耶 ↗BJ彀鵃灚詰擁研搨鶔s纙J 纙J澱鏺彀礤熪研搨珫耍暖珫眃浂鶔s纙J戍鴶翷耶愩刖纙J板彀鵃灚 詰擁研搨耍 屑彀枵鴶翷祌容醨纙J蹢長礤熪研搨胃 1. 熡枵暖珫眃耶 2. 彀繐蹢戍纙J柼柜柰挽k耍嫀柜柰研搨耶 3. 柜柰礤熪耶 {彀纙J餪彀礤熪研搨柅耶彀枵鴶翷祌耍嫀醨纙J鶔廌鵃灚詰擁研搨耶 雚暖珫眃枵 鞮養鄧彀暖珫眃祌珫枵鴶翷胃 1. 熡枵暖珫眃耶 2. 柜柰齒甇珫戍暖耶 3. 柜柰 灥戍 -> 枵鴶翷 -> 黈...耶 4. 彀赴枵鴶翷赳甇珫耍肄霄鰗繐枵戍鴶翷戍巰耶鞮養鄧枵 巰詰擋鈕檛僛耶 o 愩刖鞮何D鑅耍屑巷枵蘠鬷戍尚碉繐枵戍巰投耶巷俊肄閭柼 .xml 巰耍 鄧肄繐鄧 XML 搨僳枵鴶翷耶 o 礔繐擋鈕檛僛胃 a. 柜柰 (...) 盭耶 b. 彀赴赳甇珫耍醨ю悚鶔長 XML耶 c. 鵱儘俊戍到耍嫀灥繐枵戍耶 : 澱鏺長 .xml 巰耶 d. 柜柰俊肄耶 5. 彀枵鴶翷甇珫耍 柜柰俊肄僛歈耶彀暖珫眃枵| 灁甇耶 媥袑R銻僳枵鴶翷 鞮柛養鄧媥袑R銻僳枵鴶翷耶柰媴長枵戍銻砰妄胃 CWMImport XML_file dwcControlDB dwcUserId dwcPW [PREFIX = DWCtbschema] XML_file 繐枵戍 XML 戍蘠鬷尚碉巰 投 (霄服忪忘鼭瓬到)耶殛囓板澱繐 戍耶 dwcControlDB 鴶翷詻繐枵戍暖嚭定巰 投耶殛囓板澱繐戍耶 dwcUserId 鞮擋馰n枵暖嚭定戍媥蛈 ID耶殛囓板澱繐戍耶 dwcPW 鞮擋馰n枵暖嚭定戍媥蛈稕q 俄耶殛囓板澱繐戍耶 [PREFIX=DWCtbschema] 暖珫眃鑶蛈〝戍定找巰 投耍 嗀板式戠藃耶愩刖鑭嗀肄 襏聤 PREFIX=耍屑w]找巰投長 IWH耶 殛囓板養擋戍耶 22.53.3 彀鸉枵洢擋獛搨祌鶔s鴶翷 彀枵鶔s鼭鄺奚@ 鏼長揅曄柼戍楯皪耍暖珫眃|枵詰鋇q俄耶鞮澱鏺茫繐彀s旨麩柼 鶔sq俄耶礔茫枵圳N醳戍欏僝鬞耍 巷囓酀暖珫眃扯z銳戍 12 赴鋇碉枵暖珫眃鴶翷赳耶 彀枵鴶翷耍詻嗀旨麩|聤w]揅曄顪摮C鞮養鄧鶔養酨灥旨麩戍顪 摮G 1. 熡枵暖珫眃耶 2. 彀霄鰗繐鶔戍旨麩戍蘮柼柜柰挽k耶 3. 柜柰洇委耍嫀柜柰鼭鄺奚@癸蒤C 4. 雚灥戍暖顪槷C珫醨顪氂颳耍 詰舌雚養擋戍暖顪槷C珫s柱顪 摮C 5. 柜柰俊肄耶 22.53.4 鋇鴶翷 鞮養鄧彀暖珫眃珫鋇鴶翷耍詰舌雚祺銻鋇鴶翷耶 倌穱BJ戍鴶翷板暖酨長 BLOB耶BLOB 鴶翷|鋇譇顢珫耍 巰烈 纙J戍 XML 虎嵥耍椷板巰板戠 (.1耑.2 瞉瞉)耶 雚暖珫眃鋇 鞮養鄧彀暖珫眃祌珫鋇鴶翷胃 1. 熡枵暖珫眃耶 2. 柜柰齒甇珫戍暖耶 3. 柜柰 灥戍 -> 鋇鴶翷 -> 黈耶 4. 彀赴鋇鴶翷赳甇珫耍肄醨霄鰗鋇戍鴶翷戍巰耶鞮養鄧枵 巰詰擋鈕檛僛胃 o 愩刖鞮何D蘠鬷戍尚瓬繐媥蛈孚巰耍 巷枵巰枵耶巷俊肄 閭柼 .xml 巰耍 鄧肄繐鄧 XML 搨僳鋇鴶翷耶 o 礔繐擋鈕檛僛胃 a. 柜柰 (...) 盭耶 b. 彀甇珫耍醨ю悚鶔長 XML耶 c. 鵱儘俊戍到耍嫀灥繐鋇戍耶 : 摃鞮詻灥戍{酨|Q鋇戍鴶翷剽柞耶 d. 柜柰俊肄耶 5. #u鋇鴶翷赳甇ず柅儘俊戍巰耍 彀養擋戍旨麩媴珫柜柰繐 鋇鴶翷戍旨麩耶 6. 柜柰 > 襶醨灥戍旨麩雚 養擋戍旨麩媴珫齁窋灥戍旨麩媴耶薿 鄧柼纙J耍托詻嗀繐鋇戍旨麩媴彀灥戍旨麩媴珫耶 7. 柜柰俊肄耶 暖珫眃|擔柜譇枵 (擂霄鰗烈繐鋇戍暖珫眃旨麩戍虎 鬞)耍潒鋇嗀蠽旨麩戍鴶翷耶 彀暖珫眃鋇鴶翷|ず灁 甇耶 ↑鋇獛蘠歈耍醨|搌嗀鋇獛戍囓楯鬞昔耶廌剽俄 0 式鋇歈閱耶鞮 柛養鄧照矩耍鄧灥隳欏僝鬞耶 媥袑R銻僳鋇鴶翷 彀雚祺銻鋇鴶翷祌容耍鞮澱鏺樺擔柜譇枵耶枵板柜譇巰長 .INP 戍戠耍 擂|稒僦n鋇戍旨麩ю悚媴鋇詻嗀旨麩耶♂z彀暖珫眃祌 珫鋇耍 枵板椻韥擔戍耍椷板雚祺銻鋇耍鞮澱鏺樺擔枵耶鞮養鄧 媥袛摃戠哀獛搨鉈擔枵耶枵詻嗀戍旨麩巰投 (烈ず彀暖珫眃 珫戍巰投虎嵥)耶巷俊肄板擔彀柜譇養收g戍到珫耶♂z鸉鋇洢擋獛搨 耍 暖珫眃|醨 XML 柞枵枵詻彀戍虎嵥到珫耶 柰媴長柜譇削膍枵胃 鵏式獛 鵏僬 鵏癸 s獛搨顪 彀 (獛) 鱦沮耍媴鋇詻嗀繐鋇戍獛耶彀 (鬞) 鱦沮耍媴鋇 詻嗀繐鋇戍暖僬峙袛癸耶 暖珫眃|椻韥枵烈o僬峙袛癸虎皖戍 式碉托耶彀 (媥蛈瑏w霿獛搨) 鱦沮耍 媴鋇詻嗀繐鋇戍獛搨顪摮C 礔繐鋇鴶翷耍彀 DOS 襶柰枵柰媴銻胃 CWMExport INPcontrol_file dwcControlDB dwcUserID dwcPW [PREFIX=DWCtbschema] INPcontrol_file 霄鰗繐鋇旨麩戍 .INP 戍蘠鬷尚 碉巰投 (霄服忪忘鼭瓬到)耶殛囓 板澱繐戍耶 dwcControlDB 繐雚鋇戍暖嚭定巰投耶殛囓 板澱繐戍耶 dwcUserID 鞮擋馰n枵暖嚭定戍媥蛈 ID耶殛囓板澱繐戍耶 dwcPW 鞮擋馰n枵暖嚭定戍q俄耶殛 囓板澱繐戍耶 [PREFIX=DWCtbschema] 暖珫眃鑶蛈〝戍定找巰 投耍 嗀板式戠藃耶愩刖鑭嗀肄 襏聤 PREFIX=耍屑w]襏長 IWH耶殛囓 板養擋戍耶 ------------------------------------------------------------------------ 22.54 OS/390 Runstats 洢擋獛搨纙J 彀 DWC 珫肄霿 OS/390 Runstats 洢擋獛搨纙J耍媥蛈瑀欑何D柰媴腺赴纙J 洇委赳戍赴囓赳癸蓔浀彷妝e耶 礔板式繾耍媥蛈瑀欑鄧毠柞枵 巰投耶愩刖式繾彀定 DSNDB04 珫耍 屑茫繐鄧定霄鰗擂鉊w霿式 繾巰投耶蜙p耍枵 SAMPLE.EMPLOYEE耶祗腦容蕼瓬殛耶 ------------------------------------------------------------------------ 22.55 OS/390 枵洢擋獛搨纙J 彀 DWC 珫肄霿 OS/390 枵洢擋獛搨纙J耍媥蛈瑀欑何D柰媴腺赴纙J洇委 赳戍赴囓赳癸蓔浀彷妝e耶 長柅繐檉枵爦鸉耍媥蛈瘐@肄繐灥赴灁 藶赳盭耶騶屑醨潲妄擔枵闉z搨戍 INTO 氡魅耍彀鸉枵醨|噬韖耶 殛鴉耍FixPak 3 霄鰗戍儘獛搨養颳枵鐖巰投容戍矧襶耶柅殛儘獛 搨耍醨潲妄鸉枵耶 ------------------------------------------------------------------------ 22.56 Common Warehouse Metamodel (CWM) XML 儭 次劑 7.2 CWM 泚爩鐖媥 Java Development Kit (JDK) 1.2.2 詰 1.3耶 {彀耍鞮養鄧枵瓬鋇柰媴 CWM XML 旨麩胃 擂Bz獛戍嚪尚纙J ♂z鋇鰗嗀欣纙J戍Bz獛耍椴欑纙J烈駙柜Bz獛珫戍纙J嗀娩 (柜譇嚪 尚)耍 o譇Bz獛|Q鋇遮娩|@耶 嗀麩廇藶搨媴娩 {彀耍鞮養鄧枵瓬鋇纙J祌繾嵥戍藶搨媴娩耍霄服 CHILD耑SUCCESS耑 FAILURE 瓬 UNCONDITIONAL耶 暖僬挖@長蘞浀’挽 {彀耍♂z鋇耍鞮養鄧醨暖僬姜w霿長蘞浀’挽╲C 蘞浀’挽╪杉Bz搨烈 式旨麩虎嵥耶 SQLDataType 擋腺托碉 {彀耍鞮養鄧醨 SQLDataType 擋腺托碉耶 虎嵥式戍愫薿虎巰投 彀枵詰鋇齔繾耍鞮養鄧嗀愫薿虎巰投耍虎嵥式戍臠柜譇巰投嗀椻洳戍托 杯耶 s戍 SAP 碉 WebSphere Site Analyzer (WSA) 僬峙儭 s柱s戍僬峙儭癸蓔鶖耍{彀鞮養鄧鋇暖酨腺暖珫戍 SAP 碉 WSA 鬞耶 ------------------------------------------------------------------------ 22.57 Bz研悚擁齗 鞮養鄧怠鬷Bz研悚擁齗擋鱦毠洟耍媥毻幏鞮戍些餀j洟耶 擋鱦柼戍媥| 椻韥薿s肄愫托擋鱦耶 ♂z柜柰欣譇擋鱦媥耍鞮|彀擋鱦旨麩柼表柜譇癸ガ耶 {彀耍鞮養鄧墨灥蘞浀▽\式珫戍ず~髕巰投醳耍稒鄏〝碉旨麩戍 ~髕巰投鈮趷擂謰耶 鞮養墨灥琳舅醳鄎殢べ眐煙犬]肄耍鄧瓬琳洟詰舅毠 Bz獛蘞浀#C 礔旨麩彀擋鱦洇薿|耍鞮養鄧柜柰旨麩醨擂謰詹些噉祐磾C 殛鴉耍旨麩巰投| 較柰歈\愫媴鄧躒虱擋鱦繾耶 鞮{彀養鄧媥酓R僣齁旨麩耶◎x酨欣譇Bz獛耍柛|暖酨式鶔耶 長板椻韥戍耶礔繐雚暖僬姜袛癸瓬Bz獛珫齁欣譇式耑詰 蘞 式耍鞮養鄧柜柰挽k耍潒灥雚僬拱齁韥鏼 (礔旨麩腺暖僬峙)耍詰 灥雚癸齁韥鏼 (礔旨麩腺暖癸珫)耶 {彀耍癸ず擋鱦扛你耶殛鴉耍扛你ず癸詻彀戍旨麩巰投耶 ------------------------------------------------------------------------ 22.58 找研悚擁齗 {彀耍鞮養鄧醨找研悚擁齗洇式琳瘐p瓬舅瘐j耶 ♂z醨式琳瘐p 耍擂歈媥耶長柅鶔俊ず耍 鞮養鄧擔柜譇枉扛找闟鑅耶 ------------------------------------------------------------------------ 22.59 澱繐枵 {彀耍赴暖珫眃赳澱繐戍ず芯耶 芯鞮肄霿赴 暖珫眃赳旨麩詻茫戍澱繐鬞耍蜙p定巰投耑媥蛈 ID 詰q俄耶 ♂z枵澱 繐戍鬞耍堉|噬耶 ------------------------------------------------------------------------ 22.60 赴暖珫眃赳熪妮鬧閭鎣閱 ♂z雚熪妮鬧擔赴暖珫眃赳旨麩耍|姆礤矧鯗扛膣呃耍ずs旨麩戍 鑅耶 ------------------------------------------------------------------------ 22.61 媴尳纙J鬞 {彀耍鞮養鄧醨纙J戍虎鬞 (蜙p遭搣鱦耑僬咻〝巰投瓬癸式巰投) 媴 尳戠耶礔繐媴尳纙J鬞耍 巷鄧挽k柜柰Bz研悚擁齗珫戍纙 J媥耑柜柰媴尳 --> 媴尳耍潒肄鞮繐媴尳鬞戍巰投耶 ------------------------------------------------------------------------ Data Warehouse Center Application Integration Guide(潲珫次) In Chapter 5. Metadata Templates, Table 16 describes Column tag tokens. The information in the manual should state that "*ColumnPositionNumber" should start with "1". The manual incorrectly gives "0" as the starting character. Later in Chapter 5, in Table 42, the TableTypeIfFile token is required if the type specified for the DatabaseType token in the corresponding SourceDataBase.tag is ISV_IR_FFLan. If it is not specified, an error will be detected. In Chapter 6. Data Warehouse Center metadata, the description of the POSNO column object property should be changed to: An index, starting with 1, of the column or field in the row of the table or file. In Chapter 8. Information Catalog Manager object types, the directory where you can find the .TYP files, which include the tag language for defining an object type, has been changed to \SQLLIB\DGWIN\TYPES. ------------------------------------------------------------------------ 23.1 Additional metadata templates In Chapter 5, Metadata Templates, the following metadata templates should be included. Table 9. New Metadata templates supplied with the Data Warehouse Center Template Description See: commit.tag 23.1.1, "Commit.tag" Foreignkey.tag 23.1.2, ForeignKey.tag Foreignkeyadditional.tag 23.1.3, ForeignKeyAdditional.tag Primarykey.tag 23.1.4, PrimaryKey.tag Primarykeyadditional.tag 23.1.5, PrimaryKeyAdditional.tag 23.1.1 Commit.tag Use this template to improve performance when you are using large tag language files. A commit template can be inserted between any of the groups of templates described here. A commit template cannot be inserted between templates within a group. For example, it is valid to insert a commit template between AgentSite.tag and VWPGroup.tag but invalid to insert a commit tag between VWPProgramTemplate.tag and VWPProgramTemplateParameter.tag. If commit templates are used incorrectly, import may report an error. * AgentSite.tag * VWPGroup.tag * VWPProgramTemplate.tag, VWPProgramTemplateParameter.tag * SourceDatabase.tag * WarehouseDatabase.tag * Table.tag, Column.tag * SubjectArea.tag * Process.tag * Step.tag, StepInputTable.tag, StepOutputTable.tag, StepVWPOutputTable.tag, StepVWPProgramInstance.tag, VWPProgramInstanceParameter.tag * StepCascade.tag * StarSchema.tag, StarSchemaInputTable.tag * PrimaryKey.tag, PrimaryKeyAdditional.tag * ForeignKey.tag, ForeignKeyAdditional.tag The use of the commit template is optional. 23.1.1.1 Tokens Table 10 provides information about each token in the template. Table 10. Commit.tag tokens Token Description Allowed values Relationship parameters *CurrentCheckPointID++An index, starting A numeric value. with 0, that increases each time it is substituted in a token. This token is required. 23.1.1.2 Examples of values Table 11 provides example values for each token to illustrate the kind of metadata you might provide for each token. Table 11. Example values for Commit.tag tokens Token Example value *CurrentCheckPointID++ 1 23.1.2 ForeignKey.tag Use this template to define foreign key constraints on tables. The ForeignKey.tag template defines the relationships to the table and the column on which the constraint is being defined. This template also defines the relationships to the table and column of the primary key that is being referred to. Before you use the ForeignKey.tag template, you must define the primary key constraint (using the PrimaryKey.tag template) and the tables and columns (using the Table.tag and Column.tag templates) on which you want to define the foreign key constraint. 23.1.2.1 Tokens Table 12 provides information about each token in the template. Table 12. ForeignKey.tag tokens Token Description Allowed values Entity parameters *ConstraintName The name of the A text string, up to 80 constraint. bytes in length. The name must be unique within a table or field. This token is required. *ForeignColumnKeyName Name of the column A text string, up to 254 on which the foreign bytes in length. key constraint is being defined. *ForeignKeyID The key that A numeric value. uniquely identifies the foreign key. The key must be unique from all other keys in the tag language file. Tip: Finish processing the ForeignKey.tag template before increasing the value of the key. This token is required. *MapID An arbitrary number A numeric value. that is unique from all other keys in the interchange file. Tip: Finish processing the ForeignKey.tag template before increasing the value of this token. This token is required. *PrimaryColumnKeyName The column name of A text string, up to 80 the referenced bytes in length. column. *ReferencedPrimaryKeyID The key that A numeric value. uniquely identifies the primary key. The key must be unique from all other keys in the tag language file. Tip: Finish processing the ForeignKey.tag template before increasing the value of the key. This token is required. Relationship parameters *DatabaseName The business name of A text string, up to 40 the warehouse source bytes in length. or warehouse target. This token is required. *ForeignTablePhysicalNameThe database-defined A text string, up to 254 name of the physical bytes in length. table containing the foreign keys that reference the keys in other tables. *PrimaryTablePhysicalNameThe database-defined A text string, up to 80 name of the physical bytes in length. table containing the keys that are referenced by the foreign keys. *PrimaryTableOwner The owner, A text string, up to 128 high-level bytes in length. qualifier, collection, or schema of the table that contains the primary key column that is being referenced. This token is required. *ForeignTableOwner The owner, A text string, up to 128 high-level bytes in length. qualifier, collection, or schema of the table that contains the foreign key constraint column. This token is required. 23.1.2.2 Examples of values Table 13 provides example values for each token to illustrate the kind of metadata that you might provide for each token. Table 13. Example values for ForeignKey.tag tokens Token Example value *ConstraintName Department *DatabaseName Finance Warehouse *ForeignColumnKeyName Country_code *ForeignKeyID 07011 *ForeignTablePhysicalName Geography *MapID 02568 *PrimaryColumnKeyName State_code *Referenced PrimaryKeyID Name *PrimaryTablePhysicalName City *PrimaryTableOwner DB2ADMIN *ForeignTableOwner IWH 23.1.3 ForeignKeyAdditional.tag Use this template to define a composite foreign key. Before you use the ForeignKeyAdditional.tag template, you must define a constraint (using the ForeignKey.tag template) on the first column. You can then add columns by using this template for each column that you want to add. 23.1.3.1 Tokens Table 14 provides information about each token in the template. Table 14. ForeignKeyAdditional.tag tokens Token Description Allowed values Entity parameters *ForeignColumnKeyName The name of the column on A text string, up to which the foreign key 80 bytes in length. constraint is being defined. *ForeignKeyID The key that uniquely A numeric value. identifies the foreign key. The key must be unique from all other keys in the tag language file. Tip: Finish processing the ForeignKey.tag template before increasing the value of the key. This token is required. *MapID An arbitrary number that A numeric value. is unique from all other keys in the interchange file. Tip: Finish processing the ForeignKeyAdditional.tag template before increasing the value of this token. This token is required. *MapSeqNo A number signifying each Unique, increasing, additional column added consecutive number as part of a composite starting at 2. key to the foreign key constraint. *PrimaryColumnKeyName The column name of the A text string, up to referenced column. 80 bytes in length. Relationship parameters *DatabaseName The business name of the A text string, up to warehouse source or 40 bytes in length. warehouse target. This token is required. *ForeignTablePhysicalNameThe database-defined name A text string, up to of the physical table 80 bytes in length. containing the foreign keys that reference the keys in other tables. *PrimaryTablePhysicalNameThe database-defined name A text string, up to of the physical table 80 bytes in length. containing the keys that are referenced by the foreign keys. *PrimaryTableOwner The owner, high-level A text string, up to qualifier, collection, or 128 bytes in length. schema of the table that contains the primary key column that is being referenced. This token is required. *ForeignTableOwner The owner, high-level A text string, up to qualifier, collection, or 128 bytes in length. schema of the table that contains the foreign key constraint column. This token is required. 23.1.3.2 Examples of values Table 15 provides example values for each token to illustrate the kind of metadata that you might provide for each token. Table 15. Example values for ForeignKeyAdditional.tag tokens Token Example value *DatabaseName Finance Warehouse *ForeignColumnKeyName Country_code *ForeignKeyID 07011 *ForeignTablePhysicalName Geography *MapID 22578 *MapSeqNo 2 *PrimaryColumnKeyName State_code *PrimaryTablePhysicalName City *PrimaryTableOwner DB2ADMIN *ForeignTableOwner IWH 23.1.4 PrimaryKey.tag Use this template to define primary key constraints on tables. The template also defines the relationships to the table and the column on which the constraint is being defined. Before you use the PrimaryKey.tag template, you must define the tables and columns (using the Table.tag and Column.tag templates) on which you want to define the primary key constraint. 23.1.4.1 Tokens Table 16 provides information about each token in the template. Table 16. PrimaryKey.tag tokens Token Description Allowed values Entity parameters *ColumnName The name of the A text string, up to 80 bytes column or field. in length. The name must be unique within a table or field. This token is required. *MapID An arbitrary number A numeric value. that is unique from all other keys in the interchange file. Tip: Finish processing the PrimaryKey.tag template before increasing the value of this token. This token is required. *PrimaryKeyID The key that A numeric value. uniquely identifies the primary key. The key must be unique from all other keys in the tag language file. Tip: Finish processing the ForeignKey.tag template before increasing the value of the key. This token is required. Relationship parameters *DatabaseName The business name of A text string, up to 40 bytes the warehouse source in length. or warehouse target. This token is required. *TableOwner The owner, A text string, up to 128 high-level bytes in length. qualifier, collection, or schema of the table that contains the column. This token is required. *TablePhysicalName The physical name of A text string, up to 80 bytes the table or file in length. that contains the column as defined to the database manager or file system. This token is required. 23.1.4.2 Examples of values Table 17 provides example values for each token to illustrate the kind of metadata that you might provide for each token. Table 17. Example values for PrimaryKey.tag tokens Token Example value *ColumnName Country_code *DatabaseName Finance Warehouse *MapID 54627 *PrimaryKeyID 74622 *TableOwner DB2ADMIN *TablePhysicalName GEOGRAPHY 23.1.5 PrimaryKeyAdditional.tag Use this template to define a composite primary key. Before you use the PrimaryKeyAdditional.tag template, you must define a constraint on the first column by using the PrimaryKey.tag template. Any additional columns can then be added using this template. The template also relates the additional primary keys to the first primary key which is defined using PrimaryKey.tag. 23.1.5.1 Tokens Table 18 provides information about each token in the template. Table 18. PrimaryKeyAdditional.tag tokens Token Description Allowed values Entity parameters *ColumnName The name of the column or A text string, up to 80 field. bytes in length. The name must be unique within a table or field. This token is required. *FirstPrimaryKeyID The key that uniquely A numeric value. identifies the primary key. The key must be unique from all other keys in the tag language file. Tip: Finish processing the ForeignKey.tag template before increasing the value of the key. This token is required. *MapID An arbitrary number that A numeric value. is unique from all other keys in the interchange file. Tip: Finish processing the PrimaryKeyAdditional.tag template before increasing the value of this token. This token is required. *MapSeqNo A number signifying each Unique, increasing, additional column added consecutive number as part of a composite starting at 2. key to the primary key constraint. Relationship parameters *DatabaseName The business name of the A text string, up to 40 warehouse source or bytes in length. warehouse target. This token is required. *TableOwner The owner, high-level A text string, up to 15 qualifier, collection, or bytes in length. schema of the table that contains the column. This token is required. *TablePhysicalName The physical name of the A text string, up to 80 table or file that bytes in length. contains the column as defined to the database manager or file system. This token is required. 23.1.5.2 Examples of values Table 19 provides example values for each token to illustrate the kind of metadata that you might provide for each token. Table 19. Example values for PrimaryKeyAdditional.tag tokens Token Example value *ColumnName Country_code *DatabaseName Finance Warehouse *MapID 99542 *MapSeqNo 2 *FirstPrimaryKeyID 07801 *TableOwner DB2ADMIN *TablePhysicalName GEOGRAPHY ------------------------------------------------------------------------ 暖珫眃哎柼祗腦 ------------------------------------------------------------------------ 24.1 肄霿纋柞戍式詰蘞浀 媥 DB2 嚭珫眃肄霿纋柞戍式詰蘞浀+鶖耍浂Q暖珫眃↓@纋柞僬 媥蚼C ------------------------------------------------------------------------ 24.2 鸉爩嗀 AS/400 鋅z獛搨戍 Essbase VWPs 鸉爩嗀 AS/400 鋅z獛搨戍 Essbase VWPs耍ARBORLIB 碉 ARBORPATHB 澱鏺Q]肄 長 *sys 耶媥蛈 ID 澱鏺嗀 *jobctl v貙浂灁]肄耶o茫 繐嵢洄揅壧 Essbase 戍定耶 ------------------------------------------------------------------------ 24.3 媥豜挖G暖珫眃鴶翷甇瓬洄膣幏戍洇委甇 彀鏼~祗腦戍纙J 10 珫耍嗀柜譇削膃爭A板o皇戍胃 愩刖鞮肄貙襏 1 (貙鯗 扛膣呃柳歃戍旨麩) 虋洢闟Bz獛耍 屑骷洢闟烈ず欑Bz獛戍 1 纙J耶 彀詻 嗀扛如柰耍殛削膋O儘俊戍耶纙J 8 柫譇醳襶戍醳珫耍柜醳闉z搨板 儘俊戍耶擂睦欑長赴柜柰托柳歃鄧擁鬞悚到僬咻碉癸托祌繾戍黈 旨麩赳耶 ------------------------------------------------------------------------ 24.4 鴉鉞 赴鴉鉞赳彀哎柼祗腦戍睦長赴暖鴉鉞赳耶 ------------------------------------------------------------------------ 24.5 纋柞翭韄劑 赴肄霿纋柞翭韄劑赳彀哎柼祗腦戍睦長赴纋柞纙J翭韄劑赳耶 ------------------------------------------------------------------------ 24.6 枵癸砰躨 枵癸砰躨哎柼祗腦胃醳襶媴ず鎈熪擁戍薿繐砷耍珫柜醳長赴枵戍 癸砰躨鑭嗀譂≡a鋇赳耶 殛醳譂擋腺柜枵砷戍媴耶 ------------------------------------------------------------------------ 24.7 s柱戍膣 彀哎柼祗腦戍"s柱"遭ガ珫耍 赴s柱僬咻〝獛赳瓬赴s柱癸式獛 赳遭ガ戍膣珫跛耶鞮養鄧彀祗腦豯矧珫o遭ガ耶 ------------------------------------------------------------------------ 24.8 枵式 祗腦遭ガ赴枵僬咻〝瓬蘞浀↗暖僬峙洐v瓬 赴枵癸式暖癸珫赳 腺觻擋戠祅嗀緺儘俊戍鴶翷耶魅氡長胃 蜙p耍XYZ* |廌找板鄧o戠祅礤慍戍式瓬蘞浀#C 睦長胃 蜙p耍XYZ% |廌找板鄧o戠祅礤慍戍式瓬蘞浀#C ------------------------------------------------------------------------ 24.9 RUNSTATS 碉 REORGANIZE TABLE 哎柼祗腦鐖幏 o洢擋獛搨戍哎柼祗腦耍繐鸉郬p戍式耍詰板茫繐薿憒圻〝耍澱鏺碉 峙袛癸膣耶墨腺纙J柞枵僬垠A鞮骷茫繐膣纙J碉僬垠C ------------------------------------------------------------------------ 24.10 赴q何赳贄貘耍赴暖洇委赳烈赴獛赳翭韄劑 彀赴暖洇委赳翭韄劑戍赴q何赳贄珫柞D胃 赴鷫舌赳枵戍鱌絛]肄襏長 戠耶 睦鶔長胃 赴鷫舌赳枵戍鱌絛]肄襏長 戠耶 彀赴獛赳翭韄劑戍赴q何赳贄珫耍鷫舌|鱌絛]肄歈赴暖洇委赳翭韄劑珫戍] 肄襏耶礔潲]肄襏耍堉|醨欑襏]肄歈容熡枵祌媥蛈犌杞q氡犨麩廇鶐耶礔 欑熡枵媥蛈犌杞q氡犨麩廇鶐耍堉|醨]肄長熡枵媥蛈犌杜媥蛈 ID耶 ------------------------------------------------------------------------ 24.11 赴鋅z獛搨抑赳翭韄劑戍鋅z獛搨研 暖鋅z鎈鏮獛搨擁暖鋅z獛搨耍赴鋅z獛搨抑赳翭韄劑戍鋅z獛搨研 虪鸉獛搨戍巰投耶繐鶔戍巰投耍唏 IBM 繐臡鞮繐o鷽耶 ------------------------------------------------------------------------ DB2 OLAP Starter Kit IBM DB2 OLAP Starter Kit 7.2 彀柜鏼~鑶豜W柱閭 Oracle耑MS-SQL耑Sybase 瓬 Informix 皖搨定扯z鑶 (RDBMS) 戍儭耶 次劑 7.2 霄鰗詻嗀儭戍 RDBMS 戍 Script 碉泚爩耍霄服 DB2耶 擂謰嗀柜貙耍欏僝鬞巷囓酀25.8, 洄何 齶ガ烈貙耶 DB2 OLAP Starter Kit for DB2 Universal Database 次劑 7.2 戍再髕獛搨瞉虎 腺 Hyperion Essbase 6.1 獛搨 2 閭柼 Hyperion Integration Server 2.0 獛搨 2耶 ------------------------------------------------------------------------ 25.1 OLAP Server 霠 礔茫 DB2 OLAP Starter Kit 稒s戍揅壧瓬媥郔聧Z耍 巷yX DB2 OLAP Server 霠戍 Library 贄胃 http://www.ibm.com/software/data/db2/db2olap/library.html ------------------------------------------------------------------------ 25.2 儭戍鏼~鑶蛈A髕獛搨瞉 OLAP Starter Kit for Version 7.2 戍再齗祅麩儭柰媴鏼~鑶袑M再髕獛搨瞉 胃 * 揅壧 SP 5 戍 Windows NT 4.0 烈 Windows 2000 * AIX 次劑 4.3.3 詰鄧柼 * Solaris 鏼~鑶蛈蜀 2.6耑7 烈 8 (Sun OS 5.6耑5.7 詰 5.8) 雚膼龢鷑p鬾腺 Windows 95耑Windows 98耑Windows NT 4.0 SP5 烈 Windows 2000耶 ------------------------------------------------------------------------ 25.3 蘠歈 DB2 OLAP Starter Kit 彀 UNIX 柼戍揅壧 揅壧 DB2 OLAP Starter Kit 巷稒 DB2 Universal Database for UNIX 戍揅壧劑 獛灁耶 恙|墨揅壧獛搨舅鑶袛到胃 (AIX: /usr/lpp/db2_07_01胚 Solaris: /opt/IBMdb2/V7.1)耶 擔膃束儐q耍|擔譇 DB2 OLAP 到 (essbase 烈 is) 腺裺媥蛈稘_絛 到柰 sqllib戍到柰耶嵥柜繾鼭齗譧秏\鸉柜譇 OLAP 再齗蒤C 礔繐蘠 歈揅壧耍媥蛈瑔鏺韥]肄 is/bin 到耍 廅長擂潲妄膣鑶蛈 is/bin 到耶擂澱鏺膣膃村_絛到柰戍養柞枵到耶 礔繐蘠歈彀 Solaris 柼戍揅壧耍巷鄧 ID 熡枵炵黈 sqllib/is 到耍 潒 枵柰媴銻胃 rm bin mkdir bin cd bin ln -s /opt/IBMdb2/V7.1/is/bin/ismesg.mdb ismesg.mdb ln -s /opt/IBMdb2/V7.1/is/bin/olapicmd olapicmd ln -s /opt/IBMdb2/V7.1/is/bin/olapisvr olapisvr ln -s /opt/IBMdb2/V7.1/is/bin/essbase.mdb essbase.mdb ln -s /opt/IBMdb2/V7.1/is/bin/libolapams.so libolapams.so ------------------------------------------------------------------------ 25.4 歧呃 OLAP Starter Kit 戍 ODBC IBM DB2 OLAP Starer Kit 7.2 茫繐柜譇 ODBC.ini 耍 ODBC 鏼~雚 OLAP Integration Server s鼪皖搨僬姜M赴OLAP 鴶翷悚到赳耶 * 彀 Windows 鑶豜W耍殛腺鑶逌n到戍 HKEY_LOCAL_MACHINE/SOFTWARE/ODBC 洇耶 巷媥 ODBC Data Source Administrator 鈮x酨嗀愩摃s鼪皖搨僬咻材鬞耶 * 彀 UNIX 鑶豜W耍揅壧獛搨擔柜譇研悚 odbc.ini耶儵暖酨嗀愩摃s鼪 皖搨僬咻材鬞耍巷媥郩z摴n戍哀齗鄎s殛耶 殛 ODBC.ini 墨 ODBC n和麩虪耍洇鰗腺 Microsoft Office n洇耶 腺養揅壧 ODBC X韥獛搨詰 ODBC 扯z獛搨戍睦擋獛搨戍欏僝鬞耍巷yX柰媴 霠胃 http://support.microsoft.com/support/kb/articles/Q113/1/08.asp耶 AIX 鼭齗柼戍 Oracle 媥蛈猺G儵歧呃 ODBC for Oracle耍鞮澱鏺鶔s ODBC.ini 鉈嵢 MERANT 3.6 X韥獛搨耶 彀次劑 7.2 珫耍OLAP Starter Kit 扯z ODBC s哎僯s鼪皖搨僬姜M 赴OLAP 鴶翷悚到赳耶長柅儭o ODBC s鼪耍 OLAP Starter Kit 彀 Windows NT 4.0耑Windows 2000耑AIX 瓬 Solaris 柼媥 ODBC X韥獛搨耶 * DB2 Universal Database 次劑 6 定雚膼鱄G 彀 Windows NT 4.0 SP5 詰 Windows 2000耑AIX 4.3.3 瓬 Solaris 鏼~鑶 2.6耑7 詰 8 (Sun OS 5.6耑 5.7 詰 5.8)柼板 DB2 次劑 6 ODBC X韥獛搨耶 * DB2 Universal Database 7.1 定雚膼鱄G 彀 Windows NT 4.0 SP5 詰 Windows 2000耑AIX 4.3.3 瓬 Solaris 鏼~鑶 2.6耑7 詰 8 (Sun OS 5.6耑 5.7 詰 5.8) 柼板 DB2 次劑 7 ODBC X韥獛搨耶 * Oracle 8.04 碉 8i SQL*Net 8.0 定雚膼鱄G 彀 Windows NT 4.0 SP5 詰 Windows 2000耑AIX 4.3.3耑Solaris 鏼~鑶 2.6耑7 詰 8 (Sun OS 5.6耑5.7 詰 5.8) 柼板 MERANT 3.6 ODBC X韥獛搨耶 * MS SQL Server 6.5.201 (茫繐赴定雚膼鱄v)胃彀 Windows NT 4.0 SP5 詰 Windows 2000 柼板 MS SQL Server 6.5 ODBC X韥獛搨耶 * MS SQL Server 7.0 (茫繐赴定雚膼鱄v)胃彀 Windows NT 4.0 SP5 詰 Windows 2000 柼板 MS SQL Server 7.0 ODBC X韥獛搨耶 25.4.1 彀 UNIX 鑶蛌[呃僬 彀 AIX 碉 Solaris 柼耍鞮澱鏺韥]肄 ODBC 戍耍虋哀 odbc.ini 鄋[呃皖搨僬姜M赴OLAP 鴶翷悚到赳耶礔鞮s柱詰鶔X韥獛搨詰 垠A 巷髕澱哀 odbc.ini 耶 25.4.1.1 歧呃 ODBC 彀 UNIX 鑶豜W耍鞮澱鏺]肄浂酨灥 ODBC 眃祅麩耶Starter Kit 鱌絛 到珫虪 is.sh 碉 is.csh Shell Script 僯]肄澱繐戍耶 彀媥 ODBC 僯s 鼪僬峙鶖e耍鞮澱鏺鸉珫柜譇 Script耶 腺鞮擋僤鬾 OLAP Starter Kit 戍媥蛈睚W投耍鞮睦欑彀熡枵 Script 珫霄鰗o Script耶 25.4.1.2 哀 odbc.ini 儵腺 odbc.ini 珫歧呃僬垠A鞮澱鏺s柱 ODBC 僬咻抖W投碉祗腦耍 彀 鞮黳殛僬待W投詻擔戍鱦沮珫虪 ODBC X韥獛搨尚耑巰瓬醋X韥獛 搨]肄襏耶 揅壧獛搨彀 ISHOME 到珫揅壧柜譇削蒴 odbc.ini耶 殛霄鰗q擋 ODBC s鼪碉詻儭戍 ODBC X韥獛搨戍歧呃鬞耶 巷媥軝鷽長鱌貂耍醨鞮 擋戍 ODBC X韥獛搨杯皖搨僬姜M赴OLAP 鴶翷悚到赳耶 礔鞮媥蛈孚板 odbc.ini耍 巷醨 ODBCINI ]肄歈鞮媥蛈孚巰耶 25.4.1.3 s柱僬持 odbc.ini 1. 彀鸉 OLAP Starter Kit 再齗戍鑶豜W耍巷媥蚴禾p vi 戍戠哀獛搨 礤鼖 odbc.ini 耶 2. [ODBC Data Sources] 長藃戍鱦沮耍s柱柜僬待W投碉祗腦耍 愩胃 mydata=data source for analysis耶長柅鞻Vc耍僬咻抖W投睦欑 幏 RDBMS 珫戍定巰投耶 3. s柱柜鄧服躲鰗服s僬咻抖W投耍蜙p [mydata]耍彀珫s柱柜譇 s戍鱦沮耶 4. 彀僬待W投鼪柰鄏改X珫耍s柱殛僬待W投瓬摃澱繐戍 ODBC X韥 獛搨鬞詻茫戍 ODBC X韥獛搨祌蘠鬷尚碉巰投耶 拚鶅柰媴騂躒詻戍 削裺僰杯鞮 RDBMS 柼戍僬垠C 巷俊肄 ODBC X韥獛搨俊酨彀腺 鞮彀 Driver= ]肄珫肄戍鑅耶 5. ♂z哀 odbc.ini 蘠歈耍巷暖酨耍膣戠哀獛搨耶 25.4.1.4 ODBC 戍 DB2 ]肄襏削 柰媴削ず愩摃哀 odbc.ini耍媥 IBM DB2 絛 ODBC X韥獛搨僯s鼪 AIX 柼戍 DB2 Universal Database 次劑 6.1 戍皖搨僬 db2data耶 彀 vi 哀 齗珫耍媥 $ODBCINI 銻鄎s odbc.ini耍 虋麰枵柰媴闉z搨胃 [ODBC Data Sources] db2data=DB2 Source Data on AIX ... [db2data] Driver=/home/db2inst1/sqllib/lib/db2.o Description=DB2 Data Source - AIX, native 25.4.1.5 ODBC 戍 Oracle ]肄襏削 鄧柰削蒟飛愩摃哀 odbc.ini耍媥 MERANT Version 3.6 ODBC X韥獛搨僯s鼪 Oracle 次劑 8 (彀 Solaris) 戍皖搨僬 oradata耶 殛削蓔洐ALogonID 碉 Password 鄧 OLAP Starter Kit 媥蛈睚W投碉q俄戍舫襏僳反J耶 [ODBC Data Sources] oradata=Oracle8 Source Data on Solaris ... [myoracle] Driver= /export/home/users/dkendric/is200/odbclib/ARor815.so Description=my oracle source 25.4.2 彀 UNIX 鑶豜W歧呃 OLAP 鴶翷悚到 彀 AIX 碉 Solaris 柼歧呃 OLAP Metadata Catalog ю歧呃柜譇僬垠C 礔繐 OLAP Metadata Catalog 定耍巷彀 odbc.ini 珫s柱柜譇僬待W投碉鱦 沮耍 愩 25.4.1.2, 哀 odbc.ini 詻翷耶茫繐擂鶔耶 鞮澱鏺樺彀儭戍 RDBMS 珫擔柜譇赴OLAP 鴶翷悚到赳定耍 浂醨擂歧呃 歈 ODBC 僬垠C 鄧柰削蒟飛愩摃哀 odbc.ini耍媥郬絛 ODBC X韥獛搨僯s鼪 DB2 次劑 6.1 (彀 Solaris 柼) 戍赴OLAP 鴶翷悚到赳TBC_MD耶 [ODBC Data Sources] ocd6a5a=db2 v6 ... [ocd6a5a] Driver=/home/db2instl/sqllib/lib/db2.0 Description=db2 25.4.3 彀 Windows 鑶豜W歧呃僬 儵腺 Windows NT 詰 Windows 2000 鑶豜W歧呃皖搨僬垠A 鞮澱鏺鼖韥赴ODBC 扯z獛搨赳耍潒擔s哎僯s鼪鞮繐擋鉈擔 OLAP 研悚碉 metaoutline 戍 僬垠C雚 Windows 嚭鬧鸉赴ODBC 扯z獛搨赳洢擋獛搨耶柰媴削蒡擔柜譇 DB2 僬垠F醋 RDBMS 戍|嵥耶 儵媥蚼uODBC 扯z獛搨赳鄋[呃皖搨僬垠A巷蘠歈柰媴纙J胃 1. 彀 Windows 柼扯z獛搨耍礤鼖赴嚭鬧赳甇耶 2. 彀赴嚭鬧赳甇珫耍鸉柰媴珫柜醳纙J胃 a. 彀 Windows NT 柼耍柰 ODBC 媥耍 礤鼖赴ODBC 僬咩噠z獛 搨赳耶 b. 彀 Windows 2000耍柰鑶蚹噠z泚爩媥耍 嫀柰僬 (ODBC) 媥耍 礤鼖赴ODBC 僬咩噠z赳耶 3. 彀赴ODBC 僬咩噠z獛搨赳珫耍柜柰鑶釬持僬待W投癸蒤C 4. 柜柰s柱僳}鼖赴擔s僬垠v耶 5. 彀赴ODBC 扯z獛搨赳戍赴擔s僬垠v戍X韥獛搨媴珫耍灥 譂’X韥獛搨耍蜙p IBM DB2 ODBC X韥獛搨耍 柜柰蘠歈僳}鼖赴ODBC IBMDB2 X韥獛搨 - s柱赳耶 6. 彀赴ODBC IBM DB2 X韥獛搨 - s柱赳珫耍彀定顢巰柰詹媴珫耍 灥鞮戍皖搨僬 (蜙p耍殛削蒴擋獛搨珫戍 TBC) 戍定巰投耶 7. 彀祗腦戠珫耍枵擋戍祗腦鄏▽鞮繐愩摃媥軝X韥獛搨耍柜柰s柱 耶 蜙p耍枵柰媴戠鉒飛 My Business 定胃 Customers, products, markets 鞮養枵柰媴戠鉒飛ㄚd蒴擋獛搨定胃 Sample relational data source o祗腦養彀鞮雚 OLAP Starter Kit Desktop s哎耍灨饎鞮ル顢養戍 僬垠C 8. 柜柰赴俊肄赳鄏倎^赴ODBC 僬咩噠z赳耶 鞮枵戍僬待W 投瓬鞮杯戍X韥獛搨ず彀鑶釬持僬待W投癸膃杜t釬僬待C珫耶 儵哀僬咻妒[呃鬞胃 1. 灥僬待W投耍柜柰歧呃僳}鼖赴ODBC IBM DB2 - s柱赳耶 2. 儘鞮繐鶔戍摃鬞耶 3. 歃俊肄鄧膣耶 25.4.4 彀 Windows 鑶豜W歧呃 OLAP 鴶翷悚到 儵腺 Windows NT 詰 Windows 2000 柼歧呃赴OLAP 鴶翷悚到赳耍 巷鼖韥赴ODBC 扯z獛搨赳耍潒擔s哎僯s鼪鰗嗀赴OLAP 鴶翷悚到赳定戍僬垠C 柰媴削蒡擔柜譇 DB2 僬垠F醋 RDBMS 戍|嵥耶 儵擔赴OLAP 鴶 翷悚到赳戍僬垠A巷蘠歈柰媴纙J胃 1. 彀柼扯z獛搨耍礤鼖赴嚭鬧赳甇耶 2. 彀赴嚭鬧赳甇珫耍鸉柰媴珫柜醳纙J胃 a. 彀 Windows NT 柼耍柰 ODBC 媥耍 礤鼖赴ODBC 僬咩噠z獛 搨赳耶 b. 彀 Windows 2000耍柰鑶蚹噠z泚爩媥耍 嫀柰僬 (ODBC) 媥耍 礤鼖赴ODBC 僬咩噠z赳耶 3. 彀赴ODBC 僬咩噠z獛搨赳珫耍柜柰鑶釬持僬待W投癸蒤C 4. 柜柰s柱僳}鼖赴擔s僬垠v耶 5. 彀赴ODBC 扯z獛搨赳戍赴擔s僬垠v戍X韥獛搨媴珫耍灥 譂’X韥獛搨耍蜙p IBM DB2 ODBC X韥獛搨耍 柜柰蘠歈僳}鼖赴ODBC IBMDB2 X韥獛搨 - s柱赳耶 6. 彀赴ODBC IBM DB2 X韥獛搨 - s柱赳珫耍 彀定顢巰柰詹媴珫耍 灥鞮戍赴OLAP 鴶翷悚到赳(蜙p耍殛削蒴擋獛搨珫戍 TBC_MD) 戍 定巰投耶灥戍定巰投|椻韥ず彀僬待W投戠珫耶 7. 礔鞮繐鶔僬咻抖W投耍巷灥僬待W投戠珫ず戍巰投耍枵s 戍巰投鄏▽鞮繐愩摃媥軝X韥獛搨耍柜柰s柱耶 蜙p耍鞮養枵柰媴巰 投鄏▽鞮繐媥軝X韥獛搨僯s鼪柜譇赴OLAP 鴶翷悚到赳胃 OLAP Catalog first 鞮養枵柰媴巰投鄏▽鞮繐s鼪削蒴擋獛搨赴OLAP 鴶翷悚到赳 定胃 TBC_MD 8. 彀祗腦戠珫耍枵祗腦鄏▽鞮繐愩摃媥軝X韥獛搨耶 蜙p耍鞮養枵 柰媴戠鉒飛ㄜuOLAP 鴶翷悚到赳胃 My first models and metaoutlines 鞮養枵柰媴戠鉒飛ㄚd蒴擋獛搨赴OLAP 鴶翷悚到赳定胃 Sample models and metaoutlines o祗腦養彀鞮雚 OLAP Starter Kit Desktop s鼪赴OLAP 鴶翷悚到赳 耍 灨饎鞮ル顢Q繐戍悚到耶 9. 柜柰赴俊肄赳鄏倎^赴ODBC 僬咩噠z赳耶 鞮枵戍僬待W 投瓬鞮杯戍X韥獛搨ず彀鑶釬持僬待W投癸膃杜t釬僬待C珫耶 儵哀僬咻妒[呃鬞胃 1. 灥僬待W投耍柜柰歧呃僳}鼖赴ODBC IBM DB2 - s柱赳耶 2. 儘鞮繐鶔戍摃鬞耶 3. 歃俊肄鄧膣耶 25.4.5 彀鞮歧呃僬峙鶖 彀歧呃皖搨僬姜M赴OLAP 鴶翷悚到赳祌耍饓養雚 OLAP Starter Kit s鼪耶潒養鄧擔耑瓬暖酨 OLAP 研悚碉 metaoutline耶 彀碰駒 SQL Server 定齔繾耍SQL Server ODBC X韥獛搨養|O耶 巷腺 定唏哎薿灚耶柱閭X韥獛搨O齔繾養鞻殛齶ガ耶 欏僝鬞耍巷囓酀鞮詻媥 戍X韥獛搨戍 ODBC 麩耶 腺 ODBC s鼪齶ガ烈鬙讘耍巷囓酀 OLAP Integration Server System Administrator's Guide耶 ------------------------------------------------------------------------ 25.5 雚 OLAP Starter Kit 柼扯z獛搨熡枵 媥 OLAP Starter Kit 柼扯z獛搨鉈擔 OLAP 研悚碉 Metaoutline耍巷醨雚 霠ns鼪譇再齗胃DB2 OLAP 鬷幏再齗碉 DB2 OLAP 再齗耶熡枵 柼扯z獛搨s鼪o譇再齗戍澱繐鬞耶彀戍齒耍巷枵嗀 DB2 OLAP 鬷幏再齗戍鬞耶彀戍餒耍巷枵嗀 DB2 OLAP 再齗戍鬞耶 儵s鼪 DB2 OLAP 鬷幏再齗胃 * 再齗胃枵鬷幏再齗戍遭q巰投詰 IP 鶐耶 愩刖鞮洄揅壧鬷幏再齗 碉柼扯z獛搨腺嵥柜譇泚鏼霠耍悚戍襏長 "localhost" 詰 "127.0.0.1"耶 * OLAP 鴶翷到胃s鼪 OLAP 鬷幏再齗耍澱鏺肄鴶翷到耶 OLAP 鬷幏再齗暖酨嗀 OLAP 研悚碉巰長 Metadata Catalog 皖搨定詻擔 戍 metaoutline 戍鬞耶 殛皖搨定澱鏺熡韄聤 ODBC耶 到定嗀柜 OLAP 鬷幏再齗ル戍皖搨式耶 彀熡枵珫耍肄鬷幏再齗耍 虋姆礤 OLAP 鴶翷到戍柰詹閱式耍 鞮養鄧表 OLAP 鬷幏再齗 詻何D戍 ODBC 僬待W投祌媴式耶 鰗嗀鴶翷悚到式戍 ODBC 定耶 * 媥蛈睚W投碉q俄胃媥郩z彀熰貘詻肄戍媥蛈睚W投碉q俄耍OLAP 鬷幏 再齗醨烈鴶翷到s膣耶 o板熡枵鎟耍酨彀腺再齗 (板雚膼鱄A 唏再齗碉雚膼攥b嵥柜鬧鼭齗鸉)耶媥蛈睚W投澱鏺長擔 OLAP 鴶翷 到戍媥蛈猺C 騶屑耍OLAP 鬷幏再齗醨到定洇戍皖搨式 耍廅長式找戍巰投柜皇耶 DB2 OLAP 再齗鬞長擋戍耍詻鄧耍彀熡枵戍餒祌枵養板曉戍耶 椷板耍嗀柼扯z獛搨碉扯z獛搨戍鏼~茫繐碉 DB2 OLAP 再齗s鼪耶 愩刖鞮 o柰酯A☉べX再齗茫繐碉 DB2 OLAP 再齗s鼪鄧蘠歈鞮詻繐臡戍鏼~ 耍柼扯z獛搨|嫀柜歃ず熡枵耶 鞮彀熡枵戍 DB2 OLAP 再齗 穭枵耶 儵s鼪 DB2 OLAP 再齗胃 * 再齗胃枵 DB2 OLAP 再齗戍遭q巰投詰 IP 鶐耶 愩刖鞮彀鸉 OLAP Starter Kit耍屑 OLAP 再齗碉鬷幏再齗虎嵥耶 愩刖鬷幏再齗碉 OLAP 再齗揅壧彀嵥戍遭q耍巷枵肄霿腺 OLAP 鬷幏再齗洇戍遭q巰投詰 IP 鶐耶 * 媥蛈睚W投碉q俄胃媥郩z彀熰貘詻肄戍媥蛈睚W投碉q俄耍 OLAP 鬷幏 再齗醨烈 DB2 OLAP 再齗s膣耶 殛媥蛈睚W投碉q俄澱鏺洄鑌肄霿彀 DB2 OLAP 再齗洇耶 OLAP 再齗椻鏼~鑶袛t鴉廇扯z擂詻嗀戍媥蛈睚W 投碉q俄耶 25.5.1 Starter Kit 熡枵削 柰媴削裲]耍彀 OLAP Starter Kit 揅壧齔繾耍鞮擔柅 OLAP 削蒤A 虋灥柅 db2admin 鏼長扯z舌媥蛈 ID耍password 長扯z舌q俄耶 * OLAP 鬷幏再齗胃再齗板 localhost耍 OLAP 鴶翷到板 TBC_MD耍媥 舌巰投板 db2admin耍q俄板 password * DB2 OLAP 再齗胃再齗板 localhost耍媥蛈睚W投板 db2admin ------------------------------------------------------------------------ 25.6 椻擔碉歧呃 OLAP Starter Kit 戍削裱定 揅壧 OLAP Starter Kit 耍削裱定|椻韥擔耶柰媴鬙繾A澱繐耍愩摃 椻揅壧到碉削裱定耶 1. 彀甇柰耍柜柰 礤絛 -->獛搨鐖-->DB2 for Windows NT--> 祺銻甇耍鄧礤 鼖赴祺銻珫眃赳甇耶 2. 擔到定胃 a. 枵 db2 create db OLAP_CAT b. 枵 db2 connect to OLAP_CAT 3. 擔定洇戍式胃 a. \SQLLIB\IS\ocscript\ocdb2.sql b. 枵 db2 -tf ocdb2.sql 4. 擔削裺僬拼定胃 a. 枵 db2 connect reset b. 枵 db2 create db TBC c. 枵 db2 connect to TBC 5. 擔定洇戍式胃 a. \SQLLIB\IS\samples\ b. 盎 tbcdb2.sql \SQLLIB\samples\db2sampl\tbc c. 盎 lddb2.sql \SQLLIB\samples\db2sampl\tbc d. \SQLLIB\samples\db2sampl\tbc e. 枵 db2 -tf tbcdb2.sql f. 枵 db2 - vf lddb2.sql 耍鄧枵削裺僬拼式洇耶 6. 擔削蒝到定胃 a. 枵 db2 connect reset b. 枵 db2 create db TBC_MD c. 枵 db2 connect to TBC_MD 7. 擔定洇戍式胃 a. \SQLLIB\IS\samples\tbc_md b. 盎 ocdb2.sql \SQLLIB\samples\db2sampl\tbcmd c. 盎 lcdb2.sql \SQLLIB\samples\db2sampl\tbcmd d. \SQLLIB\samples\db2sampl\tbcmd e. 枵 db2 -tf ocdb2.sql f. 枵 db2 -vf lcdb2.sql耍鄧枵削蜧y翷式耶 8. 歧呃 ODBC for TBC_MD, TBC, AND OLAP_CAT胃 a. 柜柰礤絛-->]肄-->嚭鬧耍鄧礤鼖 NT 嚭鬧 b. 雚媴珫灥 ODBC (詰 ODBC 僬)耶 c. 灥赴鑶 DSN赳癸蒤C d. 柜柰赴s柱赳耶 擔s戍僬急甇礤鼖耶 e. 雚媴珫灥 IBM DB2 ODBC DRIVER耶 f. 柜柰赴蘠歈赳耶 ODBC IBM D2 X韥獛搨 - s柱甇礤鼖耶 g. 彀僬待W投珫耍枵僬 (OLAP_CAT) 戍巰投耶 h. 彀定顢巰珫耍枵顢巰耍詰板柜柰凋耍虋彀媴珫灥 OLAP_CAT耶 i. 柜柰赴俊肄赳耶 j. 腺 TBC_MD 碉 TBC 定耍巷薿鄧柼纙J耶 ------------------------------------------------------------------------ 25.7 騥睦擋獛搨 OLAP Starter Kit 次劑 7.2 揅壧獛搨薿s揅壧 OLAP Starter Kit 削蒴擋獛搨耑定瓬耶 鞮戍{酨 睦擋獛搨碉定洋T耶 潒椴耍彀揅壧祌容耍睚n樺樵鞮戍睦擋獛搨碉 定耶 鞮戍睦擋獛搨彀礤鼖|椻韥騥次劑 7.2耶 ------------------------------------------------------------------------ 25.8 洄何齶ガ烈貙 劑沮蠮媴 DB2 OLAP Starter Kit 戍洄何貙耶 Windows 樹鬧戍 Informix RDBMS 碉 Merant X韥獛搨戍虎委詫 長柅 Windows 樹鬧戍 Merant X韥獛搨爦碉 Informix RDBMS 柜鱌B鏼耍 PATH 闉z搨珫澱鏺s柱柰媴譇醳胃 o C:\Informix o C:\Informix\bin o譇醳澱鏺腺 PATH 戍礤慍耶 OLAP 研悚珫戍碉虎 Metaoutline 祌繾養戍柜癚餼灉 彀欣餼如柰耍鞮擔戍彀 OLAP 研悚珫潲虎睦戍耶 彀柰媴髕珫 |熪擁o餼灉胃 1. 擔虋暖酨柜譇s戍 OLAP 研悚耶 2. 拚鶅殛研悚鉈擔柜譇 metaoutline耍椷虋冀暖酨 metaoutline耶 3. 羽廌 OLAP 研悚耍飁珫柜譇 metaoutline 詻犐戍耶 4. 羽廌 metaoutline耍礤鼖耑狎A嫀薿s礤鼖耶metaoutline 醨霄鰗柜譇 耍殛彀 OLAP 研悚珫潲虎睦戍耶 OLAP Starter Kit 潲妄鱦牁o餼如柰擔戍柜癚碉 metaoutlin 珫戍 媥蛈瑏w霿耶 廅殛耍柜癚|ず彀 metaoutline 珫耍椷 metaoutline 擂長柜譇媥蛈瑏w霿耍廅長 OLAP 研悚珫潲虎睦戍酨 彀耶 彀 Windows 2000 樹鬧柼耍TMP 戍]肄癚歈碉枵噬韖 廅長 Windows 2000 碉 Windows NT 祌繾耍TMP 戍w]鑶袑M媥蛈瑀] 肄嗀詻孤鶩A OLAP Starter Kit 彀 Windows 2000 樹鬧柼鸉耍歈碉 枵|噬韖耶 y歈戍砷鬞昔鬑巆媥蛈碔L妄擔皈酨耶 鞮養灥柰媴 纙J僝伋M殛 Windows 2000 戍貙胃 1. 擔柜譇到 C:\TEMP 2. 醨鑶袑M媥蛈犌孚 TMP ]肄長 TMP=C:\TEMP 揅壧 ODBC 灥鋅{酨戍 Merant X韥獛搨 {酨戍 3.6 Merant ODBC X韥獛搨廈殛揅壧椴鶔s耶 礔鞮雚 OLAP Starter Kit 次劑 7.1 儘和麩 2 詰鶔囍次劑閞耍 鞮睦欑~媥袛鴟e揅壧戍 ODBC X韥獛搨 彀 UNIX 樹鬧柼媥 Merant Informix ODBC X韥獛搨 儵腺 UNIX 樹鬧柼媥 Merant Informix ODBC X韥獛搨耍鞮澱鏺鸉柰媴珫 柜醳韥鏼胃 o 彀鼖韥 Starter Kit 祌容耍醨 LANG ]長 en_US耶蜙p耍礔板 korn shell耍巷枵胃 export LANG='en_US' 臠歃鼖韥 OLAP Starter Kit 芥]肄殛耶 o 礔鞮戍 LANG 洄]肄歈嵥襏耍 巷腺揅壧祌擔柰媴襶 膣胃 ln -s $ISHOME/locale/en_US $ISHOME/locale/$LANG V幏 OLAP 雚膼鷒M再齗戍再髕獛搨瞉 IBM 鞮醨 DB2 OLAP Starter Kit 戍雚膼鷒M再齗祅麩奚彀虎嵥次劑碉 儘和麩柳歃耶 椷彀欣扛如柰耍鞮養V幏雚膼鷒M再齗祅麩戍再髕獛搨瞉 胃 媥軝P柜次劑椷嵥再髕獛搨瞉戍雚膼鷒M再齗 IBM 儭碉嵥媥釬s戍雚膼鷒M順戍再齗耶 L耍潒 IBM 儭耍鞮砏養嵥媥釬順戍雚膼鷒Ms戍再齗耶 鞮養|豃 J柜齶ガ耶蜙p胃 + 靲縥再齗戍鬞昔養儘俊耶鞮養雚膼鬫 message.MDB 僣幏再齗戍柳歃耍饓養鬙讘殛齶ガ耶 + s戍再齗蕶詫鑭嗀鏼擋耶♂z覃潁媥釳s蕶詫耍雚膼鱄B再齗 詰舌養噬耶 + 雚膼鷑i潲妄譂≡as鼪再齗耶 彀嵥柜譇次劑珫媥軝h薿再齗碉柜雚膼 礔鞮茫繐醨柜譇雚膼襴s鼪嵥鼭齗詰鏼~鑶豜W戍騂譇 OLAP 再 齗耍IBM 鞮o再齗曄哩媥蛌縥P次劑碉再髕獛搨瞉耶 鞮戍雚 霠睦欑烈祽C柳歃戍再齗虎嵥耶 礔鞮豃J齶ガ耍屑養茫繐媥豜 嵥雚膼蘼瓗僤t幏譂’屁Dq耍 詰醨詻嗀雚膼鷒M再齗歈虎嵥 戍再髕獛搨瞉耶 V幏嵥次劑戍雚膼鷒M再齗 IBM 儭嵥媥 OLAP Starter Kit 雚膼鷒M再齗次劑 7.1 烈雚 霠碉再齗次劑 7.2耶 IBM OLAP 恙長s次劑柳歃耍 鶔 s碉搨鶔q鎈繐臡雚膼鷒M再齗長虎嵥戍次劑柳歃耶 V幏 IBM 恙 (DB2 OLAP Starter Kit) 碉 Hyperion 恙 (Hyperion Essbase 碉 Hyperion Integration Server) IBM 儭V幏 IBM 戍 OLAP 雚膼鷒M再齗烈 Hyperion Solutions 戍 OLAP 雚膼鷒M再齗耶潒V幏o祅麩彀欣餼如柰養鄧B鏼耍 椷蕶 詫柼戍倌鰫t齙i|y歈齶ガ耶 ------------------------------------------------------------------------ 25.9 OLAP 灚式柱褵鐖 EQD 噬 彀 DB2 OLAP Starter Kit 珫戍灚式柱褵鐖爩嗀 Query Designer (EQD) 祅麩耶 EQD 哎柼祗腦閱式珫詻鰗戍鵏盭耍|ず摃洇委耶 詻睦ず戍鵏蘜 長 OLAP Spreadsheet Add-in User's Guide for Excel 戍 2 耍鄧瓬 OLAP Spreadsheet Add-in User's Guide for 1-2-3耶 EQD 鵏珫戍詻嗀鬞耍養鄧 雚赴鬞珫眃赳o岩y戍 HTML 次瓬 PDF 次泥耶 ------------------------------------------------------------------------ 鬞悚到扯z獛搨扯z銳 ------------------------------------------------------------------------ 26.1 鬞悚到扯z獛搨鱌絛]肄洢擋獛搨 26.1.1 媥釴_絛]肄鬞悚到扯z獛搨 (ICM) 洢擋獛搨耍 鞮{彀養鄧顟擋柰媴銻耍K閭 SQL 闉z搨 CREATE TABLE 闉z搨戍膣黦胃 CREATEIC \DBTYPE dbtype \DGNAME dgname \USERID userid \PASSWORD password \KA1 userid \TABOPT "directory:\tabopt.file" 鞮養鄧雚揅壧 DB2 戍到耍彀 CREATEIC 洢擋獛搨珫肄 TABOPT 戠耶 TABOPT 戠祌戍襏板 tabopt.file耍巰投板鰗嗀蘠鬷戍尚耶愩刖到巰投嗀 曉耍 巷鄧矧襶服搳欑巰投耶tabopt.file 戍洇委澱鏺鰗嗀鬞耍浂K閭 CREATE TABLE 闉z搨耶鞮養鄧媥豜U媴柜 SQL 闉z搨柞枵殛 tabopt.file 耶ICM 洢擋獛搨醨伸殛耍潒醨擂K閭 CREATE TABLE 闉z搨耶 式 20. SQL 闉z搨 IN MYTABLESPACE 鄧 MYTABLESPACE 擔式 DATA CAPTURE CHANGES 鄧趁銬搨擔式虋韄 SQL 鶔 IN ACCOUNTING INDEX IN 鄧 ACCOUNTING 瓬 ACCOUNT_IDX 豯矧擔式 ACCOUNT_IDX 洇委戍瘐j襏毠洟板 1000 柜祅槷r祅耶 o譇s閱骷彀 Windows 瓬 UNIX 鑶豜W媥蚼C 26.1.2 次v齶ガ 愩刖鞮隳柅柰媴鬞昔胃 FLG0083E胃鞮鑭嗀赴IBM 鬞悚到扯z獛搨鱌絛]肄赳洢擋獛搨戍嗀騅v耶 巷直欒鞮≡a戍n鑌蹸鸆詰 IBM ~髕鋅式耶 鞮澱鏺菸曤 DB2 Warehouse Manager 詰 IBM DB2 OLAP Server耍 虋揅壧赴鬞悚到 扯z獛搨赳祅麩耍+狊]鰗柅赴鬞悚到鱌絛]肄赳洢擋獛搨耶 26.1.3 揅壧齶ガ 礔鞮彀揅壧柅 DB2 Warehouse Manager 詰 IBM DB2 OLAP Server 祌耍柎彀虎嵥戍 泚鏼霠柼揅壧 擂赴鬞悚到扯z獛搨扯z舌赳祅麩 (顟擋 DB2 Universal Database CD-ROM)耍 堉|剽柞嗀戍鬞悚到鱌絛]肄洢擋獛搨耶殛耍鞮養鄧雚 \sqllib\bin 到柰耍鋇 createic.bak 烈 flgnmwcr.bak 耍醨牁顢鶔巰長 createic.exe 瓬 flgnmwcr.exe耶 礔鞮繐駙鴉揅壧 DB2 Universal Database 柼戍赴鬞悚到扯z獛搨赳祅麩耍屑o 祅麩 揅壧彀 Data Warehouse Manager 詻揅壧戍嵥柜倔u鏼霠柼耶鞮養鄧囓酀 赴DB2 Warehouse Manager 揅壧銳赳戍 3 赴揅壧鬞悚到扯z獛搨祅麩赳耍泥 表灁柜纙戍鬞耶 ------------------------------------------------------------------------ 26.2 鄧 DB2 次劑 7 鬞悚到扯z獛搨酨灥 DB2 次劑 5 鬞悚到 墨 DB2 次劑 7 揅壧獛詻歧呃戍 DB2 次劑 7 鬞悚到扯z獛搨歃祅麩耍儭酨灥 暖酨彀 DB2 次劑 6 碉 DB2 次劑 7 定戍鬞悚到耶歃祅麩戍歧呃耍酨灥暖 酨彀 DB2 次劑 5 定戍鬞悚到耶DB2 次劑 7 鬞悚到扯z獛搨歃歈樵虋儭 酨灥 DB2 次劑 2 詰祌容次劑戍耶 ]肄鬞悚到扯z舌耍酨鬞悚到戍鬞悚到媥蛈瑏M鬞悚到鱌絛]肄洢擋獛搨耍 暖酨彀 DB2 次劑 5 定胃 1. 彀鑭嗀揅壧 DB2 次劑 7 鬞悚到扯z獛搨戍泚鏼霠耍揅壧 DB2 Connect Enterprise Edition 次劑 6耶 DB2 Connect Enterprise Edition 板 DB2 Universal Database Enterprise Edition 碉 DB2 Universal Database Enterprise - Extended Edition 戍柜 牁耶 愩刖揅壧o DB2 恙戍次劑 6耍潲鏺駙鴉揅壧 DB2 Connect耶 貙: 彀虎嵥戍 Windows NT 詰 OS/2 泚鏼霠耍揅壧 DB2 愫薿次劑耶鞮養鄧 彀擂 Windows NT 泚鏼霠耑 OS/2 泚鏼霠詰 UNIX 泚鏼霠柼揅壧 DB2 Connect耶 2. 歧呃鬞悚到扯z獛搨碉 DB2 Connect 次劑 6耍酨灥 DB2 次劑 5 戍耶欏 僝鬞耍巷囓酀 DB2 Connect 媥豜銳耶鄧柰長澱繐纙J戍[胃 a. 彀 DB2 次劑 5 鑶蚼A媥 DB2 祺銻Bz齗哀次劑 5 戍定耍酨 灥鬞悚到扯z獛搨耶 b. 彀 DB2 Connect 鑶蚼A媥 DB2 祺銻Bz齗灁哀胃 + DB2 次劑 5 鑶蛈 TCP/IP 躒貂 + DB2 次劑 5 鑶蛈材定 + DB2 次劑 5 鑶蛈 DCS 熡到醳 c. 彀鬞悚到扯z獛搨戍泚鏼霠耍媥 DB2 祺銻Bz齗灁哀胃 + DB2 Connect 鑶蛈 TCP/IP 躒貂 + DB2 Connect 鑶蛈材定 嗀哀定戍鬞耍巷囓酀 DB2 Universal Database 揅壧烈歧呃銬 3. 腺鬞悚到扯z獛搨戍暖耍醨 DB2 CLI 和壧n碉zL DB2 Connect 詻酨灥 戍嵧譇定灁s膣耶 柰媴 DB2 銻虪s膣 v5database 戍削蒤A 柜譇糶]詫戍 DB2 次劑 5 戍 定耶媥 DB2 祺銻Bz齗熪鋇柰媴銻耶db2cli.lst 瓬 db2ajgrt 戍 鑅彀 \sqllib\bnd 到珫耶 db2 connect to v5database user 媥蛈 ID using q俄 db2 bind db2ajgrt.bnd db2 bind @db2cli.lst blocking all grant public 媥蛈 ID 板 v5database 戍媥蛈猺A q俄板媥蛈 ID 戍q俄耶 db2cli.list Qs膣 DB2 次劑 5 定耍|熪擁砷耶熪擁砷耍板廅長 殛歧呃虋儭毠悚旨麩耶o醳砷|洋T暖鋅z獛搨 DB2 次劑 5 定戍酨灥耶 茫繐嗀 DB2 Universal Database 次劑 5 戍 FixPak 14 (腺 2000 搤 6 熪 )耍 浂zL DB2 Connect 靲s灥 DB2 次劑 5 戍耶巷囓 FixPak 洇 戍 APAR 哀襶 JR14507耶 ------------------------------------------------------------------------ 26.3 ]鑅鬞悚到 彀 1 1 沮戍纙J 2赴]鑅鬞悚到赳胃 ♂z揅壧柅 DB2 Warehouse Manager 詰 DB2 OLAP Server耍 饓|彀 DB2 Universal Database for Windows NT 珫擔w]戍鬞悚到耶 o譇闉z搨板儘俊戍耶鞮澱鏺肄霿s戍鬞悚到耶欏僝鬞耍巷囓酀赴擔鬞悚 到赳倌鰣C ------------------------------------------------------------------------ 26.4 烈擂恙黈鴶翷 彀 6 赴烈擂恙黈鴶翷赳戍赴ル顢繐洢闟戍 OLAP 旨麩赳鱦沮耍 彀 柫沮嗀柜譇魅氡胃 ♂z洢闟 DB2 OLAP 鬷幏再齗鴶翷耍 |彀鬞悚到戍赴愫薿定繾戍赳烈 OLAP 鬷幏再齗戍式旨麩繾擔膣娩耶 o沮祗腦睦愩柰詻胃 ♂z洢闟 DB2 OLAP 鬷幏再齗鴶翷耍 |彀鬞悚到赴愫薿定旨麩瓬式旨麩珫戍赳 祌繾擔膣娩耶 o柜魅柛鋇{彀衣到 C 赴鴶翷杯赳戍赴鬞悚到扯z獛搨烈 OLAP 再齗繾戍 鴶翷杯赳鱦沮耶 ------------------------------------------------------------------------ 26.5 媥 flgnxoln 銻黈鴶翷 彀 6 赴黈鴶翷赳珫嗀柜譇沮蠮戍癸ガ板 赴ル顢繐洢闟戍 OLAP 旨麩赳耶 彀沮蠮戍獀貘嗀媥 flgnxoln 銻閞挖G OLAP 再齗鴶翷鬞悚到戍削 蒤C殛削ず db2olap.ctl 碉 db2olap.ff 戍到長 x:\Program Files\sqllib\logging耍 o板儘俊戍耶到睦欑愩 87 贄詻祗胃 x:\Program Files\sqllib\exchange耶 ------------------------------------------------------------------------ 26.6 媥 MDISDGC 銻黈鴶翷 6 赴烈擂恙黈鴶翷赳戍赴醨幏 MDIS 戍鴶翷黈癸砰躨 赳( 89 贄)耶鞮養鄧雚 MS-DOS 祺銻柰熪鋇 MDISDGC 銻耍椴睦欑雚 DB2 祺銻甇珫熪鋇欑銻耶欑躒戍柜魅柞D胃赴醨 MDIS 搨戍鴶翷黈歈癸 砰躨赳珫鞮澱 雚 MS-DOS 祺銻熪鋇 DGMDISC 銻耶鞮澱鏺雚 DB2 祺 銻甇珫熪鋇 DGMDISC 銻耶 ------------------------------------------------------------------------ 26.7 碰駒獛搨 赴鬞悚到扯z銳赳珫倔椰妨d蓔浀妙銻霄鰗柅 Program Files 戍到巰投耶 鞮碰駒柜譇霄鰗 Program Files 到巰投戍銻耍 鞮澱鏺醨獛搨碰駒霄彀矧襶 洇耶 蜙p彀衣到 B 赴w樺肄霿戍鬞悚到扯z獛搨旨麩ю悚赳 戍赴鄧w樺肄霿戍旨 麩ю悚鱌絛]肄鞮戍鬞悚到赳沮蠮珫嗀柜譇削蒤C愩刖鞮媥釤o斖 戍削蒤A♂z雚 DOS 襶鸉擂|隳砷鬞昔耶柰媴板儘俊戍削蒤G "X:Program Files\SQLLIB\SAMPLES\SAMPDATA\DGWDEMO" /T userid password dgname ------------------------------------------------------------------------ Information Catalog Manager Programming Guide and Reference(潲珫次) ------------------------------------------------------------------------ 27.1 Information Catalog Manager Reason Codes In Appendix D: Information Catalog Manager reason codes, some text might be truncated at the far right column for the following reason codes: 31014, 32727, 32728, 32729, 32730, 32735, 32736, 32737, 33000, 37507, 37511, and 39206. If the text is truncated, please see the HTML version of the book to view the complete column. ------------------------------------------------------------------------ 鬞悚到扯z獛搨媥豜銳 彀 2 耍嗀柜譇沮蠮投長赴熡韄再齗躒貂烈茗抑鬞悚到赳耶殛鱦沮媴鋇柅鞮彀 媥蚼u鬞悚到扯z獛搨赳熡韄茗抑鬞悚到養雚赴DB2 嚭珫眃赳 蘠歈戍纙J耶 o譇躒戍獀柜譇沮蠮彀雚赴DB2 嚭珫眃赳蘠歈o纙J祌 (s柱鑶蚼B s柱蓔釳s柱定)耍彀礤鼖赴鬞悚到扯z獛搨赳祌容澱鏺 赴嚭珫 眃赳耶o醳鬞虋儘俊耶彀礤鼖赴鬞悚到扯z獛搨赳祌容虋茫繐 赴嚭珫 眃赳耶 嵥皇戍儘柛譂擋腺赴熡韄再齗躒貂瓬茗抑鬞悚到赳鏼~戍哎柼祗腦耍鄧瓬赴熡 韄 再齗躒貂瓬鬞悚到赳甇戍哎柼祗腦耶 ------------------------------------------------------------------------ 鬞悚到扯z獛搨胃哎柼鬞昔 ------------------------------------------------------------------------ 29.1 鬞昔 FLG0260E 鬞昔祗腦戍柫魅睦長胃 砷y歈鬞悚到噬韖戍 rollback耶 鬞悚到戍扛如⑧肄耍椷板耍鑭嗀盎y摃戍鶔耶 ------------------------------------------------------------------------ 29.2 鬞昔 FLG0051E 鬞昔祗腦洇戍柫醳襶睦長胃 鬞悚到鰗嗀眈愫旨麩詰旨麩ю悚耶 扯z舌廌睦長胃 媥酚枵雚容鬞悚到飁倌鬖挽9蛈挽〥蝞狎C ------------------------------------------------------------------------ 29.3 鬞昔 FLG0003E 鬞昔祗腦睦長胃 鬞悚到澱鏺彀媥蛃e灁熡韄耶 鬞悚到養熡韄砷耶 ------------------------------------------------------------------------ 29.4 鬞昔 FLG0372E 鬞昔祗腦戍柜魅睦長胃 ATTACHMENT-IND 襏長旨麩詻落洐A廅長欑旨麩板 Attachment 旨麩耶 ------------------------------------------------------------------------ 29.5 鬞昔 FLG0615E 鬞昔戍柫魅睦長胃 赴鬞悚到扯z獛搨赳J唏w齔戍定砷耍 詰舌彀容戍到詰尚斖s膣耶 ------------------------------------------------------------------------ 鬞悚到扯z獛搨胃哎柼祗腦 鬞悚到甇胃灥戍閱式礤鼖醳戍哎柼祗腦砷廇祗赴礤鼖灥戍旨麩赳耶擂 睦欑祗赴礤鼖肄霿j餬甇赳耶 ------------------------------------------------------------------------ 30.1 Web 鬞悚到扯z獛搨 媥軝腺 DB2 UDB for OS/390 system 戍鬞悚到耍鑭嗀鱦牁毠洟柞j餬戍閱耶 媽搨j餬碉灁藶j餬戍餼如板愩殛耶哎柼祗腦虋鑭嗀鬙繾A腺媽搨j餬耍DB2 UDB for OS/390 鬞悚到戍詻嗀j餬長鱦牁毠洟柞戍耶殛鴉耍詻嗀牁憪ю旨麩養鄧趁 銬耍饓媥椲瘐板嗜旨麩耶 ------------------------------------------------------------------------ DB2 Warehouse Manager 揅壧銳 ------------------------------------------------------------------------ 31.1 暖黈獛搨戍n茫臡 彀鞮繣攻n媥郬暖黈獛搨戍定柼耍澱鏺樺揅壧 Java Developer's Kit (JDK) 次劑 1.1.8 (詰鄧柼)耶 ------------------------------------------------------------------------ 31.2 SAP R/3 Connector 雚 SAP R/3 鸆~旨麩杯托 DB2 式耍 嗀擁戍托巰投養|櫹L 30 戠祅耶彀殛餼如柰耍 擁戍托巰投骷|瓮杯 SAP 巰投戍容 30 譇戠耶礔 擁戍巰投虋唏鞮詻繐戍耍鞮養鄧媥蚼u洇委赳翭韄劑鶔式耶 31.2.1 揅壧樺讘麩 ]肄 RFC_INI 耶蜙p耍 Set RFC_INI=c:\rfcapl.ini耶 彀]肄祌耍 巷鞮髕澱薿s鼖韥q耶 ------------------------------------------------------------------------ 31.3 Web Connector 礔鞮彀鸉 Web Connector 熪擁齶ガ耍IBM 再髕獛搨養|繐臡鞮鷫 Connector 戍鷲耶 礔繐鼖擋 Web Connector 戍鷲耍巷醨 Warehouse Center 鋅z獛搨戍鷲]肄長毠 腺 0耶鷲戍巰投長 WSApid.log耍 珫獛 ID 板鋅z獛搨戍 Windows 獛 ID耶鷲|擔腺 \sqllib\logging 到柰耶 31.3.1 揅壧樺讘麩 巷揅壧 Java 鸉 (JRE) 詰 Java Virtual Machine (JVM) 次劑 1.2.2 (詰鄧 柼)耍虋醨擂]歈鞮戍w]耶礔繐擔 JRE 次劑鏼長鞮戍w]耍巷醨 1.2.2 JRE 戍 尚s柱鞮戍鑶 PATH 珫 (愩 C:\JDKs\IBM\java12\bin;)耶彀鶔w] JRE 祌耍巷鞮髕澱薿s鼖韥q耶礔鞮冀揅壧 Java耍 鞮養鄧雚揅壧 Data Warehouse Connector 戍 CD 靲w壧耶 ------------------------------------------------------------------------ Query Patroller Administration Guide(潲珫次) ------------------------------------------------------------------------ 32.1 DB2 Query Patroller Client is a Separate Component The DB2 Query Patroller client is a separate component that is not part of the DB2 Administration client. This means that it is not installed during the installation of the DB2 Administration Client, as indicated in the Query Patroller Installation Guide. Instead, the Query Patroller client must be installed separately. The version and level of the Query Patroller client and the Query Patroller server must be the same. ------------------------------------------------------------------------ 32.2 Migrating from Version 6 of DB2 Query Patroller Using dqpmigrate The dqpmigrate command must be used if the Version 7 Query Patroller Server was installed over the Version 6 Query Patroller Server. For FixPak 2 or later, you do not have to run dqpmigrate manually as the installation of the FixPak runs this command for you. Without using this command, the existing users defined in v6 have no EXECUTE privileges on several new stored procedures added in Version 7. Note: dqpmigrate.bnd is found in the sqllib/bnd directory and dqpmigrate.exe is found in the sqllib/bin directory. To use dqpmigrate manually to grant the EXECUTE privileges, perform the following after installing the FixPak: 1. Bind the /sqllib/bnd/dqpmigrate.bnd package file to the database where the Query Patroller server has been installed by entering the following command: db2 bind dqpmigrate.bnd 2. Execute dqpmigrate by entering the following: dqpmigrate dbalias userid passwd ------------------------------------------------------------------------ 32.3 Enabling Query Management In the "Getting Started" chapter under "Enabling Query Management", the text should read: You must be the owner of the data base, or you must have SYSADM, SYSCTRL, or SYSMAINT authority to set database configuration parameters. ------------------------------------------------------------------------ 32.4 Location of Table Space for Control Tables In Chapter 1, System Overview, under DB2 Query Patroller Control Tables, the following text is to be added at the end of the section's first paragraph: The table space for the DB2 Query Patroller control tables must reside in a single-node nodegroup, or DB2 Query Patroller will not function properly. ------------------------------------------------------------------------ 32.5 New Parameters for dqpstart Command In Chapter 2, Getting Started, under Starting and Stopping DB2 Query Patroller, the following text is to be added following the last paragraph: New Parameters for the dqpstart command: RESTART parameter: Allows the user to replace the host name and/or the node type of the specified node in the dqpnodes.cfg file. DB2 Query Patroller will be started on this node. Note: Before running the DQPSTART command with the RESTART parameter, ensure the following: 1. DB2 Query Patroller is already stopped on the host that is going to be replaced. 2. DB2 Query Patroller is not already running on the new host. The syntax is as follows: dqpstart nodenum node_num restart hostname server | agent | none ADDNODE parameter: Allows the user to add a new node to the dqpnodes.cfg file. DB2 Query Patroller will be started on this node after the new node entry is added to the dqpnodes.cfg file. The syntax is as follows: dqpstart nodenum node_num addnode hostname server | agent | none DROPNODE parameter: Allows the user to drop a node from the dqnodes.cfg file. DB2 Query Patroller will be stopped on this node before the node entry is dropped from the dqpnodes.cfg file. The syntax is as follows: dqpstop nodenum node_num dropnode ------------------------------------------------------------------------ 32.6 New Parameter for iwm_cmd Command A new -v parameter has been added to the iwm_cmd command to allow the user to recover the status of the jobs that were running on the node specified. Only jobs on an inactive node are allowed to be recovered. This command should be issued when there is a node failure and there are some jobs running on that node or being cancelled at the time. Jobs that were in "Running" state will be resubmitted and set back to "Queued" state. Jobs that were in "Cancelling" state will be set to "Cancelled" state. The partial syntax is as follows: >>-iwm_cmd----+---------------------------------+---------------> '--u--user_id--+---------------+--' '--p--password--' >-----v--node_id_to_recover------------------------------------>< node_id_to_recover Specifies the node on which the jobs are to be recovered. ------------------------------------------------------------------------ 32.7 New Registry Variable: DQP_RECOVERY_INTERVAL There is a new registry variable called DQP_RECOVERY_INTERVAL which is used to set the interval of time in minutes that the iwm_scheduler searches for recovery files. The default is 60 minutes. ------------------------------------------------------------------------ 32.8 Starting Query Administrator In the "Using QueryAdministrator to Administer DB2 Query Patroller" chapter, instructions are provided for starting QueryAdministrator from the Start menu on Windows. The first step provides the following text: If you are using Windows, you can select DB2 Query Patroller --> QueryAdministrator from the IBM DB2 program group. The text should read: DB2 Query Patroller --> QueryAdmin. ------------------------------------------------------------------------ 32.9 User Administration In the "User Administration" section of the "Using QueryAdministrator to Administer DB2 Query Patroller" chapter, the definition for the Maximum Elapsed Time parameter indicates that if the value is set to 0 or -1, the query will always run to completion. This parameter cannot be set to a negative value. The text should indicate that if the value is set to 0, the query will always run to completion. The Max Queries parameter specifies the maximum number of jobs that the DB2 Query Patroller will run simultaneously. Max Queries must be an integer within the range of 0 to 32767. ------------------------------------------------------------------------ 32.10 Creating a Job Queue In the "Job Queue Administration" section of the "Using QueryAdministrator to Administer DB2 Query Patroller" chapter, the screen capture in the steps for "Creating a Job Queue" should be displayed after the second step. The Information about new Job Queue window opens once you click New on the Job Queue Administration page of the QueryAdministrator tool. References to the Job Queues page or the Job Queues tab should read Job Queue Administration page and Job Queue Administration tab, respectively. ------------------------------------------------------------------------ 32.11 Using the Command Line Interface For a user with User authority on the DB2 Query Patroller system to submit a query and have a result table created, the user may require CREATETAB authority on the database. The user does not require CREATETAB authority on the database if the DQP_RES_TBLSPC profile variable is left unset, or if the DQP_RES_TBLSPC profile variable is set to the name of the default table space. The creation of the result tables will succeed in this case because users have the authority to create tables in the default table space. ------------------------------------------------------------------------ 32.12 Query Enabler Notes * When using third-party query tools that use a keyset cursor, queries will not be intercepted. In order for Query Enabler to intercept these queries, you must modify the db2cli.ini file to include: [common] DisableKeySetCursor=1 * For AIX clients, please ensure that the environment variable LIBPATH is not set. Library libXext.a, shipped with the JDK, is not compatible with the library in the /usr/lib/X11 subdirectory. This will cause problems with the Query Enabler GUI. ------------------------------------------------------------------------ 32.13 DB2 Query Patroller Tracker may Return a Blank Column Page FixPak 3 includes a fix for the DB2 Query Patroller Tracker. The Tracker will now correctly report queries which hit no columns. An example of such a query is "SELECT COUNT(*) FROM ...". Since this kind of query does not hit any column in the table, the Tracker will present a blank page for the column page. This blank column page is not a defect. ------------------------------------------------------------------------ 32.14 Query Patroller and Replication Tools Query Patroller Version 7 will intercept the queries of the replication tools (asnapply, asnccp, djra and analyze) and cause these tools to malfunction. A workaround is to disable dynamic query management when running these tools. ------------------------------------------------------------------------ 32.15 Appendix B. Troubleshooting DB2 Query Patroller Clients In Appendix B, Troubleshooting DB2 Query Patroller Clients, section: Common Query Enabler Problems, problem #2, the text of the first bullet is replaced with: Ensure that the path setting includes jre. ------------------------------------------------------------------------ 睦擋獛搨礤熪 倌鷎到 * Administrative API Reference (潲珫次) o 33.1 db2ArchiveLog (new API) + db2ArchiveLog o 33.2 db2ConvMonStream o 33.3 db2DatabasePing (new API) + db2DatabasePing - Ping Database o 33.4 db2HistData o 33.5 db2HistoryOpenScan o 33.6 db2XaGetInfo (new API) + db2XaGetInfo - Get Information for Resource Manager o 33.7 db2XaListIndTrans (new API that supercedes sqlxphqr) + db2XaListIndTrans - List Indoubt Transactions o 33.8 db2GetSnapshot - Get Snapshot o 33.9 Forget Log Record o 33.10 sqlaintp - Get Error Message o 33.11 sqlbctcq - Close Tablespace Container Query o 33.12 sqlubkp - Backup Database o 33.13 sqlureot - Reorganize Table o 33.14 sqlurestore - Restore Database o 33.15 Documentation Error Regarding AIX Extended Shared Memory Support (EXTSHM) o 33.16 SQLFUPD + 33.16.1 locklist o 33.17 SQLEDBDESC o 33.18 SQLFUPD Documentation Error * 睦擋獛搨礤熪銳 o 34.1 1 媽祊 + 34.1.1 儭n + 34.1.2 削蜪{搨 o 34.2 3 礤熪 DB2 睦擋獛搨戍柜鬞 + 34.2.1 礤熪耑make 碉砷照泥戍洢擋獛搨 o 34.3 4 礤熪 Java Applets 碉睦擋獛搨 + 34.3.1 ]肄 + 34.3.1.1 OS/2 柼戍 JDK 柳歃 + 34.3.1.2 HP-UX 柼戍 Java2 o 34.4 5 礤熪 SQL 獛 + 34.4.1 ]肄 SQL 獛 + 34.4.2 ]肄哀鏵 + 34.4.3 椻繘哀纁銻 + 34.4.4 奚蟂珫繾 + 34.4.5 樵碉駻鑅 + 34.4.6 擔 SQL 獛 + 34.4.7 碰駒暖酨獛 + 34.4.8 牁鷫洄哀籉 SQL 獛 o 34.5 7 礤熪 HP-UX 睦擋獛搨 + 34.5.1 HP-UX C + 34.5.2 HP-UX C++ o 34.6 9 礤熪 OS/2 睦擋獛搨 + 34.6.1 VisualAge C++ for OS/2 次劑 4.0 o 34.7 10 礤熪 PTX 睦擋獛搨 + 34.7.1 ptx/C++ o 34.8 12 礤熪 Solaris 睦擋獛搨 + 34.8.1 SPARCompiler C++ o 34.9 13 鑅 Windows 32 祅鏼~鑶蛈孚擋獛搨 + 34.9.1 VisualAge C++ 次劑 4.0 * Application Development Guide(潲珫次) o 35.1 Chapter 2. Coding a DB2 Application + 35.1.1 Activating the IBM DB2 Universal Database Project and Tool Add-ins for Microsoft Visual C++ o 35.2 Chapter 6. Common DB2 Application Techniques + 35.2.1 Generating Sequential Values + 35.2.1.1 Controlling Sequence Behavior + 35.2.1.2 Improving Performance with Sequence Objects + 35.2.1.3 Comparing Sequence Objects and Identity Columns o 35.3 Chapter 7. Stored Procedures + 35.3.1 DECIMAL Type Fails in Linux Java Routines + 35.3.2 Using Cursors in Recursive Stored Procedures + 35.3.3 Writing OLE Automation Stored Procedures o 35.4 Chapter 12. Working with Complex Objects: User-Defined Structured Types + 35.4.1 Inserting Structured Type Attributes Into Columns o 35.5 Chapter 13. Using Large Objects (LOBs) + 35.5.1 Large object (LOBs) support in federated database systems + 35.5.1.1 How DB2 retrieves LOBs + 35.5.1.2 How applications can use LOB locators + 35.5.1.3 Restrictions on LOBs + 35.5.1.4 Mappings between LOB and non-LOB data types + 35.5.2 Tuning the system o 35.6 Part 5. DB2 Programming Considerations + 35.6.1 IBM DB2 OLE DB Provider o 35.7 Chapter 20. Programming in C and C++ + 35.7.1 C/C++ Types for Stored Procedures, Functions, and Methods o 35.8 Chapter 21. Programming in Java + 35.8.1 Java Method Signature in PARAMETER STYLE JAVA Procedures and Functions + 35.8.2 Connecting to the JDBC Applet Server o 35.9 Appendix B. Sample Programs * CLI Guide and Reference(潲珫次) o 36.1 Binding Database Utilities Using the Run-Time Client o 36.2 Using Static SQL in CLI Applications o 36.3 Limitations of JDBC/ODBC/CLI Static Profiling o 36.4 ADT Transforms o 36.5 Chapter 3. Using Advanced Features + 36.5.1 Writing Multi-Threaded Applications + 36.5.2 Scrollable Cursors + 36.5.2.1 Server-side Scrollable Cursor Support for OS/390 + 36.5.3 Using Compound SQL + 36.5.4 Using Stored Procedures + 36.5.4.1 Writing a Stored Procedure in CLI + 36.5.4.2 CLI Stored Procedures and Autobinding o 36.6 Chapter 4. Configuring CLI/ODBC and Running Sample Applications + 36.6.1 Configuration Keywords o 36.7 Chapter 5. DB2 CLI Functions + 36.7.1 SQLBindFileToParam - Bind LOB File Reference to LOB Parameter + 36.7.2 SQLNextResult - Associate Next Result Set with Another Statement Handle + 36.7.2.1 Purpose + 36.7.2.2 Syntax + 36.7.2.3 Function Arguments + 36.7.2.4 Usage + 36.7.2.5 Return Codes + 36.7.2.6 Diagnostics + 36.7.2.7 Restrictions + 36.7.2.8 References o 36.8 Appendix D. Extended Scalar Functions + 36.8.1 Date and Time Functions o 36.9 Appendix K. Using the DB2 CLI/ODBC/JDBC Trace Facility * 鬞昔囓楯銳 o 37.1 灥隳鬞昔烈 SQLSTATE 祗腦 o 37.2 彀 DB2 Connect 鶔戍 SQLCODE 薿s杯 o 37.3 s戍烈鶔戍鬞昔 + 37.3.1 碰駒柳歃祊貘 (CLI) 鬞昔 + 37.3.2 DB2 鬞昔 + 37.3.3 DBI 鬞昔 + 37.3.4 暖珫眃 (DWC) 鬞昔 + 37.3.5 SQL 鬞昔 o 37.4 鶔儘 SQLSTATES * SQL Reference(潲珫次) o 38.1 SQL Reference is Provided in One PDF File o 38.2 Chapter 3. Language Elements + 38.2.1 Naming Conventions and Implicit Object Name Qualifications + 38.2.2 DATALINK Assignments + 38.2.3 Expressions + 38.2.3.1 Syntax Diagram + 38.2.3.2 OLAP Functions + 38.2.3.3 Sequence Reference o 38.3 Chapter 4. Functions + 38.3.1 Enabling the New Functions and Procedures + 38.3.2 Scalar Functions + 38.3.2.1 ABS or ABSVAL + 38.3.2.2 DECRYPT_BIN and DECRYPT_CHAR + 38.3.2.3 ENCRYPT + 38.3.2.4 GETHINT + 38.3.2.5 IDENTITY_VAL_LOCAL + 38.3.2.6 LCASE and UCASE (Unicode) + 38.3.2.7 MQPUBLISH + 38.3.2.8 MQREAD + 38.3.2.9 MQRECEIVE + 38.3.2.10 MQSEND + 38.3.2.11 MQSUBSCRIBE + 38.3.2.12 MQUNSUBSCRIBE + 38.3.2.13 MULTIPLY_ALT + 38.3.2.14 REC2XML + 38.3.2.15 ROUND + 38.3.2.16 WEEK_ISO + 38.3.3 Table Functions + 38.3.3.1 MQREADALL + 38.3.3.2 MQRECEIVEALL + 38.3.4 Procedures + 38.3.4.1 GET_ROUTINE_SAR + 38.3.4.2 PUT_ROUTINE_SAR o 38.4 Chapter 5. Queries + 38.4.1 select-statement/syntax diagram + 38.4.2 select-statement/fetch-first-clause o 38.5 Chapter 6. SQL Statements + 38.5.1 Update of the Partitioning Key Now Supported + 38.5.1.1 Statement: ALTER TABLE + 38.5.1.2 Statement: CREATE TABLE + 38.5.1.3 Statement: DECLARE GLOBAL TEMPORARY TABLE PARTITIONING KEY (column-name,...) + 38.5.1.4 Statement: UPDATE + 38.5.2 Larger Index Keys for Unicode Databases + 38.5.2.1 ALTER TABLE + 38.5.2.2 CREATE INDEX + 38.5.2.3 CREATE TABLE + 38.5.3 ALTER SEQUENCE + ALTER SEQUENCE + 38.5.4 ALTER TABLE + 38.5.5 Compound SQL (Embedded) + 38.5.6 Compound Statement (Dynamic) + Compound Statement (Dynamic) + 38.5.7 CREATE FUNCTION (Source or Template) + 38.5.8 CREATE FUNCTION (SQL Scalar, Table or Row) + 38.5.9 CREATE METHOD + CREATE METHOD + 38.5.10 CREATE SEQUENCE + CREATE SEQUENCE + 38.5.11 CREATE TRIGGER + CREATE TRIGGER + 38.5.12 CREATE WRAPPER + 38.5.13 DECLARE CURSOR + 38.5.14 DELETE + 38.5.15 DROP + 38.5.16 GRANT (Sequence Privileges) + GRANT (Sequence Privileges) + 38.5.17 INSERT + 38.5.18 SELECT INTO + 38.5.19 SET ENCRYPTION PASSWORD + SET ENCRYPTION PASSWORD + 38.5.20 SET transition-variable + SET Variable + 38.5.21 UPDATE o 38.6 Chapter 7. SQL Procedures now called Chapter 7. SQL Control Statements + 38.6.1 SQL Procedure Statement + SQL Procedure Statement + 38.6.2 FOR + FOR + 38.6.3 Compound Statement changes to Compound Statement (Procedure) + 38.6.4 RETURN + RETURN + 38.6.5 SIGNAL + SIGNAL o 38.7 Appendix A. SQL Limits o 38.8 Appendix D. Catalog Views + 38.8.1 SYSCAT.SEQUENCES * IBM DB2 暖酨獛鑅齗 o 39.1 Java 1.2 儭暖酨獛鑅齗 o 39.2 DB2 暖酨獛戍茗抑 o 39.3 彀 Windows耑OS/2 詰 UNIX 樹鬧柼礤熪 SQL 獛 o 39.4 彀 Solaris 樹鬧媥 DB2 暖酨獛鑅齗 o 39.5 洄何齶ガ烈貙 o 39.6 彀甥珫砰躨蓔U媥 DB2 暖酨獛鑅齗 o 39.7 UNIX (AIX耑Sun Solaris耑Linux) 揅壧烈暖酨獛鑅齗 o 39.8 鑅 OS/390 戍 SQL 暖酨獛 o 39.9 SQL 暖酨獛 o 39.10 鋇 Java 暖酨獛 o 39.11 彀 OS/390 柼麰枵暖酨獛 o 39.12 彀泚鏼霠再齗珫]肄 SQL 暖酨獛戍鑅醳 o 39.13 椻韥駻s OS/390 柼暖酨獛鑅戍 WLM 鶐繾 o 39.14 彀 OS/390 礤熪 Java 暖酨獛 o 39.15 長 MQ Series 烈 OLE DB 鑅 DB2 式媥蛈瑏w霿閱 (UDF) * Unicode 鶔s o 40.1 媽祊 + 40.1.1 DB2 Unicode 定瓬睦擋獛搨 + 40.1.2 麩鶔s o 40.2 SQL Reference(潲珫次) + 40.2.1 Chapter 3 Language Elements + 40.2.1.1 Promotion of Data Types + 40.2.1.2 Casting Between Data Types + 40.2.1.3 Assignments and Comparisons + 40.2.1.4 Rules for Result Data Types + 40.2.1.5 Rules for String Conversions + 40.2.1.6 Expressions + 40.2.1.7 Predicates + 40.2.2 Chapter 4 Functions + 40.2.2.1 Scalar Functions o 40.3 CLI Guide and Reference(潲珫次) + 40.3.1 Chapter 3. Using Advanced Features + 40.3.1.1 Writing a DB2 CLI Unicode Application + 40.3.2 Appendix C. DB2 CLI and ODBC + 40.3.2.1 ODBC Unicode Applications o 40.4 Data Movement Utilities Guide and Reference(潲珫次) + 40.4.1 Appendix C. Export/Import/Load Utility File Formats ------------------------------------------------------------------------ Administrative API Reference (潲珫次) ------------------------------------------------------------------------ 33.1 db2ArchiveLog (new API) db2ArchiveLog Closes and truncates the active log file for a recoverable database. If user exit is enabled, issues an archive request. Authorization One of the following: * sysadm * sysctrl * sysmaint * dbadm Required Connection This API automatically establishes a connection to the specified database. If a connection to the specified database already exists, the API will return an error. Version db2ApiDf.h C API Syntax /* File: db2ApiDf.h */ /* API: Archive Active Log */ SQL_API_RC SQL_API_FN db2ArchiveLog ( db2Uint32 version, void *pDB2ArchiveLogStruct, struct sqlca * pSqlca); typedef struct { char *piDatabaseAlias; char *piUserName; char *piPassword; db2Uint16 iAllNodeFlag; db2Uint16 iNumNodes; SQL_PDB_NODE_TYPE *piNodeList; db2Uint32 iOptions; } Generic API Syntax /* File: db2ApiDf.h */ /* API: Archive Active Log */ SQL_API_RC SQL_API_FN db2gArchiveLog ( db2Uint32 version, void *pDB2ArchiveLogStruct, struct sqlca * pSqlca); typedef struct { db2Uint32 iAliasLen; db2Uint32 iUserNameLen; db2Uint32 iPasswordLen; char *piDatabaseAlias; char *piUserName; char *piPassword; db2Uint16 iAllNodeFlag; db2Uint16 iNumNodes; SQL_PDB_NODE_TYPE *piNodeList; db2Uint32 iOptions; } API Parameters version Input. Specifies the version and release level of the variable passed in as the second parameter, pDB2ArchiveLogStruct. pDB2ArchiveLogStruct Input. A pointer to the db2ArchiveLogStruct structure. pSqlca Output. A pointer to the sqlca structure. iAliasLen Input. A 4-byte unsigned integer representing the length in bytes of the database alias. iUserNameLen A 4-byte unsigned integer representing the length in bytes of the user name. Set to zero if no user name is used. iPasswordLen Input. A 4-byte unsigned integer representing the length in bytes of the password. Set to zero if no password is used. piDatabaseAlias Input. A string containing the database alias (as cataloged in the system database directory) of the database for which the active log is to be archived. piUserName Input. A string containing the user name to be used when attempting a connection. piPassword Input. A string containing the password to be user when attempting a connection. iAllNodeFlag MPP only. Input. Flag indicating whether the operation should apply to all nodes listed in the db2nodes.cfg file. Valid values are: DB2ARCHIVELOG_NODE_LIST Apply to nodes in a node list that is passed in piNodeList. DB2ARCHIVELOG_ALL_NODES Apply to all nodes. piNodeList should be NULL. This is the default value. DB2ARCHIVELOG_ALL_EXCEPT Apply to all nodes except those in the node list passed in piNodeList. iNumNodes MPP only. Input. Specifies the number of nodes in the piNodeList array. piNodeList MPP only. Input. A pointer to an array of node numbers against which to apply the archive log operation. iOptions Input. Reserved for future use. ------------------------------------------------------------------------ 33.2 db2ConvMonStream In the Usage Notes, the structure for the snapshot variable datastream type SQLM_ELM_SUBSECTION should be sqlm_subsection. ------------------------------------------------------------------------ 33.3 db2DatabasePing (new API) db2DatabasePing - Ping Database Tests the network response time of the underlying connectivity between a client and a database server. This API can be used by an application when a host database server is accessed via DB2 Connect either directly or through a gateway. Authorization None Required Connection Database Version db2ApiDf.h C API Syntax /* File: db2ApiDf.h */ /* API: Ping Database */ /* ... */ SQL_API_RC SQL_API_FN db2DatabasePing ( db2Uint32 versionNumber, void *pParmStruct, struct sqlca *pSqlca); /* ... */ typedef SQL_STRUCTURE db2DatabasePingStruct { char iDbAlias[SQL_ALIAS_SZ + 1]; db2Uint16 iNumIterations; db2Uint32 *poElapsedTime; } Generic API Syntax /* File: db2ApiDf.h */ /* API: Ping Database */ /* ... */ SQL_API_RC SQL_API_FN db2gDatabasePing ( db2Uint32 versionNumber, void *pParmStruct, struct sqlca *pSqlca); /* ... */ typedef SQL_STRUCTURE db2gDatabasePingStruct { db2Uint16 iDbAliasLength; char iDbAlias[SQL_ALIAS_SZ]; db2Uint16 iNumIterations; db2Uint32 *poElapsedTime; } API Parameters versionNumber Input. Version and release of the DB2 Universal Database or DB2 Connect product that the application is using. Note: Constant db2Version710 or higher should be used for DB2 Version 7.1 or higher. iDbAliasLength Input. Length of the database alias name. Note: This parameter is not currently used. It is reserved for future use. iDbAlias Input. Database alias name. Note: This parameter is not currently used. It is reserved for future use. iNumIterations Input. Number of test request iterations. The value must be between 1 and 32767 inclusive. poElapsedTime Output. A pointer to an array of 32-bit integers where the number of elements is equal to iNumIterations. Each element in the array will contain the elapsed time in microseconds for one test request iteration. Note: The application is responsible for allocating the memory for this array prior to calling this API. pSqlca Output. A pointer to the sqlca structure. For more information about this structure, see the Administrative API Reference. Usage Notes A database connection must exist before invoking this API, otherwise an error will result. This function can also be invoked using the PING command. For a description of this command, see the Command Reference. ------------------------------------------------------------------------ 33.4 db2HistData The following entries should be added to Table 11. Fields in the db2HistData Structure: Field Name Data Type Description oOperation char See Table 12. oOptype char See Table 13. The following table will be added following Table 11. Table 12. Valid event values for oOperation in the db2HistData Structure Value Description C Definition COBOL/FORTRAN Definition A add DB2HISTORY_OP_ADD_TABLESPACE DB2HIST_OP_ADD_TABLESPACE tablespace B backup DB2HISTORY_OP_BACKUP DB2HIST_OP_BACKUP C load-copy DB2HISTORY_OP_LOAD_COPY DB2HIST_OP_LOAD_COPY D dropped DB2HISTORY_OP_DROPPED_TABLE DB2HIST_OP_DROPPED_TABLE table F roll DB2HISTORY_OP_ROLLFWD DB2HIST_OP_ROLLFWD forward G reorganize DB2HISTORY_OP_REORG DB2HIST_OP_REORG table L load DB2HISTORY_OP_LOAD DB2HIST_OP_LOAD N rename DB2HISTORY_OP_REN_TABLESPACE DB2HIST_OP_REN_TABLESPACE tablespace O drop DB2HISTORY_OP_DROP_TABLESPACEDB2HIST_OP_DROP_TABLESPACE tablespace Q quiesce DB2HISTORY_OP_QUIESCE DB2HIST_OP_QUIESCE R restore DB2HISTORY_OP_RESTORE DB2HIST_OP_RESTORE S run DB2HISTORY_OP_RUNSTATS DB2HIST_OP_RUNSTATS statistics T alter DB2HISTORY_OP_ALT_TABLESPACE DB2HIST_OP_ALT_TBS tablespace U unload DB2HISTORY_OP_UNLOAD DB2HIST_OP_UNLOAD The following table will also be added. Table 13. Valid oOptype values db2HistData Structure oOperationoOptype Description C/COBOL/FORTRAN Definition B F Offline DB2HISTORY_OPTYPE_OFFLINE N Online DB2HISTORY_OPTYPE_ONLINE I Incremental offline DB2HISTORY_OPTYPE_INCR_OFFLINE O Incremental online DB2HISTORY_OPTYPE_INCR_ONLINE D Delta offline DB2HISTORY_OPTYPE_DELTA_OFFLINE E Delta online DB2HISTORY_OPTYPE_DELTA_ONLIN F E End of log DB2HISTORY_OPTYPE_EOL P Point in time DB2HISTORY_OPTYPE_PIT L I Insert DB2HISTORY_OPTYPE_INSERT R Replace DB2HISTORY_OPTYPE_REPLACE Q S Quiesce share DB2HISTORY_OPTYPE_SHARE U Quiesce update DB2HISTORY_OPTYPE_UPDATE X Quiesce exclusive DB2HISTORY_OPTYPE_EXCL Z Quiesce reset DB2HISTORY_OPTYPE_RESET R F Offline DB2HISTORY_OPTYPE_OFFLINE N Online DB2HISTORY_OPTYPE_ONLINE I Incremental offline DB2HISTORY_OPTYPE_INCR_OFFLINE O Incremental online DB2HISTORY_OPTYPE_INCR_ONLINE T C Add containers DB2HISTORY_OPTYPE_ADD_CONT R Rebalance DB2HISTORY_OPTYPE_REB ------------------------------------------------------------------------ 33.5 db2HistoryOpenScan The following value will be added to the iCallerAction parameter. DB2HISTORY_LIST_CRT_TABLESPACE Select only the CREATE TABLESPACE and DROP TABLESPACE records that pass the other filters. ------------------------------------------------------------------------ 33.6 db2XaGetInfo (new API) db2XaGetInfo - Get Information for Resource Manager Extracts information for a particular resource manager once an xa_open call has been made. Authorization None Required Connection Database Version sqlxa.h C API Syntax /* File: sqlxa.h */ /* API: Get Information for Resource Manager */ /* ... */ SQL_API_RC SQL_API_FN db2XaGetInfo ( db2Uint32 versionNumber, void * pParmStruct, struct sqlca * pSqlca); typedef SQL_STRUCTURE db2XaGetInfoStruct { db2int32 iRmid; struct sqlca oLastSqlca; } db2XaGetInfoStruct; API Parameters versionNumber Input. Specifies the version and release level of the structure passed in as the second parameter, pParmStruct. pParmStruct Input. A pointer to the db2XaGetInfoStruct structure. pSqlca Output. A pointer to the sqlca structure. For more information about this structure, see the Administrative API Reference. iRmid Input. Specifies the resource manager for which information is required. oLastSqlca Output. Contains the sqlca for the last XA API call. Notes: Only the sqlca that resulted from the last failing XA API can be retrieved. ------------------------------------------------------------------------ 33.7 db2XaListIndTrans (new API that supercedes sqlxphqr) db2XaListIndTrans - List Indoubt Transactions Provides a list of all indoubt transactions for the currently connected database. Scope This API affects only the node on which it is issued. Authorization One of the following: * sysadm * dbadm Required Connection Database Notes db2ApiDf.h C API Syntax /* File: db2ApiDf.h */ /* API: List Indoubt Transactions */ /* ... */ SQL_API_RC SQL_API_FN db2XaListIndTrans ( db2Uint32 versionNumber, void * pParmStruct, struct sqlca * pSqlca); typedef SQL_STRUCTURE db2XaListIndTransStruct { db2XaRecoverStruct * piIndoubtData; db2Uint32 iIndoubtDataLen; db2Uint32 oNumIndoubtsReturned; db2Uint32 oNumIndoubtsTotal; db2Uint32 oReqBufferLen; } db2XaListIndTransStruct; typedef SQL_STRUCTURE db2XaRecoverStruct { sqluint32 timestamp; SQLXA_XID xid; char dbalias[SQLXA_DBNAME_SZ]; char applid[SQLXA_APPLID_SZ]; char sequence_no[SQLXA_SEQ_SZ]; char auth_id[SQL_USERID_SZ]; char log_full; char connected; char indoubt_status; char originator; char reserved[8]; } db2XaRecoverStruct; API Parameters versionNumber Input. Specifies the version and release level of the structure passed in as the second parameter, pParmStruct. pParmStruct Input. A pointer to the db2XaListIndTransStruct structure. pSqlca Output. A pointer to the sqlca structure. For more information about this structure, see the Administrative API Reference. piIndoubtData Input. A pointer to the application supplied buffer where indoubt data will be returned. The indoubt data is in db2XaRecoverStruct format. The application can traverse the list of indoubt transactions by using the size of the db2XaRecoverStruct structure, starting at the address provided by this parameter. If the value is NULL, DB2 will calculate the size of the buffer required and return this value in oReqBufferLen. oNumIndoubtsTotal will contain the total number of indoubt transactions. The application may allocate the required buffer size and issue the API again. oNumIndoubtsReturned Output. The number of indoubt transaction records returned in the buffer specified by pIndoubtData. oNumIndoubtsTotal Output. The Total number of indoubt transaction records available at the time of API invocation. If the piIndoubtData buffer is too small to contain all the records, oNumIndoubtsTotal will be greater than the total for oNumIndoubtsReturned. The application may reissue the API in order to obtain all records. Notes: This number may change between API invocations as a result of automatic or heuristic indoubt transaction resynchronisation, or as a result of other transactions entering the indoubt state. oReqBufferLen Output. Required buffer length to hold all indoubt transaction records at the time of API invocation. The application can use this value to determine the required buffer size by calling the API with pIndoubtData set to NULL. This value can then be used to allocate the required buffer, and the API can be issued with pIndoubtData set to the address of the allocated buffer. Notes: The required buffer size may change between API invocations as a result of automatic or heuristic indoubt transaction resynchronisation, or as a result of other transactions entering the indoubt state. The application may allocate a larger buffer to account for this. timestamp Output. Specifies the time when the transaction entered the indoubt state. xid Output. Specifies the XA identifier assigned by the transaction manager to uniquely identify a global transaction. dbalias Output. Specifies the alias of the database where the indoubt transaction is found. applid Output. Specifies the application identifier assigned by the database manager for this transaction. sequence_no Output. Specifies the sequence number assigned by the database manager as an extension to the applid. auth_id Output. Specifies the authorization ID of the user who ran the transaction. log_full Output. Indicates whether or not this transaction caused a log full condition. Valid values are: SQLXA_TRUE This indoubt transaction caused a log full condition. SQLXA_FALSE This indoubt transaction did not cause a log full condition. connected Output. Indicates whether or not the application is connected. Valid values are: SQLXA_TRUE The transaction is undergoing normal syncpoint processing, and is waiting for the second phase of the two-phase commit. SQLXA_FALSE The transaction was left indoubt by an earlier failure, and is now waiting for resynchronisation from the transaction manager. indoubt_status Output. Indicates the status of this indoubt transaction. Valid values are: SQLXA_TS_PREP The transaction is prepared. The connected parameter can be used to determine whether the transaction is waiting for the second phase of normal commit processing or whether an error occurred and resynchronisation with the transaction manager is required. SQLXA_TS_HCOM The transaction has been heuristically committed. SQLXA_TS_HROL The transaction has been heuristically rolled back. SQLXA_TS_MACK The transaction is missing commit acknowledgement from a node in a partitioned database. SQLXA_TS_END The transaction has ended at this database. This transaction may be re-activated, committed, or rolled back at a later time. It is also possible that the transaction manager encountered an error and the transaction will not be completed. If this is the case, this transaction requires heuristic actions, because it may be holding locks and preventing other applications from accessing data. Usage Notes A typical application will perform the following steps after setting the current connection to the database or to the partitioned database coordinator node: 1. Call db2XaListIndTrans with piIndoubtData set to NULL. This will return values in oReqBufferLen and oNumIndoubtsTotal. 2. Use the returned value in oReqBufferLen to allocate a buffer. This buffer may not be large enough if there are additional indoubt transactions because the initial invocation of this API to obtain oReqBufferLen. The application may provide a buffer larger than oReqBufferLen. 3. Determine if all indoubt transaction records have been obtained. This can be done by comparing oNumIndoubtsReturned to oNumIndoubtTotal. If oNumIndoubtsTotal is greater than oNumIndoubtsReturned, the application can repeat the above steps. See Also "sqlxhfrg - Forget Transaction Status", "sqlxphcm - Commit an Indoubt Transaction", and "sqlxphrl - Roll Back an Indoubt Transaction" in the Administrative API Reference. ------------------------------------------------------------------------ 33.8 db2GetSnapshot - Get Snapshot The syntax for the db2GetSnapshot API should be as follows: int db2GetSnapshot( unsigned char version; db2GetSnapshotData *data, struct sqlca *sqlca); The parameters described in data are: typedef struct db2GetSnapshotData{ sqlma *piSqlmaData; sqlm_collected *poCollectedData void *poBuffer; db2uint32 iVersion; db2int32 iBufferSize; db2uint8 iStoreResult; db2uint16 iNodeNumber; db2uint32 *poOutputFormat; }db2GetSnapshotData; ------------------------------------------------------------------------ 33.9 Forget Log Record The following information will be added to Appendix F following the MPP Subordinator Prepare section. This log record is written after a rollback of indoubt transactions or after a commit of two-phase commit. The log record is written to mark the end of the transaction and releases any log resources held. In order for the transaction to be forgotten, it must be in a heuristically completed state. Table 21. Forget Log Record Structure Description Type Offset (Bytes) Log header LogManagerLogRecordHeader 0(20) time sqluint64 20(8) Total Length: 28 bytes ------------------------------------------------------------------------ 33.10 sqlaintp - Get Error Message The following usage note is to be added to the description of this API: In a multi-threaded application, sqlaintp must be attached to a valid context; otherwise, the message text for SQLCODE -1445 cannot be obtained. ------------------------------------------------------------------------ 33.11 sqlbctcq - Close Tablespace Container Query Load is not a valid Authorization level for this API. ------------------------------------------------------------------------ 33.12 sqlubkp - Backup Database For the BackupType parameter the SQLUB_FULL value will be replaced by the SQLUB_DB. A backup of all tablespaces in the database will be taken. To support the new incremental backup functionality the SQLUB_INCREMENTAL and SQLUB_DELTA parameters will also be added. An incremental backup image is a copy of all database data which has changed since the most recent successful, full backup. A delta backup image is a copy of all database data that has changed since the most recent successful backup of any type ------------------------------------------------------------------------ 33.13 sqlureot - Reorganize Table The following sentence will be added to the Usage Notes: REORGANIZE TABLE cannot use an index that is based on an index extension. ------------------------------------------------------------------------ 33.14 sqlurestore - Restore Database For the RestoreType parameter the SQLUD_FULL value will be replaced by the SQLUD_DB. A restore of all table spaces in the database will be taken. This will be run offline. To support the new incremental restore functionality the SQLUD_INCREMENTAL parameter will also be added. An incremental backup image is a copy of all database data which has changed since the most recent successful full backup. ------------------------------------------------------------------------ 33.15 Documentation Error Regarding AIX Extended Shared Memory Support (EXTSHM) In "Appendix E. Threaded Applications with Concurrent Access", Note 2 should now read: 2. By default, AIX does not permit 32-bit applications to attach to more than 11 shared memory segments per process, of which a maximum of 10 can be used for local DB2 connections. To use EXTSHM with DB2, do the following: In client sessions: export EXTSHM=ON When starting DB2: export EXTSHM=ON db2set DB2ENVLIST=EXTSHM db2start On EEE, also add the following lines to sqllib/db2profile: EXTSHM=ON export EXTSHM ------------------------------------------------------------------------ 33.16 SQLFUPD 33.16.1 locklist The name of the token has changed from SQLF_DBTN_LOCKLIST to SQLF_DBTN_LOCK_LIST. The locklist parameter has been changed from a SMALLINT to a 64-bit unsigned INTEGER. The following addition should be made to the table of Updatable Database Configuration Parameters. Parameter Name Token Token Value Data Type locklist SQLF_DBTN_LOCK_LIST704 Uint64 The new maximum for this parameter is 524 288. ------------------------------------------------------------------------ 33.17 SQLEDBDESC Two values will be added to the list of valid values for SQLDBCSS (defined in sqlenv). They are: SQL_CS_SYSTEM_NLSCHAR Collating sequence from system using the NLS version of compare routines for character types. SQL_CS_USER_NLSCHAR Collating sequence from user using the NLS version of compare routines for character types. ------------------------------------------------------------------------ 33.18 SQLFUPD Documentation Error In "Chapter 3. Data Structures", Table 53. Updatable Database Configuration Parameters incorrectly lists the token value for dbheap as 701. The correct value is 58. ------------------------------------------------------------------------ 睦擋獛搨礤熪銳 ------------------------------------------------------------------------ 34.1 1 媽祊 34.1.1 儭n : PHP耶PHP 養媥蛌欘q Web 悚睦擋獛搨酨灥 DB2 戍妄耶 PHP 板柜再齗抑 耑洇餳 HTML 戍洈搨樹鬧 Script 砰躨耶 擂儭媥 Unified-ODBC 酨灥 妄戍 DB2 酨灥耍珫媥蛈猻h歃 PHP 媥 ODBC 碰駒烈 DB2 q埔耶烈癸 ODBC 嵥戍板耍Unified-ODBC 妄托鼪烈 DB2 CLI 柳q埔耍椴zL ODBC 柳耶 嗀 PHP f黂媥 DB2 戍欏僝鬞耍巷囓楯柰媴戍 DB2 儭霠胃 www.ibm.com/software/data/db2/udb/winos2unix/support耶 AIX 媴戍 C 瓬 C++ 哀鏵戍次劑睦長柰媴胃 IBM C 瓬 C++ 哀鏵耍譂擋 AIX 次劑 3.6.6苗譂擋腺 64 祅戍次劑 3.6.6.3英 IBM C for AIX 4.4 IBM VisualAge C++ 次劑 4.0 : 巷雚柰媴鶐柰o哀鏵次劑戍稒s FixPak http://www.ibm.com/software/ad/vacpp/service/csd.html Micro Focus COBOL 哀鏵詻媴戍次劑睦長胃 AIX 4.2.1 Micro Focus COBOL 次劑 4.0.20 (PRN 12.03 詰鶔s戍次劑) Micro Focus COBOL 次劑 4.1.10 (PRN 13.04 詰鶔s戍次劑) AIX 4.3 Micro Focus COBOL Server Express 次劑 1.0 : 嗀 Micro Focus COBOL 暖酨獛瓬 AIX 4.3 柼戍 UDF 戍 DB2儭鬞耍 巷 yX DB2 Application Development 贄胃 http://www.ibm.com/software/data/db2/udb/ad 礔繐媥 IBM XL Fortran for AIX 次劑 5.1.0 哀鏵僳}熪 64 祅睦擋獛搨耍 巷彀哀譪觙膣纙J珫媥 "-q64" 醳耶 巷圳N殛哀鏵彀樺容次劑虋儭 64 祅睦擋獛搨耶 HP-UX C++ 哀鏵詻媴戍次劑長胃 HP aC++耍次劑 A.03.25 : HP 儭鄧s耑順哀鏵鄎s籉圻挽A蘟郎彷G灁虎委詫耍廅殛o醨蟢堮 擔 C++ 睦擋獛搨戍薿s哀繾A鄧酨灥 HP-UX 柼戍 DB2耶 柛澱鏺擔 C++ 睦擋 獛搨鄧Bzo譇s哀鏵戍蘘`扛如耶 o板 aCC 颾峪戍 URL胃http://www.hp.com/esy/lang/cpp/tguide耶 C++ 戍虎委倌鷎i彀柰媴霠珫胃 http://www.hp.com/esy/lang/cpp/tguide/transcontent.html#RN.CVT.1.2 http://www.hp.com/esy/lang/cpp/tguide/transcontent.html#RN.CVT.3.3 C 烈 C++ 倌鷎i彀柰媴霠珫胃 http://www.hp.com/esy/lang/cpp/tguide/transcontent.html#RN.CVT.3.3.1 潒 C 碉 aCC 虎委耍↗媥釱嵥戍旨麩ю悚耍 鰗嗀 "main" 戍旨麩澱 鏺鄧 aCC 哀繾A椴稢養鸉澱鏺鄧 aCC 鉲膣耶 Linux DB2 for Linux 儭柰媴 REXX 次劑胃 Object REXX Interpreter for Linux 次劑 2.1 Linux/390 DB2 for Linux/390 骷儭 Java耑C 瓬 C++耶 OS/2 C/C++ 哀鏵詻媴戍次劑長胃 IBM VisualAge C++ for OS/2 次劑 3.6.5 瓬次劑 4.0 : 巷雚柰媴鶐柰o哀鏵次劑戍稒s FixPak http://www.ibm.com/software/ad/vacpp/service/csd.html 嗀o VisualAge C++ 哀鏵戍冀鄏A髕儭貙耍巷囓酀柰媴鶐戍s浴鱦沮胃 http://www-4.ibm.com/software/ad/vacpp/ Solaris Micro Focus COBOL 哀鏵詻媴戍次劑睦長胃 Micro Focus COBOL Server Express 次劑 1.0 Windows 32 祅鏼~鑶 IBM VisualAge C++ 哀鏵詻媴戍次劑長胃 IBM VisualAge C++ 譂擋腺 Windows 次劑 3.6.5 碉 4.0 : 巷雚柰媴鶐柰o哀鏵次劑戍稒s FixPak http://www.ibm.com/software/ad/vacpp/service/csd.html 嗀o VisualAge C++ 哀鏵戍冀鄏A髕儭貙耍巷囓酀柰媴鶐戍s浴鱦沮胃 http://www-4.ibm.com/software/ad/vacpp/ Micro Focus COBOL 哀鏵詻媴戍次劑睦長胃 Micro Focus COBOL 次劑 4.0.20 Micro Focus COBOL Net Express 次劑 3.0 34.1.2 削蜪{搨 柰媴洇委睦欑s柱赴旨麩s膣碉洇餳削蒤v柜躒珫胃 salarycltvc Visual C++ DB2 CLI 削膇 Visual Basic 暖酨獛長 salarysrv耶 SALSVADO 削 OLE 椻韥暖酨獛 (SALSVADO) 碉 SALCLADO 雚膼鱄A 彀 32 祅戍 Visual Basic 碉 ADO 柰鸉耍繣式 staff2 戍樹鶩窘耶 柰媴洇委睦欑s柱赴矩扯z媥蛈稑靘X獛搨削蒤v柜躒珫胃 腺 AIX 媥 3.1.6 詰鶔囍柳歃戍 ADSM API 雚膼龢黦擋獛搨澱鏺墨 xlc_r 詰 xlC_r 哀鏵碰駒鉈擔耍 椴唏墨 xlc 詰 xlC 鉈擔耍饓徫鈮擋獛搨長柜鸉 耶 殛俊奚定長鸉戍揅曄耶 o譂擋腺赴矩扯z媥蛈稑靘X獛搨削蒤v耍 db2uext2.cadsm耶 愩刖鞮戍睦擋獛搨板墨唏鸉揅曄定鄎s繾A鞮養鄧矧擋禁肄照 IC21925E 詰s鼪睦擋獛搨虪舌耶 禁肄照養擋腺 index.storsys.ibm.com 鱧巰FTP 再 齗耶 o|嵅o ADSM API 柳歃廌 3.1.3耶 ------------------------------------------------------------------------ 34.2 3 礤熪 DB2 睦擋獛搨戍柜鬞 34.2.1 礤熪耑make 碉砷照泥戍洢擋獛搨 式 16 洇 bldevm 戍熡到睦欑Q伸ㄙ灟G bldevm 麩忌豍{搨削蜪{搨耍evm (骷譂擋腺 AIX耑OS/2 碉 Windows 32 祅鏼~鑶 )耶 式 17 睦欑霄服柰媴熡到胃 bldmevm 麩忌豍{搨削蜪{搨耍evm耍瓬 Microsoft Visual C++ 哀鏵耶 bldvevm 麩忌豍{搨削蜪{搨耍evm耍閭柼 VisualAge Visual C++ 哀鏵耶 ------------------------------------------------------------------------ 34.3 4 礤熪 Java Applets 碉睦擋獛搨 34.3.1 ]肄 礔鞮彀儭戍樹鬧柼媥 IBM JDK 1.1.8 鉈鑅 SQLJ 獛搨耍 屑茫繐 1999 搤 11 24 苗詰祌英戍 JDK 礤熪齔耶騶屑鞮|彀哀鐐裁兼門 JNI 砷鬞昔耶 礔鞮彀儭戍樹鬧柼媥 IBM JDK 1.2.2 鉈鑅 SQLJ 獛搨耍屑茫繐 2000 搤 4 17 苗詰祌英戍 JDK 鑅齔耶騶屑耍鞮|彀哀鐐裁兼門潲戍 Java ю悚耶 黳歃躒 AIX耑HP-UX耑Linux 瓬 Solaris耍 灥鋅 JDBC 2.0 戍鬞愩柰胃 媥 Java 睦擋獛搨戍 JDBC 2.0 X韥獛搨 JDBC 1.22 X韥獛搨板詻嗀鏼~鑶釸w]戍X韥獛搨耶 儵媥 JDBC 2.0 戍s蕶詫耍 鞮澱鏺揅壧 JDK 1.2 儭耶 顟擋 JDBC 2.0 戍s蕶詫僤鬾睦擋獛搨祌容耍鞮澱鏺 椻 sqllib/java12 到熪鋇 usejdbc2 銻僯]肄蒤C 睦擋獛搨養鄧柜托 擋 JDBC 2.0 X韥獛搨耍鞮隳楯洌s柱柰媴洇委熡枵]肄耍愩 .profile耍詰 Shell 鱌絛]肄 script耍愩 .bashrc耑.cshrc 詰 .kshrc胃 . sqllib/java12/usejdbc2 俊肄殛銻舅鑅彀鸉 db2profile 戍銻祌耍廅長 usejdbc2 睦欑彀 db2profile 祌鸉耶 儵較廌炵黈 JDBC 1.22 X韥獛搨耍巷彀 sqllib/java12 到柰鸉柰媴銻胃 . usejdbc1 媥 Java 暖酨獛碉 UDF 戍 JDBC 2.0 X韥獛搨 儵媥 Java 暖酨獛碉 UDF 戍 JDBC 2.0 X韥獛搨耍鞮澱鏺]肄裮j塒媥蛈犌 蒤C w]戍j塒媥蛈 ID 板 db2fenc1耶 儵]肄j塒媥蛈 ID 戍蒤A巷鸉 柰媴纙J胃 1. s柱柰媴洇委j塒媥蛈 ID ]肄耍愩 .profile耍詰j塒媥蛈 ID Shell 鱌絛]肄 script耍愩 .bashrc耑.cshrc 詰 .kshrc胃 . sqllib/java12/usejdbc2 2. 椻 CLP 熪鋇柰媴銻胃 db2set DB2_USE_JDK12=1 儵較廌炵黈儭 Java UDFs 碉暖酨獛戍 JDBC 1.22 X韥獛搨耍巷鸉柰媴纙 J胃 1. 彀j塒媥蛈 ID ]肄耍愩 .profile耍詰椻j塒媥蛈 ID Shell 鱌絛]肄 script耍愩 .bashrc耑.cshrc 詰 .kshrc洇醨鄧柰媴齁胃 . sqllib/java12/usejdbc2 2. 椻 CLP 熪鋇柰媴銻胃 db2set DB2_USE_JDK12= 睦擋獛搨養鄧柜托媥 JDBC 2.0 X韥獛搨耍鞮養鄧s柱鄧柰媴熡枵]肄 耍愩 .profile耍詰 Shell 鱌絛]肄 script耍愩 .bashrc耑.cshrc 詰 .kshrc胃 . sqllib/java12/usejdbc2 俊肄殛銻舅鑅彀鸉 db2profile 戍銻祌耍廅長 usejdbc2 睦欑彀 db2profile 祌鸉耶 HP-UX 彀 DB2 for HP-UX (鰗 JDK 1.1) 柼耍儭 Java 暖酨獛瓬媥蛈瑏w霿戍耶 Silicon Graphics IRIX ↗媥 -o32 旨麩ю悚鉈鑅 SQLJ 睦擋獛搨虋媥釱べ JDK 1.2.2 戍 Java JIT 哀 鏵耍礔 SQLJ 黈獛搨廅牁鱦沮砷椴噬韖耍巷覃敺Ho譇銻鉲饁 JIT 哀 齗胃 export JAVA_COMPILER=NONE 彀 Silicon Graphics IRIX 柼礤熪 Java SQLJ 獛搨茫繐 JDK 1.2.2耶 Windows 32 祅鏼~鑶 媥 Java 暖酨獛碉 UDF 戍 JDBC 2.0 X韥獛搨 儵媥 Java 暖酨獛碉 UDF 戍 JDBC 2.0 X韥獛搨耍鞮澱鏺鸉柰媴纙J僯]肄 蒤G 1. 彀 sqllib\java12 到柰熪鋇柰媴銻胃 usejdbc2 2. 椻 CLP 熪鋇柰媴銻胃 db2set DB2_USE_JDK12=1 儵較廌炵黈儭 Java UDFs 碉暖酨獛戍 JDBC 1.22 X韥獛搨耍巷鸉柰媴纙 J胃 1. 彀 sqllib\java12 到柰熪鋇柰媴銻胃 usejdbc2 2. 椻 CLP 熪鋇柰媴銻胃 db2set DB2_USE_JDK12= 34.3.1.1 OS/2 柼戍 JDK 柳歃 鸉 1999 搤 9 祌容熪式戍 JDK 1.1.8 次戍 OS/2 潲妄ず欣鬞昔耶 巷俊肄鞮 爩嗀稒s戍 JDK 1.1.8 次耶 34.3.1.2 HP-UX 柼戍 Java2 礔繐鸉 Java2 暖酨獛耍澱鏺鶔媷擋定尚耍愩柰詻胃 export SHLIB_PATH=$JAVADIR/jre/lib/PA_RISC:$JAVADIR/ jre/lib/PA_RISC/classic:$HOME/sqllib/lib:/usr/lib:$SHLIB_PATH $JAVADIR 板 Java2 SDK 戍鑅耶 ------------------------------------------------------------------------ 34.4 5 礤熪 SQL 獛 34.4.1 ]肄 SQL 獛 柰媴板腺彀赴揅壧赳珫]肄 DB2 蒡戍衣閭祗腦耶 礔茫 SQL 獛儭耍鞮澱鏺彀再齗柼揅壧赴睦擋獛搨礤熪雚膼 (Application Development Client)赳耶礔茫揅壧赴睦擋獛搨礤熪雚膼鱄v戍虎鬞耍 巷囓僨A 擋鞮戍樹鬧戍 t枵 岩y耶礔茫鞮樹鬧珫 DB2 儭戍 C 瓬 C++ 哀鏵戍虎 鬞耍 巷囓酀赴樹鬧儭戍n赳耶 : 彀 OS/2 FAT 鑶豜W耍赴SQL 獛赳戍找巰投貙長柍譇戠祅鄧柰耶 找 巰投礔腺柍譇戠祅耍屑澱鏺媥 HPFS 鑶蚼C 哀鏵歧呃墨倔睞槷靋G ]肄哀鏵戍瓬肄霿哀纁銻耶 虪 哀鏵戍柫灁(bin)耑定(lib)瓬枵戍尚耶 哀纁銻板 DB2 醨擋鄎s SQL 獛詻擁戍 C 戍蘠鬷銻耶 34.4.2 ]肄哀鏵 彀 OS/2耑Windows 瓬 UNIX 鏼~鑶豜W黂鑅蜙嵥戍W屑耍 愩柰詻耶 彀倔 戍餼如柰耍茫繐鏼歧呃胚彀擂餼灉耍 DB2_SQLROUTINE_COMPILER_PATH DB2 熡 到澱鏺]肄長嵢柜譇 譂’杉]肄戍養鸉 Script耶 : 鞮養媥 db2set 銻詰媥蚼u暖酨獛鑅齗赳戍 赴SQL 暖酨獛鑅 醳赳僯]肄o譇 DB2 熡到戍襏耶媥蚼uSQL 暖酨獛鑅醳赳 茫繐舫酨灥定再齗耍定再齗柛擋薿s鼖韥鄧鶔擁 耶 彀 OS/2 柼胃 黳 IBM VisualAge C++ for OS/2 次劑 3.6胃 db2set DB2_SQLROUTINE_COMPILER_PATH="c:\ibmcxxo\bin\setenv.cmd" 黳 IBM VisualAge C++ for OS/2 次劑 4胃 db2set DB2_SQLROUTINE_COMPILER_PATH="c:\ibmcpp40\bin\setenv.cmd" : o銻板糶] C++ 哀鏵板揅壧彀 C: 忪忘鼭柼耶 愩刖茫繐耍鶔忪忘鼭詰 尚閞堛M鞮鑶豜W C++ 哀鏵戍鑅耶 彀 Windows 32 祅鏼~鑶豜W耍愩刖哀鏵戍板]肄長 SYSTEM 耍 屑 茫繐鏼摃黂鑅耶 騶屑耍巷醨 DB2_SQLROUTINE_COMPILER_PATH DB2 熡到]肄 長胃 黳 Microsoft Visual C++ 次劑 5.0胃 db2set DB2_SQLROUTINE_COMPILER_PATH="c:\devstudio\vc\bin\vcvars32.bat" 黳 Microsoft Visual C++ 次劑 6.0胃 db2set DB2_SQLROUTINE_COMPILER_PATH="c:\Micros~1\vc98\bin\vcvars32.bat" 黳 IBM VisualAge C++ for Windows 次劑 3.6胃 db2set DB2_SQLROUTINE_COMPILER_PATH="c:\ibmcxxw\bin\setenv.bat" 黳 IBM VisualAge C++ for Windows 次劑 4胃 db2set DB2_SQLROUTINE_COMPILER_PATH="c:\ibmcppw40\bin\setenv.bat" : o銻板糶] C++ 哀鏵板揅壧彀 C: 忪忘鼭柼耶 愩刖茫繐耍鶔忪忘鼭詰 尚閞堛M鞮鑶豜W C++ 哀鏵戍鑅耶 彀 UNIX 鏼~鑶豜W耍DB2 |彀鞮柜歃哀艩x酨獛擁養鸉戍 Script $HOME/sqllib/function/routine/sr_cpath (霄鰗哀鏵戍w]襏)耶 鞮養 哀殛耍愩刖w]襏譂擋腺鞮戍哀鏵耶 駙鴉耍鞮養醨 DB2_SQLROUTINE_COMPILER_PATH DB2 熡到]長霄鰗駙柜譇養鸉 Script 戍蘠鬷 尚巰投耍彀 Script 洇肄齔戍襏 (巷表柼貘戍削)耶 34.4.3 椻繘哀纁銻 Application Development Client 戍揅壧虪柅柜譇w]戍哀纁銻耍 養擋腺 臠譇樹鬧柼儭戍哀鏵祌柜胃 AIX胃IBM C Set++ for AIX 次劑 3.6.6 Solaris胃SPARCompiler C++ 次劑 4.2 瓬 5.0 HP-UX胃HP-UX C++ 次劑 A.12.00 Linux胃GNU/Linux g++ 次劑 egcs-2.90.27 980315 (egcs-1.0.2 release) PTX胃ptx/C++ 次劑 5.2 OS/2胃IBM VisualAge C++ for OS/2 次劑 3 Windows NT 瓬 Windows 2000胃Microsoft Visual C++ 次劑 5.0 瓬 6.0 礔繐媥釱擂哀鏵耍詰繐椻繘w]銻耍 鞮澱鏺醨 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡到]長愩柰戍銻胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=compilation_command 珫 compilation_command 板 C 詰 C++ 哀纁銻耍 霄服擔暖酨獛詻茫戍醳 瓬囓耶 彀哀纁銻珫耍巷媥觙戠 SQLROUTINE_FILENAME 僓ˇN詻擁戍 SQC耑C耑PDB耑 DEF耑EXP耑 鬞昔矩瓬媷擋定戍巰耶譧黳 AIX耍媥 SQLROUTINE_ENTRY 戠僓ˇN熡到巰投耶 : 鞮養媥 db2set 銻詰媥蚼u暖酨獛鑅齗赳戍 赴SQL 暖酨獛鑅 醳赳僯]肄o譇 DB2 熡到戍襏耶媥蚼uSQL 暖酨獛鑅醳赳 茫繐舫酨灥定再齗耍定再齗柛擋薿s鼖韥鄧鶔擁 耶 柰媴板 C 詰 C++ 哀鏵彀儭戍再齗樹鬧戍 DB2_SQLROUTINE_COMPILE_COMMAND w]襏耶 AIX 媥 IBM C for AIX 次劑 3.6.6胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=xlc -H512 -T512 \ -I$HOME/sqllib/include SQLROUTINE_FILENAME.c -bE:SQLROUTINE_FILENAME.exp \ -e SQLROUTINE_ENTRY -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib -lc -ldb2 媥 IBM C Set++ for AIX 次劑 3.6.6胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=xlC -H512 -T512 \ -I$HOME/sqllib/include SQLROUTINE_FILENAME.c -bE:SQLROUTINE_FILENAME.exp \ -e SQLROUTINE_ENTRY -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib -lc -ldb2 礔鑭嗀]肄 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡韄耍屑o板w]哀纁 銻耶 : 礔繐彀 AIX 柼哀 64 祅 SQL 獛耍醨 -q64 醳s柱柼貘戍銻耶 媥 IBM VisualAge C++ for AIX 次劑 4胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="vacbld" 礔鞮彀 vacbld 銻祌鑭嗀肄歧呃耍DB2 |彀藃歃擔 SQL 獛耍 擔柰 媴w]戍歧呃耶 $HOME/sqllib/function/routine/sqlproc.icc 礔鞮繐媥軝縌v戍歧呃耍養彀]肄 DB2_SQLROUTINE_COMPILE_COMMAND 戍 DB2 熡韄 襏耍 肄鞮繐媥蛈妒[呃胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="vacbld %DB2PATH%/function/sqlproc.icc" HP-UX 媥 HP C 哀鏵次劑 A.11.00.03胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=cc +DAportable +ul -Aa +z \ -I$HOME/sqllib/include -c SQLROUTINE_FILENAME.c; \ ld -b -o SQLROUTINE_FILENAME SQLROUTINE_FILENAME.o \ -L$HOME/sqllib/lib -ldb2 媥 HP-UX C++ 次劑 A.12.00胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=CC +DAportable +a1 +z -ext \ -I$HOME/sqllib/include -c SQLROUTINE_FILENAME.c; \ ld -b -o SQLROUTINE_FILENAME SQLROUTINE_FILENAME.o \ -L$HOME/sqllib/lib -ldb2 礔鑭嗀]肄 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡韄耍屑o板w]哀纁 銻耶 Linux 媥 GNU/Linux gcc 次劑 2.7.2.3胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=cc \ -I$HOME/sqllib/include SQLROUTINE_FILENAME.c \ -shared -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib -ldb2 媥 GNU/Linux g++ 次劑 egcs-2.90.27 980315 (egcs-1.0.2 次歃)胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=g++ \ -I$HOME/sqllib/include SQLROUTINE_FILENAME.c \ -shared -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib -ldb2 礔鑭嗀]肄 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡韄耍屑o板w]哀纁 銻耶 PTX 媥 ptx/C 次劑 4.5胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=cc -KPIC \ -I$HOME/sqllib/include SQLROUTINE_FILENAME.c \ -G -o SQLROUTINE_FILENAME.so -L$HOME/sqllib/lib -ldb2 ; \ cp SQLROUTINE_FILENAME.so SQLROUTINE_FILENAME 媥 ptx/C++ 次劑 5.2胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=c++ -KPIC \ -D_RWSTD_COMPILE_INSTANTIATE=0 -I$HOME/sqllib/include SQLROUTINE_FILENAME.c \ -G -o SQLROUTINE_FILENAME.so -L$HOME/sqllib/lib -ldb2 ; \ cp SQLROUTINE_FILENAME.so SQLROUTINE_FILENAME 礔鑭嗀]肄 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡韄耍屑o板w]哀纁 銻耶 OS/2 媥 IBM VisualAge C++ for OS/2 次劑 3胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="icc -Ge- -Gm+ -W2 -I%DB2PATH%\include SQLROUTINE_FILENAME.c /B\"/NOFREE /NOI /ST:64000\" SQLROUTINE_FILENAME.def %DB2PATH%\lib\db2api.lib" 礔鑭嗀]肄 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡韄耍屑o板w]哀纁 銻耶 媥 IBM VisualAge C++ for OS/2 次劑 4胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="vacbld" 礔鞮彀 vacbld 銻祌鑭嗀肄歧呃耍DB2 |彀藃歃擔 SQL 獛耍 擔柰 媴w]戍歧呃耶 %DB2PATH%\function\routine\sqlproc.icc 礔鞮繐媥軝縌v戍歧呃耍養彀]肄 DB2_SQLROUTINE_COMPILE_COMMAND 戍 DB2 熡韄 襏耍 肄鞮繐媥蛈妒[呃胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="vacbld %DB2PATH%\function\sqlproc.icc" Solaris 媥 SPARCompiler C 次劑 4.2 碉 5.0胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=cc -xarch=v8plusa -Kpic \ -I$HOME/sqllib/include SQLROUTINE_FILENAME.c \ -G -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib \ -R$HOME/sqllib/lib -ldb2 媥 SPARCompiler C++ 次劑 4.2 碉 5.0胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=CC -xarch=v8plusa -Kpic \ -I$HOME/sqllib/include SQLROUTINE_FILENAME.c \ -G -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib \ -R$HOME/sqllib/lib -ldb2 礔鑭嗀]肄 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡韄耍屑o板w]哀纁 銻耶 : 1. -xarch=v8plusa 哀鏵醳洄s柱w]哀鏵銻耶嗀長摃s柱殛醳戍 僝`耍巷囓酀34.8, " 12 礤熪 Solaris 睦擋獛搨"耶 2. 礔繐彀 Solaris 柼哀 64 祅 SQL 獛耍灥 -xarch=v8plusa 醳耍虋醨 -xarch=v9 醳s柱柼貘戍銻耶 Windows NT 碉 Windows 2000 : Windows 98 詰 Windows 95 儭 SQL 獛耶 媥 Microsoft Visual C++ 次劑 5.0 碉 6.0胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND=cl -Od -W2 /TC -D_X86_=1 -I%DB2PATH%\include SQLROUTINE_FILENAME.c /link -dll -def:SQLROUTINE_FILENAME.def /out:SQLROUTINE_FILENAME.dll %DB2PATH%\lib\db2api.lib 礔鑭嗀]肄 DB2_SQLROUTINE_COMPILE_COMMAND DB2 熡韄耍屑o板w]哀纁 銻耶 媥 IBM VisualAge C++ for Windows 次劑 3.6胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="ilib /GI SQLROUTINE_FILENAME.def &icc -Ti -Ge- -Gm+ -W2 -I%DB2PATH%\include SQLROUTINE_FILENAME.c /B\"/ST:64000 /PM:VIO /DLL\" SQLROUTINE_FILENAME.exp %DB2PATH%\lib\db2api.lib" 媥 IBM VisualAge C++ for Windows 次劑 4胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="vacbld" 礔鞮彀 vacbld 銻祌鑭嗀肄歧呃耍DB2 |彀藃歃擔 SQL 獛耍 擔柰 媴w]戍歧呃耶 %DB2PATH%\function\routine\sqlproc.icc 礔鞮繐媥軝縌v戍歧呃耍養彀]肄 DB2_SQLROUTINE_COMPILE_COMMAND 戍 DB2 熡韄 襏耍 肄鞮繐媥蛈妒[呃胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="vacbld %DB2PATH%\function\sqlproc.icc" 礔繐廌w]哀鏵醳耍鄧柰媴銻醨 DB2_SQLROUTINE_COMPILE_COMMAND 戍 DB2 熡韄襏 ]肄長 NULL胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND= 34.4.4 奚蟂珫繾 SQL 獛鑭嗀歈閱擔耍鞮澱鏺韥飁Q鞥戍珫繾耶o腺柰媴 到斖胃 UNIX $DB2PATH/function/routine/sqlproc/$DATABASE/$SCHEMA/tmp 彀殛 $DB2PATH 板擔膃屁到耍$DATABASE 板定巰投耍 椴 $SCHEMA 板 擋鉈擔 SQL 獛戍找巰投耶 OS/2 碉 Windows %DB2PATH%\function\routine\sqlproc\%DATABASE%\%SCHEMA%\tmp 珫 %DB2PATH% 鋅式擔膃屁到耍%DATABASE% 鋅式定巰投耍 椴 %SCHEMA% 鋅式擋鉈擔 SQL 獛戍找巰投耶 34.4.5 樵碉駻鑅 彀擔 SQL 獛耍擁戍媷擋定/DLL 柛|奚蟂彀悚到式珫耍 愩刖擁戍媷 擋定/DLL 洟腺 2 MB耶 彀樵瓬駻鑅定耍摃擁戍媷擋定/DLL 洟 腺 2 MB 戍 SQL 獛|媥 悚到式珫詻奚蟂戍次劑僤聧樵瓬駻鑅耶 愩刖鞮嗀 擁戍媷擋定/DLL 毠腺 2 MB 戍 SQL 獛耍 巷俊肄鞮柛擋定樵瓬駻鑅僤 鑶蛈杉樵瓬駻鑅耶 愩刖鑭嗀耍鞮澱鏺媥 syscat.procedures 悚到式珫戍 僬待縥薿 SQL 獛戍媷擋定/DLL耶 : 彀定廌駻耍詻嗀鑶豜W竀tQ廌駻定戍 SQL 獛養鸉|Q 齁耶 愩刖豯矧擔歧呃囓 (indexrec) ]長 RESTART耍餪|雚悚到式跌 灥詻嗀 SQL 獛養鸉耍 虋腺柰歃s鼪舅廌鑶蚼C 騶屑耍SQL 養鸉 |彀 SQL 獛柜歃鸉跌灥耶 養鸉|Q舅廌柰媴到胃 UNIX $DB2PATH/function/routine/sqlproc/$DATABASE 彀殛 $DB2PATH 板擔膃屁到耍椴 $DATABASE 板擋鉈擔 SQL 獛戍 定巰投耶 OS/2 碉 Windows %DB2PATH%\function\routine\sqlproc\%DATABASE% 珫 %DB2PATH% 鋅式擔膃屁到耍 椴 %DATABASE% 鋅式擋鉈擔 SQL 獛 戍定巰投耶 34.4.6 擔 SQL 獛 醨定扯z獛搨戍歧呃囓 KEEPDARI ]肄長 'NO'耍鄧鑅 SQL 獛耶 礔 SQL 獛柜氅鸉枵扛你耍繐鄧嵥巰鵛鞥碉薿暖酨獛養|豃J齶ガ耍 愩 嵥定潲妄駻s耍椴養鸉潲妄雚鑶郩迶╲C♂z覃樖_鶔詰鵛鞥 定柛|豃J齶ガ耍廅長潲妄飁養鸉耶 巷囓酀赴睦擋獛搨礤熪銳耍 2 ]肄赳戍赴鶔s定扯z獛搨歧呃赳耍鄧 灥隳]肄 KEEPDARI 囓戍欏僝鬞耶 : SQL 獛儭柰媴囓戍ю悚胃 o LONG VARGRAPHIC o 柫灁毠悚旨麩 (BLOB) o 戠祅毠悚旨麩 (CLOB) o 祅樕j悚旨麩 (DBCLOB) 34.4.7 碰駒暖酨獛 赴媥袑I駒銻赳珫戍柜沮睦欑伸ㄜG 儵媥袑I駒銻耍巷枵暖酨獛巰投耍鄧瓬 IN 詰 INOUT 戍囓耍蛟嗀Q長臠柜 譇鋇囓祌鑅奚蟂襶 '?'耶 礔繐灥隳 CALL 銻戍欏鉒y妄耍巷囓酀10.14, "CALL"耶 34.4.8 牁鷫洄哀籉 SQL 獛 : 礔繐彀 DB2 再齗祌繾牁鷫洄哀籉 SQL 獛耍 鞮澱鏺腺臠柜譇|鏼長洄 哀 SQL 獛戍僬 (詰癸) 戍 DB2 再齗鸉柰媴纙J胃 纙J 揅壧 FixPak 3 1. 纙J 熪鋇 db2updv7 銻鄧鼖擋 DB2 僓ˇX瓬揅壧洄哀籉 SQL 獛胃 2. db2updv7 -d database_name ♂z肄霿柜譇 SQL 獛耍擂|黈長柜譇 C 獛搨耑w樺哀鐉L耑 癸定s 膣耑哀鐒Я膣鄧擔柜譇媷擋定耶 哀譪觙膣戍纙J茫繐彀定再齗鼭齗 柼嗀養擋戍 C 詰 C++ 哀鏵耶潒椴耍鞮彀肄霿 SQL 獛耍 鞮養醨擂鄧洄哀籉 灉搨牁鷫彀虎嵥樹鬧柼鸉戍 DB2 定耍 椴茫繐養酨灥 C 詰 C++ 哀鏵耶 DB2 委\媥蛈碖q柜譇定灥鋇洄哀鏷軝郎 SQL 獛耍 鄧瓬揅壧洄哀鏷軝郎 SQL 獛駙柜譇定耶 DB2 虪柅銻祊貘瓬獛搨]繣祊貘僤鬾灥鋇瓬揅壧鏼~耶銻祊貘墨譇 CLP 銻槷靋G GET ROUTINE 瓬 PUT ROUTINE耶獛搨]繣祊貘墨譇洇暖酨獛 歈胃GET_ROUTINE_SAR 瓬 PUT_ROUTINE_SAR耶嗀銻祊貘戍欏僝鬞耍巷囓 Command Reference耶嗀獛搨]繣祊貘戍欏僝鬞耍 巷囓 SQL Reference耶 礔繐雚柜譇定再齗牁鷫洄哀籉 SQL 獛駙柜譇定再齗耍 巷鸉柰 媴纙J胃 纙J 1. 礤熪睦擋獛搨耍霄服肄霿長睦擋獛搨倔椰 SQL 獛耶 纙J 2. 彀鵃灚獛耍醨臠柜譇獛戍洄哀籉蜀茶ˇX柜譇嵥戍耶 礔 茫欏僝鬞耍巷囓 Command Reference 珫戍 GET ROUTINE 銻詰 SQL Reference 珫戍 GET_ROUTINE_SAR 暖酨獛耶 纙J 3. 彀臠柜鬧再齗柼揅壧臠柜譇獛戍洄哀籉蜀祗A 鞮養熪鋇 PUT ROUTINE 銻耍詰碰駒 PUT_ROUTINE_SAR 暖酨獛 (媥 2 詻擔戍 )耶臠柜譇定再齗戍鏼~鑶豜 DB2 柳歃澱鏺虎嵥耶 ------------------------------------------------------------------------ 34.5 7 礤熪 HP-UX 睦擋獛搨 34.5.1 HP-UX C 彀赴愫薿鸉睦擋獛搨赳洇耍bldmt Script 墨嵥戍哀籊醳儘耶 s次劑彀 sqllib/samples/c 到柰耶 34.5.2 HP-UX C++ 彀鑅 Script 珫耍HP aC++ 哀鏵戍 C++ 哀鏵 CC Q灥鋅長 aCC耶 鑅 Script 戍儘次彀 sqllib/samples/cpp 到柰耶 "+u1" 哀籊醳睦欑碉 aCC 哀鏵柜鱌擋鉈鑅暖酨獛瓬 UDF耶 殛醳委\冀怠 鬷戍酨灥耶衣彀 DB2 for HP-UX 珫戍削蒡鑅 Script耑 bldsrv 碉 bldudf耍鄧 瓬削 makefile 腮冀擋殛醳鶔s耶彀媥蛃e睦欑繐擂謰鉧[枵o譇醳耶 o 斖板 bldsrv 瓬 bldudf Script 戍s哀鐒BJ胃 aCC +DAportable +u1 -Aa +z -ext -I$DB2PATH/include -c $1.C 彀赴愫薿鸉睦擋獛搨赳洇耍bldmt Script 墨嵥戍哀籊醳儘耶 s次劑彀 sqllib/samples/cpp 到柰耶 ------------------------------------------------------------------------ 34.6 9 礤熪 OS/2 睦擋獛搨 34.6.1 VisualAge C++ for OS/2 次劑 4.0 黳 OS/2 碉 Windows耍媥 set 銻椴媥軝躒珫戍 export 銻耶蜙p耍set CLI=tbinfo耶 彀赴DB2 CLI 睦擋獛搨赳戍歃躒赴鑅虋鸉洇鰗戍 SQL 睦擋獛搨赳斖耍 黳 OS/2 碉 Windows耍澱鏺媥 cliapi.icc 椴唏 cli.icc 耍 廅長洇鰗戍 SQL 睦 擋獛搨茫繐墨 cliapi.icc 膣戍 db2api.lib 定耶 ------------------------------------------------------------------------ 34.7 10 礤熪 PTX 睦擋獛搨 34.7.1 ptx/C++ 定茫繐鄧 -shared 醳膣耍鄧鑅暖酨獛碉媥蛈瑏w霿耶 彀 sqllib/samples 到斖耍makefile耑 鑅 scripts bldsrv 碉 bldudf 洄鶔s枵 o譇醳耍 愩嵥柰媴 bldsrv 戍膣纙J胃 c++ -shared -G -o $1 $1.o -L$DB2PATH/lib -ldb2 ------------------------------------------------------------------------ 34.8 12 礤熪 Solaris 睦擋獛搨 34.8.1 SPARCompiler C++ 腺 Solaris 鸉 C/C++ 睦擋獛搨碉 SQL 獛戍齶ガ 媥 Sun WorkShop Compiler C/C++耍愩刖鞮蘳養鸉鼪搌柰媴砷鬞昔胃 1. 柜砰妄砷: `('w齔戍 2. ksh: <睦擋獛搨巰投>: 鸉 (睦擋獛搨巰投長養鸉巰投) 鞮養J戍齶ガ板耍哀鏵彀膣 libdb2.so 耍鑭嗀擁嗀戍養鸉耶 儘妄耍s柱柰媴哀鏵醳哀蘢M膣銻胃 -xarch=v8plusa 削蒤A‵s糮d蒴擋獛搨 dynamic.sqc胃 embprep dynamic sample embprep utilemb sample cc -c utilemb.c -xarch=v8plusa -I/export/home/db2inst1/sqllib/include cc -o dynamic dynamic.c utilemb.o -xarch=v8plusa -I/export/home/db2inst1/sqllib/include \ -L/export/home/db2inst1/sqllib/lib -R/export/home/db2inst1/sqllib/lib -l db2 : 1. 礔鞮彀 Solaris 柼媥 SQL 獛耍虋zL DB2_SQLROUTINE_COMPILE_COMMAND ]肄僓媥軝縌v戍哀轕r耍巷俊肄鞮洄醨柼翷戍哀鏵醳枵耶 w ]戍哀鏵銻霄服殛醳胃 db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -# -Kpic -xarch=v8plusa -I$HOME/sqllib/include \ SQLROUTINE_FILENAME.c -G -o SQLROUTINE_FILENAME -L$HOME/sqllib/lib -R$HOME/sqllib/lib -ldb2 2. 礔繐彀 Solaris 柼哀 64 祅 SQL 獛耍灥 -xarch=v8plusa 醳耍虋醨 -xarch=v9 醳s柱柼貘戍銻耶 ------------------------------------------------------------------------ 34.9 13 鑅 Windows 32 祅鏼~鑶蛈孚擋獛搨 34.9.1 VisualAge C++ 次劑 4.0 黳 OS/2 碉 Windows耍媥 set 銻椴媥軝躒珫戍 export 銻耶蜙p耍set CLI=tbinfo耶 彀赴DB2 CLI 睦擋獛搨赳戍歃躒赴鑅虋鸉洇鰗戍 SQL 睦擋獛搨赳斖耍 黳 OS/2 碉 Windows耍澱鏺媥 cliapi.icc 椴唏 cli.icc 耍 廅長洇鰗戍 SQL 睦 擋獛搨茫繐墨 cliapi.icc 膣戍 db2api.lib 定耶 ------------------------------------------------------------------------ Application Development Guide(潲珫次) ------------------------------------------------------------------------ 35.1 Chapter 2. Coding a DB2 Application 35.1.1 Activating the IBM DB2 Universal Database Project and Tool Add-ins for Microsoft Visual C++ Before running the db2vccmd command (step 1), please ensure that you have started and stopped Visual C++ at least once with your current login ID. The first time you run Visual C++, a profile is created for your user ID, and that is what gets updated by the db2vccmd command. If you have not started it once, and you try to run db2vccmd, you may see errors like the following: "Registering DB2 Project add-in ...Failed! (rc = 2)" ------------------------------------------------------------------------ 35.2 Chapter 6. Common DB2 Application Techniques 35.2.1 Generating Sequential Values Generating sequential values is a common database application development problem. The best solution to that problem is to use sequence objects and sequence expressions in SQL. Each sequence object is a uniquely named database object that can be accessed only by sequence expressions. There are two sequence expressions: the PREVVAL expression and the NEXTVAL expression. The PREVVAL expression returns the most recently generated value for the specified sequence for a previous statement. The NEXTVAL sequence expression increments the value of the sequence object and returns the new value of the sequence object. To create a sequence object, issue the CREATE SEQUENCE statement. For example, to create a sequence object called id_values using the default attributes, issue the following statement: CREATE SEQUENCE id_values To display the current value of the sequence object, issue a VALUES statement using the PREVVAL expression: VALUES PREVVAL FOR id_values 1 ----------- 1 1 record(s) selected. You can repeatedly retrieve the current value of the sequence object, and the value that the sequence object returns does not change until you issue a NEXTVAL expression. In the following example, the PREVVAL expression returns a value of 1, until the NEXTVAL expression increments the value of the sequence object: VALUES PREVVAL FOR id_values 1 ----------- 1 1 record(s) selected. VALUES PREVVAL FOR id_values 1 ----------- 1 1 record(s) selected. VALUES NEXTVAL FOR id_values 1 ----------- 2 1 record(s) selected. VALUES PREVVAL FOR id_values 1 ----------- 2 1 record(s) selected. To update the value of a column with the next value of the sequence object, include the NEXTVAL expression in the UPDATE statement, as follows: UPDATE staff SET id = NEXTVAL FOR id_values WHERE id = 350 To insert a new row into a table using the next value of the sequence object, include the NEXTVAL expression in the INSERT statement, as follows: INSERT INTO staff (id, name, dept, job) VALUES (NEXTVAL FOR id_values, 'Kandil', 51, 'Mgr') For more information on the PREVVAL and NEXTVAL expressions, refer to the SQL Reference. 35.2.1.1 Controlling Sequence Behavior You can tailor the behavior of sequence objects to meet the needs of your application. You change the attributes of a sequence object when you issue the CREATE SEQUENCE statement to create a new sequence object, and when you issue the ALTER SEQUENCE statement for an existing sequence object. Following are some of the attributes of a sequence object that you can specify: Data type The AS clause of the CREATE SEQUENCE statement specifies the numeric data type of the sequence object. The data type, as specified in the "SQL Limits" appendix of the SQL Reference, determines the possible minimum and maximum values of the sequence object. You cannot change the data type of a sequence object; instead, you must drop the sequence object by issuing the DROP SEQUENCE statement and issuing a CREATE SEQUENCE statement with the new data type. Start value The START WITH clause of the CREATE SEQUENCE statement sets the initial value of the sequence object. The RESTART WITH clause of the ALTER SEQUENCE statement resets the value of the sequence object to a specified value. Minimum value The MINVALUE clause sets the minimum value of the sequence object. Maximum value The MAXVALUE clause sets the maximum value of the sequence object. Increment value The INCREMENT BY clause sets the value that each NEXTVAL expression adds to the sequence object. To decrement the value of the sequence object, specify a negative value. Sequence cycling The CYCLE clause causes the value of a sequence object that reaches its maximum or minimum value to return to its start value on the following NEXTVAL expression. For example, to create a sequence object called id_values that starts with a value of 0, has a maximum value of 1000, increments by 2 with each NEXTVAL expression, and returns to its start value when the maximum value is reached, issue the following statement: CREATE SEQUENCE id_values START WITH 0 INCREMENT BY 2 MAXVALUE 1000 CYCLE For more information on the CREATE SEQUENCE and ALTER SEQUENCE statements, refer to the SQL Reference. 35.2.1.2 Improving Performance with Sequence Objects Like identity columns, using sequence objects to generate values generally improves the performance of your applications in comparison to alternative approaches. The alternative to sequence objects is to create a single-column table that stores the current value and incrementing that value with either a trigger or under the control of the application. In a distributed environment where applications concurrently access the single-column table, the locking required to force serialized access to the table can seriously affect performance. Sequence objects avoid the locking issues that are associated with the single-column table approach and can cache sequence values in memory to improve DB2 response time. To maximize the performance of applications that use sequence objects, ensure that your sequence object caches an appropriate amount of sequence values. The CACHE clause of the CREATE SEQUENCE and ALTER SEQUENCE statements specifies the maximum number of sequence values that DB2 generates and stores in memory. If your sequence object must generate values in order, without introducing gaps in that order due to a system failure or database deactivation, use the ORDER and NO CACHE clauses in the CREATE SEQUENCE statement. The NO CACHE clause guarantees that no gaps appear in the generated values at the cost of some of your application's performance because it forces your sequence object to write to the database log every time it generates a new value. 35.2.1.3 Comparing Sequence Objects and Identity Columns Although sequence objects and identity columns appear to serve similar purposes for DB2 applications, there are a number of important differences: * An identity column automatically generates values for a column in a single table. A sequence object generates sequential values that can be used in any SQL statement. * An identity column generates values that are guaranteed to be unique. Including the CYCLE clause in a CREATE SEQUENCE or ALTER SEQUENCE statement enables that sequence object to generate duplicate values. ------------------------------------------------------------------------ 35.3 Chapter 7. Stored Procedures 35.3.1 DECIMAL Type Fails in Linux Java Routines This problem occurs because the IBM Developer Kit for Java does not create links for its libraries in the /usr/lib directory. The security model for DB2 routines does not allow them to access libraries outside of the standard system libraries. To enable DECIMAL support in Java routines on Linux, perform the following steps: 1. Create symbolic links from the IBM Developer Kit for Java libraries to /usr/lib/ by issuing the following command with root authority: For IBM Developer Kit for Java 1.1.8: ln -sf /usr/jdk118/lib/linux/native_threads/* /usr/lib/ For IBM Developer Kit for Java 1.3: ln -sf /opt/IBMJava2-13/jre/bin/*.so /usr/lib/ 2. Issue the ldconfig command to update the list of system-wide libraries. 35.3.2 Using Cursors in Recursive Stored Procedures To avoid errors when using SQL Procedures or stored procedures written in embedded SQL, close all open cursors before issuing a recursive CALL statement. For example, assume the stored procedure MYPROC contains the following code fragment: OPEN c1; CALL MYPROC(); CLOSE c1; DB2 returns an error when MYPROC is called because cursor c1 is still open when MYPROC issues a recursive CALL statement. The specific error returned by DB2 depends on the actions MYPROC performs on the cursor. To successfully call MYPROC, rewrite MYPROC to close any open cursors before the nested CALL statement as shown in the following example: OPEN c1; CLOSE c1; CALL MYPROC(); Close all open cursors before issuing the nested CALL statement to avoid an error. 35.3.3 Writing OLE Automation Stored Procedures The last sentence in the following paragraph is missing from the second paragraph under section "Writing OLE automation Stored Procedures": After you code an OLE automation object, you must register the methods of the object as stored procedures using the CREATE PROCEDURE statement. To register an OLE automation stored procedure, issue a CREATE PROCEDURE statement with the LANGUAGE OLE clause. The external name consists of the OLE progID identifying the OLE automation object and the method name separated by ! (exclamation mark). The OLE automation object needs to be implemented as an in-process server (.DLL). ------------------------------------------------------------------------ 35.4 Chapter 12. Working with Complex Objects: User-Defined Structured Types 35.4.1 Inserting Structured Type Attributes Into Columns The following rule applies to embedded static SQL statements: To insert an attribute of a user-defined structured type into a column that is of the same type as the attribute, enclose the host variable that represents the instance of the type in parentheses, and append the double-dot operator and attribute name to the closing parenthesis. For example, consider the following situation: - PERSON_T is a structured type that includes the attribute NAME of type VARCHAR(30). - T1 is a table that includes a column C1 of type VARCHAR(30). - personhv is the host variable declared for type PERSON_T in the programming language. The proper syntax for inserting the NAME attribute into column C1 is: EXEC SQL INSERT INTO T1 (C1) VALUES ((:personhv)..NAME) ------------------------------------------------------------------------ 35.5 Chapter 13. Using Large Objects (LOBs) 35.5.1 Large object (LOBs) support in federated database systems DB2 supports three types of large objects (LOBs): character large objects (CLOBs), double-byte character large objects (DBCLOBs) and binary large objects (BLOBs). For general information about DB2 LOB support, see the following DB2 books: * DB2 Application Development Guide(潲珫次) * DB2 SQL Reference(潲珫次) * DB2 Administration Guide: Planning(潲珫次) In a federated database system, you can access and manipulate LOBs at remote data sources. Because LOBs can be very large, transferring LOBs from a remote data source can be time consuming. The DB2 federated database attempts to minimize transferring LOB data from the data sources, and also attempts to deliver requested LOB data directly from the data source to the requesting application without materializing the LOB at DB2. This section discusses: * How DB2 retrieves LOBs * How applications can use LOB locators * Restrictions on LOBs * Mappings between LOB and non-LOB data types * Tuning the system 35.5.1.1 How DB2 retrieves LOBs DB2 federated systems use two mechanisms to retrieve LOBs: LOB streaming and LOB materialization. LOB streaming In LOB streaming, LOB data is retrieved in stages. DB2 uses LOB streaming for data in result sets of queries that are completely pushed down. For example, consider the following query: SELECT empname, picture FROM orc_emp_table WHERE empno = '01192345' where picture represents a LOB column and orc_emp_table represents a nickname referencing an Oracle table containing employee data. The DB2 query processor marks the picture column for streaming if it decides to run the entire query at the Oracle data source. At execution time, if DB2 notes that a LOB is marked for streaming, it retrieves the LOB in stages from the data source. DB2 then transfers the data to the application memory space. LOB materialization In LOB materialization, the remote LOB data is retrieved by DB2 and stored locally at the federated server. DB2 uses LOB materialization when: * The LOB column cannot be deferred or streamed. * A function must be applied to a LOB column locally, before the data is transferred. This happens when DB2 compensates for functions not available at a remote data source. For example, Microsoft SQL Server does not provide a SUBSTR function for LOB columns. To compensate, DB2 materializes the LOB column locally and applies the DB2 SUBSTR function to the retrieved LOB. 35.5.1.2 How applications can use LOB locators Applications can request LOB locators for LOBs stored in remote data sources. A LOB locator is a 4-byte value stored in a host variable that a program can use to refer to a LOB value (or LOB expression) held in the database system. Using a LOB locator, a program can manipulate the LOB value as if the LOB value was stored in a regular host variable. The difference in using the LOB locator is that there is no need to transport the LOB value from the server to the application (and possibly back again). See the DB2 Application Development Guide for additional information about LOB locators. DB2 can retrieve LOBs from remote data sources, store them at DB2, and then issue a LOB locator against the stored LOB. LOB locators are released when: * Applications issue "FREE LOCATOR" SQL statements. * Applications issue COMMIT statements. * DB2 is restarted. 35.5.1.3 Restrictions on LOBs When using and retrieving LOBs, consider that: * DB2 is unable to bind remote LOBs to a file reference variable. * LOBs are not supported in pass-through mode. 35.5.1.4 Mappings between LOB and non-LOB data types There are a few cases in which you can map a DB2 LOB data type to a non-LOB data type at a data source. When you need to create a mapping between a column with a DB2 LOB type and its counterpart column at a data source, it is recommended that you use a LOB data type as a counterpart if at all possible. To create a mapping, use the create type mapping DDL statement. For example: CREATE TYPE MAPPING my_oracle_lob FROM sysibm.clob TO SERVER TYPE oracle TYPElong where: my_oracle_lob Is the name of the type mapping. sysibm.clob Is the DB2 CLOB data type. oracle Is the type of server you are connecting to. long Is the Oracle data type counterpart. 35.5.2 Tuning the system If an application that retrieves remote LOBs returns an error message indicating there is not enough system resources to process the statement, increase the value of the application heap size parameter, APPLHEAPSZ, in the database configuration file. For example: DB2 UPDATE DB CFG FOR EMPLOYEE USING APPLHEAPSZ 512 where EMPLOYEE is the name of the database you are tuning and 512 is the value of the application heap size parameter. ------------------------------------------------------------------------ 35.6 Part 5. DB2 Programming Considerations 35.6.1 IBM DB2 OLE DB Provider Installing IBM DB2 Version 7.1 FixPak 1 or later corrects the condition that caused DB2 to issue the following error: Test connection failed because of an error in initializing provider. The IBM OLE DB Provider is not available at this time. Please refer to the readme file for more information. For more information on using the IBM OLE DB Provider for DB2, please refer to http://www.ibm.com/software/data/db2/udb/ad/v71/oledb.html. ------------------------------------------------------------------------ 35.7 Chapter 20. Programming in C and C++ The following table supplements the information included in chapter 7, "Stored Procedures", chapter 15, "Writing User-Defined Functions and Methods", and chapter 20, "Programming in C and C++". The table lists the supported mappings between SQL data types and C data types for stored procedures, UDFs, and methods. 35.7.1 C/C++ Types for Stored Procedures, Functions, and Methods Table 22. SQL Data Types Mapped to C/C++ Declarations SQL Column Type C/C++ Data Type SQL Column Type Description SMALLINT sqlint16 16-bit signed integer (500 or 501) INTEGER sqlint32 32-bit signed integer (496 or 497) BIGINT sqlint64 64-bit signed integer (492 or 493) REAL float Single-precision floating (480 or 481) point DOUBLE double Double-precision floating (480 or 481) point DECIMAL(p,s) Not supported. To pass a decimal value, (484 or 485) define the parameter to be of a data type castable from DECIMAL (for example CHAR or DOUBLE) and explicitly cast the argument to this type. CHAR(n) char[n+1] where n is Fixed-length, (452 or 453) large enough to hold null-terminated character the data string 1<=n<=254 CHAR(n) FOR BIT DATA char[n+1] where n is Fixed-length character (452 or 453) large enough to hold string the data 1<=n<=254 VARCHAR(n) char[n+1] where n is Null-terminated varying (448 or 449) (460 or large enough to hold length string 461) the data 1<=n<=32 672 VARCHAR(n) FOR BIT struct { Not null-terminated varying DATA sqluint16 length; length character string (448 or 449) char[n] } 1<=n<=32 672 LONG VARCHAR struct { Not null-terminated varying (456 or 457) sqluint16 length; length character string char[n] } 32 673<=n<=32 700 CLOB(n) struct { Non null-terminated varying (408 or 409) sqluint32 length; length character string with char data[n]; 4-byte string length } indicator 1<=n<=2 147 483 647 BLOB(n) struct { Non null-terminated varying (404 or 405) sqluint32 length; binary string with 4-byte char data[n]; string length indicator } 1<=n<=2 147 483 647 DATE char[11] null-terminated character (384 or 385) form TIME char[9] null-terminated character (388 or 389) form TIMESTAMP char[27] null-terminated character (392 or 393) form Notes: The following data types are only available in the DBCS or EUC environment when precompiled with the WCHARTYPE NOCONVERT option. GRAPHIC(n) sqldbchar[n+1] where n Fixed-length, (468 or 469) is large enough to null-terminated double-byte hold the data character string 1<=n<=127 VARGRAPHIC(n) sqldbchar[n+1] where n Not null-terminated, (400 or 401) is large enough to variable-length double-byte hold the data character string 1<=n<=16 336 LONG VARGRAPHIC struct { Not null-terminated, (472 or 473) sqluint16 length; variable-length double-byte sqldbchar[n] character string } 16 337<=n<=16 350 DBCLOB(n) struct { Non null-terminated varying (412 or 413) sqluint32 length; length character string with sqldbchar data[n]; 4-byte string length } indicator 1<=n<=1 073 741 823 ------------------------------------------------------------------------ 35.8 Chapter 21. Programming in Java 35.8.1 Java Method Signature in PARAMETER STYLE JAVA Procedures and Functions If specified after the Java method name in the EXTERNAL NAME clause of the CREATE PROCEDURE or CREATE FUNCTION statement, the Java method signature must correspond to the default Java type mapping for the signature specified after the procedure or function name. For example, the default Java mapping of the SQL type INTEGER is "int", not "java.lang.Integer". 35.8.2 Connecting to the JDBC Applet Server It is essential that the db2java.zip file used by the Java applet be at the same FixPak level as the JDBC applet server. Under normal circumstances, db2java.zip is loaded from the Web Server where the JDBC applet server is running, as shown in Figure 22 of the book. This ensures a match. If, however, your configuration has the Java applet loading db2java.zip from a different location, a mismatch can occur. Prior to FixPak 2, this could lead to unexpected failures. As of FixPak 2, matching FixPak levels between the two files is strictly enforced at connection time. If a mismatch is detected, the connection is rejected, and the client receives one of the following exceptions: * If db2java.zip is at FixPak 2 or later: COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0621E Unsupported JDBC server configuration. * If db2java.zip is prior to FixPak 2: COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0601E Invalid statement handle or statement is closed. SQLSTATE=S1000 If a mismatch occurs, the JDBC applet server logs one of the following messages in the jdbcerr.log file: * If the JDBC applet server is at FixPak 2 or later: jdbcFSQLConnect: JDBC Applet Server and client (db2java.zip) versions do not match. Unable to proceed with connection., einfo= -111 * If the JDBC applet server is prior to FixPak 2: jdbcServiceConnection(): Invalid Request Received., einfo= 0 ------------------------------------------------------------------------ 35.9 Appendix B. Sample Programs The following should be added to the "Object Linking and Embedding Samples" section: salarycltvc A Visual C++ DB2 CLI sample that calls the Visual Basic stored procedure, salarysrv. SALSVADO A sample OLE automation stored procedure (SALSVADO) and a SALCLADO client (SALCLADO), implemented in 32-bit Visual Basic and ADO, that calculates the median salary in table staff2. ------------------------------------------------------------------------ CLI Guide and Reference(潲珫次) ------------------------------------------------------------------------ 36.1 Binding Database Utilities Using the Run-Time Client The Run-Time Client cannot be used to bind the database utilities (import, export, reorg, the command line processor) and DB2 CLI bind files to each database before they can be used with that database. You must use the DB2 Administration Client or the DB2 Application Development Client instead. You must bind these database utilities and DB2 CLI bind files to each database before they can be used with that database. In a network environment, if you are using multiple clients that run on different operating systems, or are at different versions or service levels of DB2, you must bind the utilities once for each operating system and DB2-version combination. ------------------------------------------------------------------------ 36.2 Using Static SQL in CLI Applications For more information on using static SQL in CLI applications, see the Web page at: http://www.ibm.com/software/data/db2/udb/staticcli/ ------------------------------------------------------------------------ 36.3 Limitations of JDBC/ODBC/CLI Static Profiling JDBC/ODBC/CLI static profiling currently targets straightforward applications. It is not meant for complex applications with many functional components and complex program logic during execution. An SQL statement must have successfully executed for it to be captured in a profiling session. In a statement matching session, unmatched dynamic statements will continue to execute as dynamic JDBC/ODBC/CLI calls. An SQL statement must be identical character-by-character to the one that was captured and bound to be a valid candidate for statement matching. Spaces are significant: for example, "COL = 1" is considered different than "COL=1". Use parameter markers in place of literals to improve match hits. When executing an application with pre-bound static SQL statements, dynamic registers that control the dynamic statement behavior will have no effect on the statements that are converted to static. If an application issues DDL statements for objects that are referenced in subsequent DML statements, you will find all of these statements in the capture file. The JDBC/ODBC/CLI Static Profiling Bind Tool will attempt to bind them. The bind attempt will be successful with DBMSs that support the VALIDATE(RUN) bind option, but it fail with ones that do not. In this case, the application should not use Static Profiling. The Database Administrator may edit the capture file to add, change, or remove SQL statements, based on application-specific requirements. ------------------------------------------------------------------------ 36.4 ADT Transforms The following supercedes existing information in the book. * There is a new descriptor type (smallint) SQL_DESC_USER_DEFINED_TYPE_CODE, with values: SQL_TYPE_BASE 0 (this is not a USER_DEFINED_TYPE) SQL_TYPE_DISTINCT 1 SQL_TYPE_STRUCTURED 2 This value can be queried with either SQLColAttribute or SQLGetDescField (IRD only). The following attributes are added to obtain the actual type names: SQL_DESC_REFERENCE_TYPE SQL_DESC_STRUCTURED_TYPE SQL_DESC_USER_TYPE The above values can be queried using SQLColAttribute or SQLGetDescField (IRD only). * Add SQL_DESC_BASE_TYPE in case the application needs it. For example, the application may not recognize the structured type, but intends to fetch or insert it, and let other code deal with the details. * Add a new connection attribute called SQL_ATTR_TRANSFORM_GROUP to allow an application to set the transform group (rather than use the SQL "SET CURRENT DEFAULT TRANSFORM GROUP" statement). * Add a new statement/connection attribute called SQL_ATTR_RETURN_USER_DEFINED_TYPES that can be set or queried using SQLSetConnectAttr, which causes CLI to return the value SQL_DESC_USER_DEFINED_TYPE_CODE as a valid SQL type. This attribute is required before using any of the transforms. o By default, the attribute is off, and causes the base type information to be returned as the SQL type. o When enabled, SQL_DESC_USER_DEFINED_TYPE_CODE will be returned as the SQL_TYPE. The application is expected to check for SQL_DESC_USER_DEFINED_TYPE_CODE, and then to retrieve the appropriate type name. This will be available to SQLColAttribute, SQLDescribeCol, and SQLGetDescField. * The SQLBindParameter does not give an error when you bind SQL_C_DEFAULT, because there is no code to allow SQLBindParameter to specify the type SQL_USER_DEFINED_TYPE. The standard default C types will be used, based on the base SQL type flowed to the server. For example: sqlrc = SQLBindParameter (hstmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_VARCHAR, 30, 0, &c2, 30, NULL); ------------------------------------------------------------------------ 36.5 Chapter 3. Using Advanced Features 36.5.1 Writing Multi-Threaded Applications The following should be added to the end of the "Multi-Threaded Mixed Applications" section: Notes: It is recommended that you do not use the default stack size, but instead increase the stack size to at least 256 000. DB2 requires a minimum stack size of 256 000 when calling a DB2 function. You must ensure therefore, that you allocate a total stack size that is large enough for both your application and the minimum requirements for a DB2 function call. 36.5.2 Scrollable Cursors The following information should be added to the "Scrollable Cursors" section: 36.5.2.1 Server-side Scrollable Cursor Support for OS/390 The UDB client for the Unix, Windows, and OS/2 platforms supports updatable server-side scrollable cursors when run against OS/390 Version 7 databases. To access an OS/390 scrollable cursor on a three-tier environment, the client and the gateway must be running DB2 UDB Version 7.1, FixPak 3 or later. There are two application enablement interfaces that can access scrollable cursors: ODBC and JDBC. The JDBC interface can only access static scrollable cursors, while the ODBC interface can access static and keyset-driven server-side scrollable cursors. Cursor Attributes The table below lists the default attributes for OS/390 Version 7 cursors in ODBC. Table 23. Default attributes for OS/390 cursors in ODBC Cursor Type Cursor Cursor Cursor Cursor Sensitivity Updatable Concurrency Scrollable forward-onlya unspecified non-updatable read-only non-scrollable concurrency static insensitive non-updatable read-only scrollable concurrency keyset-driven sensitive updatable values scrollable concurrency a Forward-only is the default behavior for a scrollable cursor without the FOR UPDATE clause. Specifying FOR UPDATE on a forward-only cursor creates an updatable, lock concurrency, non-scrollable cursor. Supported Fetch Orientations All ODBC fetch orientations are supported via the SQLFetchScroll or SQLExtendedFetch interfaces. Updating the Keyset-Driven Cursor A keyset-driven cursor is an updatable cursor. The CLI driver appends the FOR UPDATE clause to the query, except when the query is issued as a SELECT ... FOR READ ONLY query, or if the FOR UPDATE clause already exists. The keyset-driven cursor implemented in DB2 for OS/390 is a values concurrency cursor. A values concurrency cursor results in optimistic locking, where locks are not held until an update or delete is attempted. When an update or delete is attempted, the database server compares the previous values the application retrieved to the current values in the underlying table. If the values match, then the update or delete succeeds. If the values do not match, then the operation fails. If failure occurs, the application should query the values again and re-issue the update or delete if it is still applicable. An application can update a keyset-driven cursor in two ways: * Issue an UPDATE WHERE CURRENT OF "" or DELETE WHERE CURRENT OF "" using SQLPrepare() with SQLExecute() or SQLExecDirect(). * Use SQLSetPos() or SQLBulkOperations() to update, delete, or add a row to the result set. Notes: Rows added to a result set via SQLSetPos() or SQLBulkOperations() are inserted into the table on the server, but are not added to the server's result set. Therefore, these rows are not updatable nor are they sensitive to changes made by other transactions. The inserted rows will appear, however, to be part of the result set, since they are cached on the client. Any triggers that apply to the inserted rows will appear to the application as if they have not been applied. To make the inserted rows updatable, sensitive, and to see the result of applicable triggers, the application must issue the query again to regenerate the result set. Troubleshooting for Applications Created Before Scrollable Cursor Support Since scrollable cursor support is new, some ODBC applications that were working with previous releases of UDB for OS/390 or UDB for Unix, Windows, and OS/2 may encounter behavioral or performance changes. This occurs because before scrollable cursors were supported, applications that requested a scrollable cursor would receive a forward-only cursor. To restore an application's previous behavior before scrollable cursor support, set the following configuration keywords in the db2cli.ini file: Table 24. Configuration keyword values restoring application behavior before scrollable cursor support Configuration Keyword Setting Description PATCH2=6 Returns a message that scrollable cursors (both keyset-driven and static) are not supported. CLI automatically downgrades any request for a scrollable cursor to a forward-only cursor. DisableKeysetCursor=1 Disables both the server-side and client-side keyset-driven scrollable cursors. This can be used to force the CLI driver to give the application a static cursor when a keyset-driven cursor is requested. UseServerKeysetCursor=0 Disables the server-side keyset-driven cursor for applications that are using the client-side keyset-driven cursor library to simulate a keyset-driven cursor. Only use this option when problems are encountered with the server-side keyset-driven cursor, since the client-side cursor incurs a large amount of overhead and will generally have poorer performance than a server-side cursor. 36.5.3 Using Compound SQL The following note is missing from the book: Any SQL statement that can be prepared dynamically, other than a query, can be executed as a statement inside a compound statement. Note: Inside Atomic Compound SQL, savepoint, release savepoint, and rollback to savepoint SQL statements are also disallowed. Conversely, Atomic Compound SQL is disallowed in savepoint. 36.5.4 Using Stored Procedures 36.5.4.1 Writing a Stored Procedure in CLI Following is an undocumented limitation on CLI stored procedures: If you are making calls to multiple CLI stored procedures, the application must close the open cursors from one stored procedure before calling the next stored procedure. More specifically, the first set of open cursors must be closed before the next stored procedure tries to open a cursor. 36.5.4.2 CLI Stored Procedures and Autobinding The following supplements information in the book: The CLI/ODBC driver will normally autobind the CLI packages the first time a CLI/ODBC application executes SQL against the database, provided the user has the appropriate privilege or authorization. Autobinding of the CLI packages cannot be performed from within a stored procedure, and therefore will not take place if the very first thing an application does is call a CLI stored procedure. Before running a CLI application that calls a CLI stored procedure against a new DB2 database, you must bind the CLI packages once with this command: UNIX db2 bind /@db2cli.lst blocking all Windows and OS/2 db2bind "%DB2PATH%\bnd\@db2cli.lst" blocking The recommended approach is to always bind these packages at the time the database is created to avoid autobind at runtime. Autobind can fail if the user does not have privilege, or if another application tries to autobind at the same time. ------------------------------------------------------------------------ 36.6 Chapter 4. Configuring CLI/ODBC and Running Sample Applications 36.6.1 Configuration Keywords Disregard the last paragraph in the CURRENTFUNCTIONPATH keyword. The correct information is as follows: This keyword is used as part of the process for resolving unqualified function and stored procedure references that may have been defined in a schema name other than the current user's schema. The order of the schema names determines the order in which the function and procedure names will be resolved. For more information on function and procedure resolution, refer to the SQL Reference. ------------------------------------------------------------------------ 36.7 Chapter 5. DB2 CLI Functions 36.7.1 SQLBindFileToParam - Bind LOB File Reference to LOB Parameter The last parameter - IndicatorValue - in the SQLBindFileToParam() CLI function is currently documented as "output (deferred)". It should be "input (deferred)". 36.7.2 SQLNextResult - Associate Next Result Set with Another Statement Handle The following text should be added to Chapter 5, "DB2 CLI Functions": 36.7.2.1 Purpose Specification: DB2 CLI 7.x 36.7.2.2 Syntax SQLRETURN SQLNextResult (SQLHSTMT StatementHandle1 SQLHSTMT StatementHandle2); 36.7.2.3 Function Arguments Table 25. SQLNextResult Arguments Data Type Argument Use Description SQLHSTMT StatementHandle input Statement handle. SQLHSTMT StatementHandle input Statement handle. 36.7.2.4 Usage A stored procedure returns multiple result sets by leaving one or more cursors open after exiting. The first result set is always accessed by using the statement handle that called the stored procedure. If multiple result sets are returned, either SQLMoreResults() or SQLNextResult() can be used to describe and fetch the result set. SQLMoreResults() is used to close the cursor for the first result set and allow the next result set to be processed, whereas SQLNextResult() moves the next result set to StatementHandle2, without closing the cursor on StatementHandle1. Both functions return SQL_NO_DATA_FOUND if there are no result sets to be fetched. Using SQLNextResult() allows result sets to be processed in any order once they have been transferred to other statement handles. Mixed calls to SQLMoreResults() and SQLNextResult() are allowed until there are no more cursors (open result sets) on StatementHandle1. When SQLNextResult() returns SQL_SUCCESS, the next result set is no longer associated with StatementHandle1. Instead, the next result set is associated with StatementHandle2, as if a call to SQLExecDirect() had just successfully executed a query on StatementHandle2. The cursor, therefore, can be described using SQLNumResultSets(), SQLDescribeCol(), or SQLColAttribute(). After SQLNextResult() has been called, the result set now associated with StatementHandle2 is removed from the chain of remaining result sets and cannot be used again in either SQLNextResult() or SQLMoreResults(). This means that for 'n' result sets, SQLNextResult() can be called successfully at most 'n-1' times. If SQLFreeStmt() is called with the SQL_CLOSE option, or SQLFreeHandle() is called with HandleType set to SQL_HANDLE_STMT, all pending result sets on this statement handle are discarded. SQLNextResult() returns SQL_ERROR if StatementHandle2 has an open cursor or StatementHandle1 and StatementHandle2 are not on the same connection. If any errors or warnings are returned, SQLError() must always be called on StatementHandle1. Notes: SQLMoreResults() also works with a parameterized query with an array of input parameter values specified with SQLParamOptions() and SQLBindParameter(). SQLNextResult(), however, does not support this. 36.7.2.5 Return Codes * SQL_SUCCESS * SQL_SUCCESS_WITH_INFO * SQL_STILL_EXECUTING * SQL_ERROR * SQL_INVALID_HANDLE * SQL_NO_DATA_FOUND 36.7.2.6 Diagnostics Table 26. SQLNextResult SQLSTATEs SQLSTATE Description Explanation 40003 Communication Link The communication link between the 08S01 failure. application and data source failed before the function completed. 58004 Unexpected system Unrecoverable system error. failure. HY001 Memory allocation DB2 CLI is unable to allocate the memory failure. required to support execution or completion of the function. HY010 Function sequence The function was called while in a error. data-at-execute (SQLParamData(), SQLPutData()) operation. StatementHandle2 has an open cursor associated with it. The function was called while within a BEGIN COMPOUND and END COMPOUND SQL operation. HY013 Unexpected memory DB2 CLI was unable to access the memory handling error. required to support execution or completion of the function. HYT00 Time-out expired. The time-out period expired before the data source returned the result set. Time-outs are only supported on non-multitasking systems such as Windows 3.1 and Macintosh System 7. The time-out period can be set using the SQL_ATTR_QUERY_TIMEOUT attribute for SQLSetConnectAttr(). 36.7.2.7 Restrictions Only SQLMoreResults() can be used for parameterized queries. 36.7.2.8 References * "SQLMoreResults - Determine If There Are More Result Sets" on page 535 * "Returning Result Sets from Stored Procedures" on page 120 ------------------------------------------------------------------------ 36.8 Appendix D. Extended Scalar Functions 36.8.1 Date and Time Functions The following functions are missing from the Date and Time Functions section of Appendix D "Extended Scalar Functions": DAYOFWEEK_ISO( date_exp ) Returns the day of the week in date_exp as an integer value in the range 1-7, where 1 represents Monday. Note the difference between this function and the DAYOFWEEK() function, where 1 represents Sunday. WEEK_ISO( date_exp ) Returns the week of the year in date_exp as an integer value in the range of 1-53. Week 1 is defined as the first week of the year to contain a Thursday. Therefore, Week1 is equivalent to the first week that contains Jan 4, since Monday is considered to be the first day of the week. Note that WEEK_ISO() differs from the current definition of WEEK(), which returns a value up to 54. For the WEEK() function, Week 1 is the week containing the first Saturday. This is equivalent to the week containing Jan. 1, even if the week contains only one day. DAYOFWEEK_ISO() and WEEK_ISO() are automatically available in a database created in Version 7. If a database was created prior to Version 7, these functions may not be available. To make DAYOFWEEK_ISO() and WEEK_ISO() functions available in such a database, use the db2updb system command. For more information about db2updb, see the "Command Reference" section in these Release Notes. ------------------------------------------------------------------------ 36.9 Appendix K. Using the DB2 CLI/ODBC/JDBC Trace Facility The sections within this appendix have been updated. See the "Traces" chapter in the Troubleshooting Guide for the most up-to-date information on this trace facility. ------------------------------------------------------------------------ 鬞昔囓楯銳 ------------------------------------------------------------------------ 37.1 灥隳鬞昔烈 SQLSTATE 祗腦 祺銻Bz齗戍養擋祗腦板霄鰗鬞昔烈 SQLSTATE 襏戍s戍 (詰鶔s戍) 祗腦耍 彀鬞 昔囓楯銳珫腮冀虪耶 礔繐雚祺銻Bz齗ず鬞昔耍巷彀鏼~鑶蛈孛R銻柰枵柰媴銻胃 db2 "? XXXnnnnn" 珫 XXX 鋅式鬞昔戍戠藃胚椴 nnnnn 鋅式鬞昔俄耶 蜙p胃db2 "? SQL30081" |ず腺 SQL30081 鬞昔戍祗腦耶 礔繐雚祺銻Bz齗ず SQLSTATE 戠耍巷彀鏼~鑶蛈孛R銻柰枵柰媴 銻胃 db2 "? XXXXX" 珫 XXXXX 鋅式 SQLSTATE 襏耶 蜙p胃db2 "? 428F1" |ず SQLSTATE 428F1 戍戠耶 ------------------------------------------------------------------------ 37.2 彀 DB2 Connect 鶔戍 SQLCODE 薿s杯 DB2 Connect 戍w] SQLCODE 薿s杯彀次劑 7.2 珫洄鶔耶▽Dq定廌 SQLCODE 襏 -567耍 DB2 Connect |彀廌 SQLCODE 襏 DB2 雚膼龢鶖e薿s杯 SQLCODE 襏 -551耶 ------------------------------------------------------------------------ 37.3 s戍烈鶔戍鬞昔 鄧柰媴戍板 DB2 鬞昔囓楯銳 次劑 7.1 鄧鶔戍鬞昔俄耶 彀媥 DB2 礔鞮 鼪搌o鬞昔戍珫柜屑耍 鞮醨|鼪搌鶔儘戍s鬞昔胚椷板耍o鬞昔|潲妄睦 鬞昔囓楯銳珫戍鬞耶 37.3.1 碰駒柳歃祊貘 (CLI) 鬞昔 CLI0645E CLI0646E CLI0647E 37.3.2 DB2 鬞昔 DB21086I DB210060E DB210061E DB210062E DB210113E DB210114E DB210115E DB210116E DB210117E DB210118E DB210120E DB210121E DB210200I DB210201I 37.3.3 DBI 鬞昔 DBI1172E DBI1793W DBI1794E DBI1795E DBI1796W DBI1797I 37.3.4 暖珫眃 (DWC) 鬞昔 DWC0000I DWC03504E DWC08900E DWC08901E DWC08902E DWC08903E DWC08904E DWC08907C DWC08908C DWC08909C DWC08910E DWC08911E DWC08912E DWC08913E DWC08914E DWC08915E DWC08917E DWC08919I DWC08930E DWC08931E DWC08932E DWC08933E DWC08934E DWC08935E DWC08936W DWC08937I DWC08938I DWC08939I DWC08940I DWC08941I DWC08960I DWC08961I DWC08962I DWC08963I DWC08964I DWC08965I DWC08966E DWC08967E DWC08968E DWC13239E DWC13300E DWC13301E DWC13302E DWC13304E DWC13603E DWC13700E DWC13701E DWC13702E DWC13703E DWC13705E DWC13706E DWC13707E 37.3.5 SQL 鬞昔 SQL0017N SQL0056N SQL0057N SQL0058N SQL0097N SQL0224N SQL0225N SQL0227N SQL0228N SQL0231W SQL0243N SQL0244N SQL0270N SQL0301N SQL0303N SQL0336N SQL0348N SQL0349N SQL0357N SQL0358N SQL0368N SQL0408N SQL0423N SQL0590N SQL0670N SQL0845N SQL0846N SQL1179W SQL1186N SQL1550N SQL1551N SQL1552N SQL1553N SQL1704N SQL2077W SQL2078N SQL2417N SQL2426N SQL2571N SQL2572N SQL2573N SQL2574N SQL2575N SQL2576N SQL4942N SQL5012N SQL6583N SQL20005N SQL20117N SQL20121N SQL20133N SQL20134N SQL20135N SQL20143N SQL20144N SQL20145N SQL20146N SQL20147N SQL20148N SQL20153N SQL21000N ------------------------------------------------------------------------ 37.4 鶔儘 SQLSTATES 式 27. 42630 SQLSTATE 詰 SQLCODE 彀殛蓁w霿板潲戍耶 42631 式搨澱鏺肄腺 SQL 戍 RETURN 闉z搨珫耶 42632 彀 SQL 詰妄珫澱鏺繐嗀 RETURN 闉z搨耶 428F2 彀 SQL 獛戍 RETURN 闉z搨珫澱鏺繐嗀鬷式搨耶 560B7 愫媴 INSERT 鉒限A臠柜媴戍 NEXTVAL 鐀式搨擋妄澱鏺虎嵥耶 ------------------------------------------------------------------------ SQL Reference(潲珫次) ------------------------------------------------------------------------ 38.1 SQL Reference is Provided in One PDF File The "Using the DB2 Library" appendix in each book indicates that the SQL Reference is available in PDF format as two separate volumes. This is incorrect. Although the printed book appears in two volumes, and the two corresponding form numbers are correct, there is only one PDF file, and it contains both volumes. The PDF file name is db2s0x70. ------------------------------------------------------------------------ 38.2 Chapter 3. Language Elements 38.2.1 Naming Conventions and Implicit Object Name Qualifications Add the following note to this section in Chapter 3: The following names, when used in the context of SQL Procedures, are restricted to the characters allowed in an ordinary identifier, even if the names are delimited: - condition-name - label - parameter-name - procedure-name - SQL-variable-name - statement-name 38.2.2 DATALINK Assignments A paragraph in this section has been changed to the following: Note that the size of a URL parameter or function result is the same on both input or output and is bound by the length of the DATALINK column. However, in some cases the URL value returned has an access token attached. In situations where this is possible, the output location must have sufficient storage space for the access token and the length of the DATALINK column. Hence, the actual length of the comment and URL in its fully expanded form provided on input should be restricted to accommodate the output storage space. If the restricted length is exceeded, this error is raised. 38.2.3 Expressions 38.2.3.1 Syntax Diagram The syntax diagram has changed: .-operator------------------------------. V | >>----+-----+---+-function--------------+--+------------------->< +- + -+ +-(expression)----------+ '- - -' +-constant--------------+ +-column-name-----------+ +-host-variable---------+ +-special-register------+ +-(scalar-fullselect)---+ +-labeled-duration------+ +-case-expression-------+ +-cast-specification----+ +-dereference-operation-+ +-OLAP-function---------+ +-method-invocation-----+ +-subtype-treatment-----+ '-sequence-reference----' operator (1) |---+-CONCAT------+---------------------------------------------| +- / ---------+ +- * ---------+ +- + ---------+ '- - ---------' Notes: 1. || may be used as a synonym for CONCAT. 38.2.3.2 OLAP Functions The following represents a correction to the "OLAP Functions" section under "Expressions" in Chapter 3. aggregation-function |--column-function--OVER---(--+------------------------------+--> '-| window-partition-clause |--' >----+--------------------------------------------------------------------+> '-| window-order-clause |--+--------------------------------------+--' '-| window-aggregation-group-clause |--' >---------------------------------------------------------------| window-order-clause .-,-------------------------------------------. V .-| asc option |---. | |---ORDER BY-----sort-key-expression--+------------------+--+---| '-| desc option |--' asc option .-NULLS LAST--. |---ASC--+-------------+----------------------------------------| '-NULLS FIRST-' desc option .-NULLS FIRST--. |---DESC--+--------------+--------------------------------------| '-NULLS LAST---' window-aggregation-group-clause |---+-ROWS--+---+-| group-start |---+---------------------------| '-RANGE-' +-| group-between |-+ '-| group-end |-----' group-end |---+-UNBOUNDED FOLLOWING-----------+---------------------------| '-unsigned-constant--FOLLOWING--' In the window-order-clause description: NULLS FIRST The window ordering considers null values before all non-null values in the sort order. NULLS LAST The window ordering considers null values after all non-null values in the sort order. In the window-aggregation-group-clause description: window-aggregation-group-clause The aggregation group of a row R is a set of rows, defined relative to R in the ordering of the rows of R's partition. This clause specifies the aggregation group. If this clause is not specified, the default is the same as RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW, providing a cumulative aggregation result. ROWS Indicates the aggregation group is defined by counting rows. RANGE Indicates the aggregation group is defined by an offset from a sort key. group-start Specifies the starting point for the aggregation group. The aggregation group end is the current row. Specification of the group-start clause is equivalent to a group-between clause of the form "BETWEEN group-start AND CURRENT ROW". group-between Specifies the aggregation group start and end based on either ROWS or RANGE. group-end Specifies the ending point for the aggregation group. The aggregation group start is the current row. Specification of the group-end clause is equivalent to a group-between clause of the form "BETWEEN CURRENT ROW AND group-end". UNBOUNDED PRECEDING Includes the entire partition preceding the current row. This can be specified with either ROWS or RANGE. Also, this can be specified with multiple sort-key-expressions in the window-order-clause. UNBOUNDED FOLLOWING Includes the entire partition following the current row. This can be specified with either ROWS or RANGE. Also, this can be specified with multiple sort-key-expressions in the window-order-clause. CURRENT ROW Specifies the start or end of the aggregation group based on the current row. If ROWS is specified, the current row is the aggregation group boundary. If RANGE is specified, the aggregation group boundary includes the set of rows with the same values for the sort-key-expressions as the current row. This clause cannot be specified in group-bound2 if group-bound1 specifies value FOLLOWING. value PRECEDING Specifies either the range or number of rows preceding the current row. If ROWS is specified, then value is a positive integer indicating a number of rows. If RANGE is specified, then the data type of value must be comparable to the type of the sort-key-expression of the window-order-clause. There can only be one sort-key-expression, and the data type of the sort-key-expression must allow subtraction. This clause cannot be specified in group-bound2 if group-bound1 is CURRENT ROW or value FOLLOWING. value FOLLOWING Specifies either the range or number of rows following the current row. If ROWS is specified, then value is a positive integer indicating a number of rows. If RANGE is specified, then the data type of value must be comparable to the type of the sort-key-expression of the window-order-clause. There can only be one sort-key-expression, and the data type of the sort-key-expression must allow addition. 38.2.3.3 Sequence Reference The following information should be added to the end of the Expressions section (after "Subtype Treatment"). sequence-reference |--+-| nextval-expression |-+-----------------------------------| '-| prevval-expression |-' nextval-expression |---NEXTVAL FOR--sequence-name----------------------------------| prevval-expression |---PREVVAL FOR--sequence-name----------------------------------| NEXTVAL FOR sequence-name A NEXTVAL expression returns the next value for the sequence specified by sequence-name. PREVVAL FOR sequence-name A PREVVAL expression returns the most recently generated value for the specified sequence for a previous statement within the current session. This value can be repeatedly referenced using PREVVAL expressions specifying the name of the sequence. There may be multiple instances of PREVVAL expressions specifying the same sequence name within a single statement and they all return the same value. A PREVVAL expression can only be used if a NEXTVAL expression specifying the same sequence name has already been referenced in the current user session (in the current or a previous transaction) (SQLSTATE 51035). Notes: o A new sequence number is generated when a NEXTVAL expression specifies the name of the sequence. However, if there are multiple instances of a NEXTVAL expression specifying the same sequence name within a query, the counter for the sequence is incremented only once for each row of the result. o The most recently generated value for a sequence can be repeatedly referenced using a PREVVAL expression specifying the name of the sequence. There may be multiple instances of a PREVVAL expression specifying the same sequence name within a single statement. o The same sequence number can be used as a unique key value in two separate tables by referencing the sequence number with a NEXTVAL expression for the first row (this generates the sequence value), and a PREVVAL expression for the other rows (this instance of PREVVAL refers to the sequence value generated by the NEXTVAL expression in the previous statement), as shown below: INSERT INTO order(orderno, custno) VALUES (NEXTVAL FOR order_seq, 123456); INSERT INTO line_item (orderno, partno, quantity) VALUES (PREVVAL FOR order_seq, 987654, 1); o Examples of where NEXTVAL and PREVVAL expressions can be specified are: + select-statement or SELECT INTO statement: within the select-clause as long as the statement does not contain a DISTINCT keyword, a GROUP BY clause, an ORDER BY clause, a UNION keyword, an INTERSECT keyword, or EXCEPT keyword + INSERT statement: within a VALUES clause + INSERT statement: within the select-clause of the fullselect + UPDATE statement: within the select-clause of the fullselect of an expression in the SET clause (either searched or positioned UPDATE statement) + VALUES INTO statement: within the select-clause of the fullselect of an expression o Examples of where NEXTVAL and PREVVAL expressions cannot be specified (SQLSTATE 428F9) are: + join condition of a full outer join + DEFAULT value for a column in a CREATE TABLE or ALTER TABLE statement + generated column definition in a CREATE TABLE or ALTER TABLE statement + condition of a CHECK constraint + CREATE TRIGGER statement + CREATE VIEW statement + CREATE METHOD statement + CREATE FUNCTION statement. o In addition, a NEXTVAL expression cannot be specified (SQLSTATE 428F9) in : + CASE expression + parameter list of an aggregate function + subquery + SELECT statement that contains a DISTINCT operator + join condition of join + GROUP BY clause of a SELECT statement + SELECT statement that is combined with another SELECT statement using the UNION, INTERSECT, or EXCEPT set operator + nested table expression + parameter list of a table function + WHERE clause of a SELECT, DELETE, or UPDATE statement + ORDER BY clause + parameter list of a CALL statement. o When a value is generated for a sequence, that value is consumed, and the next time that a value is needed, a new value will be generated. This is true even when the statement containing the NEXTVAL expression fails. o If an INSERT statement includes a NEXTVAL expression in the VALUES list for the column, and if some error occurs at some point during the execution of the INSERT (it could be a problem in generating the next sequence value, or a problem with the value for another column), then an insertion failure occurs, and the value generated for the sequence is considered to be consumed. In some cases, reissuing the same INSERT statement might lead to success. For example, consider an error that is the result of the existence of a unique index for the column for which NEXTVAL was used and the sequence value generated already exists in the index. It is possible that the next value generated for the sequence is a value that does not exist in the index and so the subsequent INSERT would succeed. o If in generating a value for a sequence, the maximum value for the sequence is exceeded (or the minimum value for a descending sequence) and cycles are not permitted, then an error occurs (SQLSTATE 23522). In this case, the user could ALTER the sequence to extend the range of acceptable values, or enable cycles for the sequence, or DROP and CREATE a new sequence with a different data type that has a larger range of values. For example, a sequence may have been defined with a data type of SMALLINT, and eventually the sequence runs out of assignable values. To redefine the sequence as INTEGER, you would need to drop and recreate the sequence with the new definition. o A reference to PREVVAL in a select statement of a cursor refers to a value that was generated for the specified sequence prior to the opening of the cursor. However, closing the cursor can affect the values returned by PREVVAL for the specified sequence in subsequent statements, or even for the same statement in the event that the cursor is reopened. This would be the case when the select statement of the cursor included a reference to NEXTVAL for the same sequence name. Examples: These examples assume that there is a table called "order" and that a sequence called "order_seq" is created as follows: CREATE SEQUENCE order_seq START WITH 1 INCREMENT BY 1 NOMAXVALUE NOCYCLE CACHE 24 * Some examples of how to generate an "order_seq" sequence number with a NEXTVAL expression for the sequence created above: INSERT INTO order(orderno, custno) VALUES (NEXTVAL FOR order_seq, 123456); or, UPDATE order SET orderno = NEXTVAL FOR order_seq WHERE custno = 123456; or, VALUES NEXTVAL FOR order_seq INTO :hv_seq; ------------------------------------------------------------------------ 38.3 Chapter 4. Functions 38.3.1 Enabling the New Functions and Procedures Version 7 FixPaks deliver new SQL built-in scalar functions. Refer to the SQL Reference updates for a description of these new functions. The new functions are not automatically enabled on each database when the database server code is upgraded to the new service level. To enable these new functions, the system administrator must issue the command db2updv7, specifying each database at the server. This command makes an entry in the database that ensures that database objects created prior to executing this command use existing function signatures that may match the new function signatures. For information on enabling the MQSeries functions (those defined in the MQDB2 schema), see MQSeries. 38.3.2 Scalar Functions 38.3.2.1 ABS or ABSVAL >>-+-ABS----+--(expression)------------------------------------>< '-ABSVAL-' The schema is SYSIBM. This function was first available in FixPak 2 of Version 7.1. Notes: The SYSFUN version of the ABS (or ABSVAL) function continues to be available. Returns the absolute value of the argument. The argument is an expression that returns a value of any built-in numeric data type. The result of the function has the same data type and length attribute as the argument. If the argument can be null or the database is configured with DFT_SQLMATHWARN set to yes, then the result can be null; if the argument is null, the result is the null value. For example: ABS(-51234) returns an INTEGER with a value of 51234. 38.3.2.2 DECRYPT_BIN and DECRYPT_CHAR >>-+-DECRYPT_BIN--+---------------------------------------------> '-DECRYPT_CHAR-' >----(--encrypted-data--+--------------------------------+---)-->< '-,--password-string-expression--' The schema is SYSIBM. This function was first available in FixPak 3 of Version 7.1. The DECRYPT_BIN and DECRYPT_CHAR functions return a value that is the result of decrypting encrypted-data. The password used for decryption is either the password-string-expression value or the ENCRYPTION PASSWORD value (as assigned using the SET ENCRYPTION PASSWORD statement). The DECRYPT_BIN and DECRYPT_CHAR functions can only decrypt values that were encrypted using the ENCRYPT function (SQLSTATE 428FE). encrypted-data An expression that returns a CHAR FOR BIT DATA or VARCHAR FOR BIT DATA value that is a complete, encrypted data string that was encrypted using the ENCRYPT function. password-string-expression An expression that returns a CHAR or VARCHAR value with at least 6 bytes and no more than 127 bytes (SQLSTATE 428FC). This should be the same password used to encrypt the data or decryption will result in an error (SQLSTATE 428FD). If the value of the password argument is null or not provided, the data will be decrypted using the ENCRYPTION PASSWORD value, which must have been set for the session (SQLSTATE 51039). The result of the DECRYPT_BIN function is VARCHAR FOR BIT DATA. The result of the DECRYPT_CHAR function is VARCHAR. If the encrypted-data included a hint, the hint is not returned by the function. The length attribute of the result is the length attribute of the data type of encrypted-data minus 8 bytes. The actual length of the value returned by the function will match the length of the original string that was encrypted. If the encrypted-data includes bytes beyond the encrypted string, these bytes are not returned by the function. If the first argument can be null, the result can be null; if the first argument is null, the result is the null value. If the data is decrypted on a different system using a code page other than the code page in which the encryption took place, it is possible that expansion may occur when converting the decrypted value to the database code page. In such situations, the encrypted-data value should be cast to a VARCHAR string with a larger number of bytes. Also see 38.3.2.3, ENCRYPT and 38.3.2.4, GETHINT for additional information on using this function. Examples: Example 1: This example uses the ENCRYPTION PASSWORD value to hold the encryption password. SET ENCRYPTION PASSWORD = 'Ben123'; INSERT INTO EMP (SSN) VALUES ENCRYPT('289-46-8832'); SELECT DECRYPT_CHAR(SSN) FROM SSN; The value returned is '289-46-8832'. Example 2: This example explicitly passes the encryption password. SELECT DECRYPT_CHAR(SSN,'Ben123') FROM SSN; The value returned is '289-46-8832'. 38.3.2.3 ENCRYPT >>-ENCRYPT------------------------------------------------------> >----(--data-string-expression--+----------------------------------------------------------------+---)-> '-,--password-string-expression--+----------------------------+--' '-,--hint-string-expression--' >-------------------------------------------------------------->< The schema is SYSIBM. This function was first available in FixPak 3 of Version 7.1. The ENCRYPT function returns a value that is the result of encrypting data-string-expression. The password used for encryption is either the password-string-expression value or the ENCRYPTION PASSWORD value (as assigned using the SET ENCRYPTION PASSWORD statement). data-string-expression An expression that returns a CHAR or VARCHAR value to be encrypted. The length attribute for the data type of data-string-expression is limited to 32663 without a hint-string-expression argument and 32631 when the hint-string-expression argument is specified (SQLSTATE 42815). password-string-expression An expression that returns a CHAR or VARCHAR value with at least 6 bytes and no more than 127 bytes (SQLSTATE 428FC). The value represents the password used to encrypt the data-string-expression. If the value of the password argument is null or not provided, the data will be encrypted using the ENCRYPTION PASSWORD value, which must have been set for the session (SQLSTATE 51039). hint-string-expression An expression that returns a CHAR or VARCHAR value up to 32 bytes that will help data owners remember passwords (for example, 'Ocean' as a hint to remember 'Pacific'). If a hint value is given, the hint is embedded into the result and can be retrieved using the GETHINT function. If this argument is null or not provided, no hint will be embedded in the result. The result data type of the function is VARCHAR FOR BIT DATA. The length attribute of the result is: * When the optional hint parameter is specified, the length attribute of the non-encrypted data + 8 bytes + the number of bytes to the next 8 byte boundary + 32 bytes for the hint length. * With no hint parameter, the length attribute of the non-encrypted data + 8 bytes + the number of bytes to the next 8 byte boundary. If the first argument can be null, the result can be null; if the first argument is null, the result is the null value. Notice that the encrypted result is longer than the data-string-expression value. Therefore, when assigning encrypted values, ensure that the target is declared with sufficient size to contain the entire encrypted value. Notes: * Encryption Algorithm: The internal encryption algorithm used is RC2 block cipher with padding, the 128-bit secret key is derived from the password using a MD2 message digest. * Encryption Passwords and Data: It is the user's responsibility to perform password management. Once the data is encrypted only the password used to encrypt it can be used to decrypt it (SQLSTATE 428FD). Be careful when using CHAR variables to set password values as they may be padded with blanks. The encrypted result may contain null terminator and other non-printable characters. * Table Column Definition: When defining columns and types to contain encrypted data always calculate the length attribute as follows. For encrypted data with no hint: Maximum length of the non-encrypted data + 8 bytes + the number of bytes to the next 8 byte boundary = encrypted data column length. For encrypted data with embedded hint : Maximum length of the non-encrypted data + 8 bytes + the number of bytes to the next 8 byte boundary + 32 bytes for the hint length = encrypted data column length. Any assignment or cast to a length shorter than the suggested data length may result in failed decryption in the future and lost data. Blanks are valid encrypted data values that may be truncated when stored in a column that is too short. Sample Column Length Calculations Maximum length of non-encrypted data 6 bytes 8 bytes 8 bytes Number of bytes to the next 8 byte boundary 2 bytes --------- Encrypted data column length 16 bytes Maximum length of non-encrypted data 32 bytes 8 bytes 8 bytes Number of bytes to the next 8 byte boundary 8 bytes --------- Encrypted data column length 48 bytes * Administration of encrypted data: Encrypted data can only be decrypted on servers that support the decryption functions that correspond to the ENCRYPT function. Hence, replication of columns with encrypted data should only be done to servers that support the DECRYPT_BIN or DECRYPT_CHAR function. Also see 38.3.2.2, DECRYPT_BIN and DECRYPT_CHAR and 38.3.2.4, GETHINT for additional information on using this function. Examples: Example 1: This example uses the ENCRYPTION PASSWORD value to hold the encryption password. SET ENCRYPTION PASSWORD = 'Ben123'; INSERT INTO EMP (SSN) VALUES ENCRYPT('289-46-8832'); Example 2: This example explicitly passes the encryption password. INSERT INTO EMP (SSN) VALUES ENCRYPT('289-46-8832','Ben123',''); Example 3: The hint 'Ocean' is stored to help the user remember the encryption password of 'Pacific'. INSERT INTO EMP (SSN) VALUES ENCRYPT('289-46-8832','Pacific','Ocean'); 38.3.2.4 GETHINT >>-GETHINT--(--encrypted-data--)------------------------------->< The schema is SYSIBM. This function was first available in FixPak 3 of Version 7.1. The GETHINT function will return the password hint if one is found in the encrypted-data. A password hint is a phrase that will help data owners remember passwords (For example, 'Ocean' as a hint to remember 'Pacific'). encrypted-data An expression that returns a CHAR FOR BIT DATA or VARCHAR FOR BIT DATA value that is a complete, encrypted data string that was encrypted using the ENCRYPT function (SQLSTATE 428FE). The result of the function is VARCHAR(32). The result can be null; if the hint parameter was not added to the encrypted-data by the ENCRYPT function or the first argument is null, the result is the null value. Also see 38.3.2.2, DECRYPT_BIN and DECRYPT_CHAR and 38.3.2.3, ENCRYPT for additional information on using this function. Example: In this example the hint 'Ocean' is stored to help the user remember the encryption password 'Pacific'. INSERT INTO EMP (SSN) VALUES ENCRYPT('289-46-8832', 'Pacific','Ocean'); SELECT GETHINT(SSN) FROM EMP; The value returned is 'Ocean'. 38.3.2.5 IDENTITY_VAL_LOCAL >>-IDENTITY_VAL_LOCAL--(--)------------------------------------>< The schema is SYSIBM. This procedure was first available in FixPak 3 of Version 7.1. The IDENTITY_VAL_LOCAL function is a non-deterministic function that returns the most recently assigned value for an identity column, where the assignment occurred as a result of a single row INSERT statement using a VALUES clause. The function has no input parameters. The result is a DECIMAL(31,0), regardless of the actual data type of the corresponding identity column. The value returned by the function is the value assigned to the identity column of the table identified in the most recent single row INSERT statement. The INSERT statement must be made using a VALUES clause on a table containing an identity column. Also, the INSERT statement must be issued at the same level 1 (that is, the value is available locally at the level it was assigned, until it is replaced by the next assigned value). The assigned value is either a value supplied by the user (if the identity column is defined as GENERATED BY DEFAULT), or an identity value generated by DB2. The function returns a null value in the following situations: * When a single row INSERT statement with a VALUES clause has not been issued at the current processing level for a table containing an identity column. * When a COMMIT or ROLLBACK of a unit of work has occurred since the most recent INSERT statement that assigned a value 2 . The result of the function is not affected by the following: * A single row INSERT statement with a VALUES clause for a table without an identity column. * A multiple row INSERT statement with a VALUES clause. * An INSERT statement with a fullselect. * A ROLLBACK TO SAVEPOINT statement. Notes: * Expressions in the VALUES clause of an INSERT statement are evaluated prior to the assignments for the target columns of the INSERT statement. Thus, an invocation of an IDENTITY_VAL_LOCAL function inside the VALUES clause of an INSERT statement will use the most recently assigned value for an identity column from a previous INSERT statement. The function returns the null value if no previous single row INSERT statement with a VALUES clause for a table containing an identity column has been executed within the same level as the IDENTITY_VAL_LOCAL function. * The identity column value of the table for which the trigger is defined can be determined within a trigger, by referencing the trigger transition variable for the identity column. * The result of invoking the IDENTITY_VAL_LOCAL function from within the trigger condition of an insert trigger is a null value. * It is possible that multiple before or after insert triggers exist for a table. In this case each trigger is processed separately, and identity values assigned by one triggered action are not available to other triggered actions using the IDENTITY_VAL_LOCAL function. This is true even though the multiple triggered actions are conceptually defined at the same level. * It is not generally recommended to use the IDENTITY_VAL_LOCAL function in the body of a before insert trigger. The result of invoking the IDENTITY_VAL_LOCAL function from within the triggered action of a before insert trigger is the null value. The value for the identity column of the table for which the trigger is defined cannot be obtained by invoking the IDENTITY_VAL_LOCAL function within the triggered action of a before insert trigger. However, the value for the identity column can be obtained in the triggered action, by referencing the trigger transition variable for the identity column. * The result of invoking the IDENTITY_VAL_LOCAL function from within the triggered action of an after insert trigger 3 is the value assigned to an identity column of the table identified in the most recent single row INSERT statement invoked in the same triggered action that had a VALUES clause for a table containing an identity column. If a single row INSERT statement with a VALUES clause for a table containing an identity column was not executed within the same triggered action, prior to the invocation of the IDENTITY_VAL_LOCAL function, then the function returns a null value. * Since the results of the IDENTITY_VAL_LOCAL function are not deterministic, the result of an invocation of the IDENTITY_VAL_LOCAL function within the SELECT statement of a cursor can vary for each FETCH statement. * The assigned value is the value actually assigned to the identity column (that is, the value that would be returned on a subsequent SELECT statement). This value is not necessarily the value provided in the VALUES clause of the INSERT statement, or a value generated by DB2. The assigned value could be a value specified in a SET transition variable statement, within the body of a before insert trigger, for a trigger transition variable associated with the identity column. * The value returned by the function is unpredictable following a failed single row INSERT with a VALUES clause into a table with an identity column. The value may be the value that would have been returned from the function had it been invoked prior to the failed INSERT, or it may be the value that would have been assigned had the INSERT succeeded. The actual value returned depends on the point of failure and is therefore unpredictable. Examples: Example 1: Set the variable IVAR to the value assigned to the identity column in the EMPLOYEE table. If this insert is the first into the EMPLOYEE table, then IVAR would have a value of 1. CREATE TABLE EMPLOYEE (EMPNO INTEGER GENERATED ALWAYS AS IDENTITY, NAME CHAR(30), SALARY DECIMAL(5,2), DEPTNO SMALLINT) Example 2: An IDENTITY_VAL_LOCAL function invoked in an INSERT statement returns the value associated with the previous single row INSERT statement, with a VALUES clause for a table with an identity column. Assume for this example that there are two tables, T1 and T2. Both T1 and T2 have an identity column named C1. DB2 generates values in sequence, starting with 1, for the C1 column in table T1, and values in sequence, starting with 10, for the C1 column in table T2. CREATE TABLE T1 (C1 INTEGER GENERATED ALWAYS AS IDENTITY, C2 INTEGER), CREATE TABLE T2 (C1 DECIMAL(15,0) GENERATED BY DEFAULT AS IDENTITY (START WITH 10), C2 INTEGER), INSERT INTO T1 (C2) VALUES (5), INSERT INTO T1 (C2) VALUES (6), SELECT * FROM T1 which gives a result of: C1 C2 ----------- ---------- 1 5 2 6 and now, declaring the function for the variable IVAR: VALUES IDENTITY_VAL_LOCAL() INTO :IVAR At this point, the IDENTITY_VAL_LOCAL function would return a value of 2 in IVAR, because that was the value most recently assigned by DB2. The following INSERT statement inserts a single row into T2, where column C2 gets a value of 2 from the IDENTITY_VAL_LOCAL function. INSERT INTO T2 (C2) VALUES (IDENTITY_VAL_LOCAL()); SELECT * FROM T2 WHERE C1 = DECIMAL(IDENTITY_VAL_LOCAL(),15,0) returning a result of: C1 C2 ----------------- ---------- 10. 2 Invoking the IDENTITY_VAL_LOCAL function after this insert results in a value of 10, which is the value generated by DB2 for column C1 of T2. In a nested environment involving a trigger, use the IDENTITY_VAL_LOCAL function to retrieve the identity value assigned at a particular level, even though there might have been identity values assigned at lower levels. Assume that there are three tables, EMPLOYEE, EMP_ACT, and ACCT_LOG. There is an after insert trigger defined on EMPLOYEE that results in additional inserts into the EMP_ACT and ACCT_LOG tables. CREATE TABLE EMPLOYEE (EMPNO SMALLINT GENERATED ALWAYS AS IDENTITY (START WITH 1000), NAME CHAR(30), SALARY DECIMAL(5,2), DEPTNO SMALLINT); CREATE TABLE EMP_ACT (ACNT_NUM SMALLINT GENERATED ALWAYS AS IDENTITY (START WITH 1), EMPNO SMALLINT); CREATE TABLE ACCT_LOG (ID SMALLINT GENERATED ALWAYS AS IDENTITY (START WITH 100), ACNT_NUM SMALLINT, EMPNO SMALLINT); CREATE TRIGGER NEW_HIRE AFTER INSERT ON EMPLOYEE REFERENCING NEW AS NEW_EMP FOR EACH ROW MODE DB2SQL BEGIN ATOMIC INSERT INTO EMP_ACT (EMPNO) VALUES (NEW_EMP.EMPNO); INSERT INTO ACCT_LOG (ACNT_NUM EMPNO) VALUES (IDENTITY_VAL_LOCAL(), NEW_EMP.EMPNO); END The first triggered INSERT statement inserts a row into the EMP_ACT table. This INSERT statement uses a trigger transition variable for the EMPNO column of the EMPLOYEE table, to indicate that the identity value for the EMPNO column of the EMPLOYEE table is to be copied to the EMPNO column of the EMP_ACT table. The IDENTITY_VAL_LOCAL function could not be used to obtain the value assigned to the EMPNO column of the EMPLOYEE table. This is because an INSERT statement has not been issued at this level of the nesting, and as such, if the IDENTITY_VAL_LOCAL function were invoked in the VALUES clause of the INSERT for EMP_ACT, then it would return a null value. This INSERT statement for the EMP_ACT table also results in the generation of a new identity column value for the ACNT_NUM column. A second triggered INSERT statement inserts a row into the ACCT_LOG table. This statement invokes the IDENTITY_VAL_LOCAL function to indicate that the identity value assigned to the ACNT_NUM column of the EMP_ACT table in the previous INSERT statement in the triggered action is to be copied to the ACNT_NUM column of the ACCT_LOG table. The EMPNO column is assigned the same value as the EMPNO column of EMPLOYEE table. From the invoking application (that is, the level at which the INSERT to EMPLOYEE is issued), set the variable IVAR to the value assigned to the EMPNO column of the EMPLOYEE table by the original INSERT statement. INSERT INTO EMPLOYEE (NAME, SALARY, DEPTNO) VALUES ('Rupert', 989.99, 50); The contents of the three tables after processing the original INSERT statement and all of the triggered actions are: SELECT EMPNO, SUBSTR(NAME,10) AS NAME, SALARY, DEPTNO FROM EMPLOYEE; EMPNO NAME SALARY DEPTNO ----------- ----------- ---------------------------------- ----------- 1000 Rupert 989.99 50 SELECT ACNT_NUM, EMPNO FROM EMP_ACT; ACNT_NUM EMPNO ----------- ----------- 1 1000 SELECT * FROM ACCT_LOG; ID ACNT_NUM EMPNO ----------- ----------- ----------- 100 1 1000 The result of the IDENTITY_VAL_LOCAL function is the most recently assigned value for an identity column at the same nesting level. After processing the original INSERT statement and all of the triggered actions, the IDENTITY_VAL_LOCAL function returns a value of 1000, because this is the value assigned to the EMPNO column of the EMPLOYEE table. The following VALUES statement results in setting IVAR to 1000. The insert into the EMP_ACT table (which occurred after the insert into the EMPLOYEE table and at a lower nesting level) has no affect on what is returned by this invocation of the IDENTITY_VAL_LOCAL function. VALUES IDENTITY_VAL_LOCAL() INTO :IVAR; 38.3.2.6 LCASE and UCASE (Unicode) In a Unicode database, the entire repertoire of Unicode characters is uppercase (or lowercase) based on the Unicode properties of these characters. Double-wide versions of ASCII characters, as well as Roman numerals, now convert to upper or lower case correctly. 38.3.2.7 MQPUBLISH >>-MQPUBLISH---(------------------------------------------------> >-----+-----------------------------------------------+---------> '-publisher-service--,--+--------------------+--' '-service-policy--,--' >----msg-data----+-----------------------------------+--)------>< '-,--topic--+--------------------+--' | (1) | '-,--correl-id-------' Notes: 1. The correl-id cannot be specified unless a service and a policy are previously defined. The schema is MQDB2. The MQPUBLISH function publishes data to MQSeries. This function requires the installation of either MQSeries Publish/Subscribe or MQSeries Integrator. Please consult www.ibm.com/software/MQSeries for further details. The MQPUBLISH function publishes the data contained in msg-data to the MQSeries publisher specified in publisher-service, and using the quality of service policy defined by service-policy. An optional topic for the message can be specified, and an optional user-defined message correlation identifier may also be specified. The function returns a value of '1' if successful or a '0' if unsuccessful. publisher-service A string containing the logical MQSeries destination where the message is to be sent. If specified, the publisher-service must refer to a publisher Service Point defined in the AMT.XML repository file. A service point is a logical end-point from which a message is sent or received. Service point definitions include the name of the MQSeries Queue Manager and Queue. See the MQSeries Application Messaging Interface for further details. If publisher-service is not specified, then the DB2.DEFAULT.PUBLISHER will be used. The maximum size of publisher-service is 48 characters. service-policy A string containing the MQSeries AMI Service Policy to be used in handling of this message. If specified, the service-policy must refer to a Policy defined in the AMT.XML repository file. A Service Policy defines a set of quality of service options that should be applied to this messaging operation. These options include message priority and message persistence. See the MQSeries Application Messaging Interface manual for further details. If service-policy is not specified, then the default DB2.DEFAULT.POLICY will be used. The maximum size of service-policy is 48 characters. msg-data A string expression containing the data to be sent via MQSeries. The maximum size is 4000 characters. topic A string expression containing the topic for the message publication. If no topic is specified, none will be associated with the message. The maximum size of topic is 40 characters. Multiple topics can be specified in one string (up to 40 characters long). Each topic must be separated by a colon. For example, "t1:t2:the third topic" indicates that the message is associated with all three topics: t1, t2, and "the third topic". correl-id An optional string expression containing a correlation identifier to be associated with this message. The correl-id is often specified in request and reply scenarios to associate requests with replies. If not specified, no correlation id will be added to the message. The maximum size of correl-id is 24 characters. Examples Example 1: This example publishes the string "Testing 123" to the default publisher service (DB2.DEFAULT.PUBLISHER) using the default policy (DB2.DEFAULT.POLICY). No correlation identifier or topic is specified for the message. VALUES MQPUBLISH('Testing 123') Example 2: This example publishes the string "Testing 345" to the publisher service "MYPUBLISHER" under the topic "TESTS". The default policy is used and no correlation identifier is specified. VALUES MQPUBLISH('MYPUBLISHER','Testing 345', 'TESTS') Example 3: This example publishes the string "Testing 678" to the publisher service "MYPUBLISHER" using the policy "MYPOLICY" with a correlation identifier of "TEST1". The message is published with topic "TESTS". VALUES MQPUBLISH('MYPUBLISHER','MYPOLICY','Testing 678','TESTS','TEST1') Example 4: This example publishes the string "Testing 901" to the publisher service "MYPUBLISHER" under the topic "TESTS" using the default policy (DB2.DEFAULT.POLICY) and no correlation identifier. VALUES MQPUBLISH('Testing 901','TESTS') All examples return the value '1' if successful. 38.3.2.8 MQREAD >>-MQREAD---(----+------------------------------------------+---> '-receive-service--+--------------------+--' '-,--service-policy--' >----)--------------------------------------------------------->< The schema is MQDB2. The MQREAD function returns a message from the MQSeries location specified by receive-service, using the quality of service policy defined in service-policy. Executing this operation does not remove the message from the queue associated with receive-service, but instead returns the message at the head of the queue. The return value is a VARCHAR(4000) containing the message. If no messages are available to be returned, a NULL is returned. receive-service A string containing the logical MQSeries destination from where the message is to be received. If specified, the receive-service must refer to a Service Point defined in the AMT.XML repository file. A service point is a logical end-point from where a message is sent or received. Service points definitions include the name of the MQSeries Queue Manager and Queue. See the MQSeries Application Messaging Interface for further details. If receive-service is not specified, then the DB2.DEFAULT.SERVICE will be used. The maximum size of receive-service is 48 characters. service-policy A string containing the MQSeries AMI Service Policy used in handling this message. If specified, the service-policy must refer to a Policy defined in the AMT.XML repository file. A Service Policy defines a set of quality of service options that should be applied to this messaging operation. These options include message priority and message persistence. See the MQSeries Application Messaging Interface manual for further details. If service-policy is not specified, then the default DB2.DEFAULT.POLICY will be used. The maximum size of service-policy is 48 characters. Examples: Example 1: This example reads the message at the head of the queue specified by the default service (DB2.DEFAULT.SERVICE), using the default policy (DB2.DEFAULT.POLICY). VALUES MQREAD() Example 2: This example reads the message at the head of the queue specified by the service "MYSERVICE" using the default policy (DB2.DEFAULT.POLICY). VALUES MQREAD('MYSERVICE') Example 3: This example reads the message at the head of the queue specified by the service "MYSERVICE", and using the policy "MYPOLICY". VALUES MQREAD('MYSERVICE','MYPOLICY') All of these examples return the contents of the message as a VARCHAR(4000) if successful. If no messages are available, then a NULL is returned. 38.3.2.9 MQRECEIVE >>-MQRECEIVE----------------------------------------------------> >----(--+-------------------------------------------------------------+---)-> '-receive-service--+---------------------------------------+--' '-,--service-policy--+---------------+--' '-,--correl-id--' >-------------------------------------------------------------->< The schema is MQDB2. The MQRECEIVE function returns a message from the MQSeries location specified by receive-service, using the quality of service policy service-policy. Performing this operation removes the message from the queue associated with receive-service. If the correl-id is specified, then the first message with a matching correlation identifier will be returned. If correl-id is not specified, then the message at the head of the queue will be returned. The return value is a VARCHAR(4000) containing the message. If no messages are available to be returned, a NULL is returned. receive-service A string containing the logical MQSeries destination from which the message is received. If specified, the receive-service must refer to a Service Point defined in the AMT.XML repository file. A service point is a logical end-point from which a message is sent or received. Service points definitions include the name of the MQSeries Queue Manager and Queue. See the MQSeries Application Messaging Interface for further details. If receive-service is not specified, then the DB2.DEFAULT.SERVICE is used. The maximum size of receive-service is 48 characters. service-policy A string containing the MQSeries AMI Service Policy to be used in the handling of this message. If specified, the service-policy must refer to a Policy defined in the AMT XML repository file 4 . If service-policy is not specified, then the default DB2.DEFAULT.POLICY is used. The maximum size of service-policy is 48 characters. correl-id A string containing an optional correlation identifier to be associated with this message. The correl-id is often specified in request and reply scenarios to associate requests with replies. If not specified, no correlation id will be specified. The maximum size of correl-id is 24 characters. Examples: Example 1: This example receives the message at the head of the queue specified by the default service (DB2.DEFAULT.SERVICE), using the default policy (DB2.DEFAULT.POLICY). VALUES MQRECEIVE() Example 2: This example receives the message at the head of the queue specified by the service "MYSERVICE" using the default policy (DB2.DEFAULT.POLICY). VALUES MQRECEIVE('MYSERVICE') Example 3: This example receives the message at the head of the queue specified by the service "MYSERVICE" using the policy "MYPOLICY". VALUES MQRECEIVE('MYSERVICE','MYPOLICY') Example 4: This example receives the first message with a correlation id that matches '1234' from the head of the queue specified by the service "MYSERVICE" using the policy "MYPOLICY". VALUES MQRECEIVE('MYSERVICE',MYPOLICY','1234') All these examples return the contents of the message as a VARCHAR(4000) if successful. If no messages are available, a NULL will be returned. 38.3.2.10 MQSEND >>-MQSEND---(----+------------------------------------------+---> '-send-service--,--+--------------------+--' '-service-policy--,--' >----msg-data----+--------------------+--)--------------------->< | (1) | '-,--correl-id-------' Notes: 1. The correl-id cannot be specified unless a service and a policy are previously defined. The schema is MQDB2. The MQSEND function sends the data contained in msg-data to the MQSeries location specified by send-service, using the quality of service policy defined by service-policy. An optional user defined message correlation identifier may be specified by correl-id. The function returns a value of '1' if successful or a '0' if unsuccessful. msg-data A string expression containing the data to be sent via MQSeries. The maximum size is 4000 characters. send-service A string containing the logical MQSeries destination where the message is to be sent. If specified, the send-service refers to a service point defined in the AMT.XML repository file. A service point is a logical end-point from which a message may be sent or received. Service point definitions include the name of the MQSeries Queue Manager and Queue. See the MQSeries Application Messaging Interface manual for further details. If send-service is not specified, then the value of DB2.DEFAULT.SERVICE is used. The maximum size of send-service is 48 characters. service-policy A string containing the MQSeries AMI Service Policy used in handling of this message. If specified, the service-policy must refer to a service policy defined in the AMT XML repository file. A Service Policy defines a set of quality of service options that should be applied to this messaging operation. These options include message priority and message persistence. See the MQSeries Application Messaging Interface manual for further details. If service-policy is not specified, then a default value of DB2.DEFAULT.POLICY will be used. The maximum size of service-policy is 48 characters. correl-id An optional string containing a correlation identifier associated with this message. The correl-id is often specified in request and reply scenarios to associate requests with replies. If not specified, no correlation id will be sent. The maximum size of correl-id is 24 characters. Examples: Example 1: This example sends the string "Testing 123" to the default service (DB2.DEFAULT.SERVICE), using the default policy (DB2.DEFAULT.POLICY), with no correlation identifier. VALUES MQSEND('Testing 123') Example 2: This example sends the string "Testing 345" to the service "MYSERVICE", using the policy "MYPOLICY", with no correlation identifier. VALUES MQSEND('MYSERVICE','MYPOLICY','Testing 345') Example 3: This example sends the string "Testing 678" to the service "MYSERVICE", using the policy "MYPOLICY", with correllation identifier "TEST3". VALUES MQSEND('MYSERVICE','MYPOLICY','Testing 678','TEST3') Example 4: This example sends the string "Testing 901" to the service "MYSERVICE", using the default policy (DB2.DEFAULT.POLICY), and no correlation identifier. VALUES MQSEND('MYSERVICE','Testing 901') All examples return a scalar value of '1' if successful. 38.3.2.11 MQSUBSCRIBE >>-MQSUBSCRIBE---(----------------------------------------------> >-----+------------------------------------------------+--------> '-subscriber-service--,--+--------------------+--' '-service-policy--,--' >----topic---)------------------------------------------------->< The schema is MQDB2. The MQSUBSCRIBE function is used to register interest in MQSeries messages published on a specified topic. The subscriber-service specifies a logical destination for messages that match the specified topic. Messages that match topic will be placed on the queue defined by subscriber-service and can be read or received through a subsequent call to MQREAD, MQRECEIVE, MQREADALL, or MQRECEIVEALL. This function requires the installation and configuration of an MQSeries based publish and subscribe system, such as MQSeries Integrator or MQSeries Publish/Subscribe. See www.ibm.com/software/MQSeries for further details. The function returns a value of '1' if successful or a '0' if unsuccessful. Successfully executing this function will cause the publish and subscribe server to forward messages matching the topic to the service point defined by subscriber-service. subscriber-service A string containing the logical MQSeries subscription point to where messages matching topic will be sent. If specified, the subscriber-service must refer to a Subscribers Service Point defined in the AMT.XML repository file. Service points definitions include the name of the MQSeries Queue Manager and Queue. See the MQSeries Application Messaging Interface manual for further details. If subscriber-service is not specified, then the DB2.DEFAULT.SUBSCRIBER will be used instead. The maximum size of subscriber-service is 48 characters. service-policy A string containing the MQSeries AMI Service Policy to be used in handling the message. If specified, the service-policy must refer to a Policy defined in the AMT.XML repository file. A Service Policy defines a set of quality of service options to be applied to this messaging operation. These options include message priority and message persistence. See the MQSeries Application Messaging Interface manual for further details. If service-policy is not specified, then the default DB2.DEFAULT.POLICY will be used instead. The maximum size of service-policy is 48 characters. topic A string defining the types of messages to receive. Only messages published with the specified topics will be received by this subscription. Multiple subscriptions may coexist. The maximum size of topic is 40 characters. Multiple topics can be specified in one string (up to 40 characters long). Each topic must be separated by a colon. For example, "t1:t2:the third topic" indicates that the message is associated with all three topics: t1, t2, and "the third topic". Examples: Example 1: This example registers an interest in messages containing the topic "Weather". The default subscriber-service (DB2.DEFAULT.SUBSCRIBER) is registered as the subscriber and the default service-policy (DB2.DEFAULT.POLICY) specifies the quality of service. VALUES MQSUBSCRIBE('Weather') Example 2: This example demonstrates a subscriber registering interest in messages containing "Stocks". The subscriber registers as "PORTFOLIO-UPDATES" with policy "BASIC-POLICY". VALUES MQSUBSCRIBE('PORTFOLIO-UPDATES','BASIC-POLICY','Stocks') All examples return a scalar value of '1' if successful. 38.3.2.12 MQUNSUBSCRIBE >>-MQUNSUBSCRIBE---(--------------------------------------------> >-----+------------------------------------------------+--------> '-subscriber-service--,--+--------------------+--' '-service-policy--,--' >----topic---)------------------------------------------------->< The schema is MQDB2. The MQUNSUBSCRIBE function is used to unregister an existing message subscription. The subscriber-service, service-policy, and topic are used to identify which subscription is cancelled. This function requires the installation and configuration of an MQSeries based publish and subscribe system, such as MQSeries Integrator or MQSeries Publish/Subscribe. See www.ibm.com/software/MQSeries for further details. The function returns a value of '1' if successful or a '0' if unsuccessful. The result of successfully executing this function is that the publish and subscribe server will remove the subscription defined by the given parameters. Messages with the specified topic will no longer be sent to the logical destination defined by subscriber-service. subscriber-service If specified, the subscriber-service must refer to a Subscribers Service Point defined in the AMT.XML repository file. Service point definitions include the name of the MQSeries Queue Manager and Queue. See the MQSeries Application Messaging Interface manual for further details. If subscriber-service is not specified, then the DB2.DEFAULT.SUBSCRIBER value is used. The maximum size of subscriber-service is 48 characters. service-policy If specified, the service-policy must refer to a Policy defined in the AMT.XML repository file. A Service Policy defines a set of quality of service options to be applied to this messaging operation. See the MQSeries Application Messaging Interface manual for further details. If service-policy is not specified, then the default DB2.DEFAULT.POLICY will be used. The maximum size of service-policy is 48 characters. topic A string specifying the subject of messages that are not to be received. The maximum size of topic is 40 characters. Multiple topics can be specified in one string (up to 40 characters long). Each topic must be separated by a colon. For example, "t1:t2:the third topic" indicates that the message is associated with all three topics: t1, t2, and "the third topic". Examples: Example 1: This example cancels an interest in messages containing the topic "Weather". The default subscriber-service (DB2.DEFAULT.SUBSCRIBER) is registered as the unsubscriber and the default service-policy (DB2.DEFAULT.POLICY) specifies the quality of service. VALUES MQUNSUBSCRIBE('Weather') Example 2: This example demonstrates a subscriber cancelling an interest in messages containing "Stocks". The subscriber is registered as "PORTFOLIO-UPDATES" with policy "BASIC-POLICY". VALUES MQUNSUBSCRIBE('PORTFOLIO-UPDATES','BASIC-POLICY','Stocks') These examples return a scalar value of '1' if successful and a scalar value of '0' if unsuccessful. 38.3.2.13 MULTIPLY_ALT >>-MULTIPLY_ALT-------------------------------------------------> >----(exact_numeric_expression, exact_numeric_expression)------>< The schema is SYSIBM. This function was first available in FixPak 2 of Version 7.1. The MULTIPLY_ALT scalar function returns the product of the two arguments as a decimal value. It is provided as an alternative to the multiplication operator, especially when the sum of the precisions of the arguments exceeds 31. The arguments can be any built-in exact numeric data type (DECIMAL, BIGINT, INTEGER, or SMALLINT). The result of the function is a DECIMAL. The precision and scale of the result are determined as follows, using the symbols p and s to denote the precision and scale of the first argument, and the symbols p' and s' to denote the precision and scale of the second argument. * The precision is MIN(31, p + p') * The scale is: o 0 if the scale of both arguments is 0 o MIN(31, s+s') if p+p' is less than or equal to 31 o MAX(MIN(3, s+s'), 31-(p-s+p'-s') ) if p+p' is greater than 31. The result can be null if at least one argument can be null or the database is configured with DFT_SQLMATHWARN set to yes; the result is the null value if one of the arguments is null. The MULTIPLY_ALT function is a better choice than the multiplication operator when performing decimal arithmetic where a scale of at least 3 is needed and the sum of the precisions exceeds 31. In these cases, the internal computation is performed so that overflows are avoided. The final result is then assigned to the result data type using truncation where necessary to match the scale. Note that overflow of the final result is still possible when the scale is 3. The following is a sample comparing the result types using MULTIPLY_ALT and the multiplication operator. Type of argument 1Type of argument Result using Result using 2 MULTIPLY_ALT multiplication operator DECIMAL(31,3) DECIMAL(15,8) DECIMAL(31,3) DECIMAL(31,11) DECIMAL(26,23) DECIMAL(10,1) DECIMAL(31,19) DECIMAL(31,24) DECIMAL(18,17) DECIMAL(20,19) DECIMAL(31,29) DECIMAL(31,31) DECIMAL(16,3) DECIMAL(17,8) DECIMAL(31,9) DECIMAL(31,11) DECIMAL(26,5) DECIMAL(11,0) DECIMAL(31,3) DECIMAL(31,5) DECIMAL(21,1) DECIMAL(15,1) DECIMAL(31,2) DECIMAL(31,2) Example: Multiply two values where the data type of the first argument is DECIMAL(26, 3) and the data type of the second argument is DECIMAL(9,8). The data type of the result is DECIMAL(31,7). values multiply_alt(98765432109876543210987.654,5.43210987) 1 --------------------------------- 536504678578875294857887.5277415 Note that the complete product of these two numbers is 536504678578875294857887.52774154498 but the last 4 digits were truncated to match the scale of the result data type. Using the multiplication operator with the same values results in an arithmetic overflow since the result data type is DECIMAL(31,11) and the result value has 24 digits left of the decimal, but the result data type only supports 20 digits. 38.3.2.14 REC2XML >>-REC2XML---(--decimal-constant---,--format-string-------------> >----,--row-tag-string----+------------------------+--)-------->< | .------------------. | | V | | '----,--column-name---+--' The schema is SYSIBM. The REC2XML function returns a string formatted with XML tags and containing column names and column values. decimal-constant The expansion factor for replacing column value characters. The decimal value must be greater than 0.0 and less than or equal to 6.0 (SQLSTATE 42820). The decimal-constant value is used to calculate the result length of the function. For every column with a character data type, the length attribute of the column is multiplied by this expansion factor before it is added in to the result length. To specify no expansion, use a value of 1.0. Specifying a value less than 1.0 reduces the calculated result length. If the actual length of the result string is greater than the calculated result length of the function, then an error is raised (SQLSTATE 22001). format-string The string constant that specifies which format the function is to use during execution. The format-string is case-sensitive, so the following values must be specified in uppercase to be recognized. COLATTVAL or COLATTVAL_XML These formats return a string with columns as attribute values. >>-<--row-tag-string-->-----------------------------------------> .-------------------------------------------------------------------------. V | >--------<--column-name--=--"column-name"--+->--column-value----+--+> '-null="true"------------------------------------------->< Column names may or may not be valid XML attribute values. For those column names which are not valid XML attribute values, character replacement is performed on the column name before it is included in the result string. Column values may or may not be valid XML element values. If the format-string COLATTVAL is specified, for those column values which are not valid XML element values, character replacement is performed on the column value before it is included in the result string. If the format-string COLATTVAL_XML is specified, character replacement is not performed on column values (note that character replacement is still performed on column names). row-tag-string A string constant that specifies the tag used for each row. If an empty string is specified, then a value of 'row' is assumed. If a string of one or more blank characters is specified, then no beginning row-tag-string or ending row-tag-string (including the angle bracket delimiters) will appear in the result string. column-name A qualified or unqualified name of a table column. The column must have one of the following data types (SQLSTATE 42815): o numeric (SMALLINT, INTEGER, BIGINT, DECIMAL, NUMERIC, REAL, DOUBLE) o character string (CHAR, VARCHAR) 5 o datetime (DATE, TIME, TIMESTAMP) o a user-defined type based on one of the above types The same column name cannot be specified more than once (SQLSTATE 42734). The result of the function is VARCHAR. The maximum length is 32672 bytes (SQLSTATE 54006). Consider the following invocation: REC2XML (dc, fs, rt, c1, c2, ..., cn) If the value of fs is "COLATTVAL" or "COLATTVAL_XML" the result is the same as the following expression: '<' CONCAT rt CONCAT '>' CONCAT y1 CONCAT y2 CONCAT ... CONCAT yn CONCAT '' where yn is equivalent to: '' CONCAT rn CONCAT '' if the column is not null, and '" null="true"/>' if the column value is null. xvcn is equivalent to a string representation of the column name of cn, where any characters appearing in Table 29 are replaced with the corresponding representation. This ensures that the resulting string is a valid XML attribute or element value token. rn is equivalent to a string representation as indicated in Table 28. Result Column Values: Based on the data type of the column and the actual format-string specified, the column values from the table may be transformed before being concatenated into the result string. The following table shows the transformations done on the column values. Table 28. Column Values String Result Data type of cn rn CHAR, VARCHAR The value is a string. If the format-string does not end in the characters "_XML", then each character in cn is replaced with the corresponding replacement representation from Table 29, as indicated. The length attribute is: dc * the length attribute of cn. SMALLINT, INTEGER, BIGINT, DECIMAL, The value is LTRIM(RTRIM(CHAR(cn))). NUMERIC, REAL, DOUBLE The length attribute is the result length of CHAR(cn). The decimal character is always the period character. DATE The value is CHAR(cn, ISO). The length attribute is the result length of CHAR(cn, ISO). TIME The value is CHAR(cn, JIS). The length attribute is the result length of CHAR(cn, JIS) TIMESTAMP The value is CHAR(cn). The length attribute is the result length of CHAR(cn). Character Replacement: Depending on the value specified for the format-string, certain characters in column names and column values will be replaced to ensure that the column names form valid XML attribute values and the column values form valid XML element values. Table 29. Character Replcements for XML Attribute Values and Element Values < is replaced by < > is replaced by > " is replaced by " & is replaced by & ' is replaced by ' Examples: * Using the DEPARTMENT table, format the department table row, except the DEPTNAME and LOCATION columns, for department 'D01' into a string of valid XML. Since the data does not contain any of the characters which require replacement, the expansion factor will be 1.0 (no expansion). Also note that the MGRNO value is null for this row. SELECT REC2XML (1.0, 'COLATTVAL', '', DEPTNO, MGRNO, ADMRDEPT) FROM DEPARTMENT WHERE DEPTNO = 'D01' This example returns the following VARCHAR(117) string: D01 A00 Notes: REC2XML does not insert new line characters in the output. The above example output is formatted for the sake of readability. * A 5-day university schedule introduces a class with the name '&43' and '' overhead, 21 for the column names, 75 for the '', '' and double quotes, 7 for the CLASS_CODE data, 6 for the DAY data, and 8 for the STARTING data). Since the '&' and '<' characters will be replaced, an expansion factor of 1.0 will not be sufficient. The length attribute of the function will need to support an increase from 7 to 14 characters for the new format CLASS_CODE data. However, since it is known that the DAY value will never be more than 1 digit long, an extra 5 is calculated into the length that will never be used. Therefore, the expansion only needs to handle an increase of 2. Since CLASS_CODE is the only character string column in the argument list, this is the only column value to which the expansion factor applies. To get an increase of 2 for the length, an expansion factor of 9/7 (approximately 1.2857) would be needed. An expansion factor of 1.3 will be used. SELECT REC2XML (1.3, 'COLATTVAL', 'record', CLASS_CODE, DAY, STARTING) FROM CL_SCHED WHERE CLASS_CODE = '&43 &43<FIE 5 06:45:00 Notes: REC2XML does not insert new line characters in the output. The above example output is formatted for the sake of readability. * This example shows characters replaced in a column name. SELECT REC2XML (1.3,'COLATTVAL', '', Class, "time &43<FIE >-GET_ROUTINE_SAR----------------------------------------------> >----(--sarblob--,--type--,--routine_name_string--)------------>< The schema is SYSFUN. This procedure was first available in FixPak 3 of Version 7.1. The GET_ROUTINE_SAR procedure retrieves the necessary information to install the same routine in another database server running the same level on the same operating system. The information is retrieved into a single BLOB string representing an SQL archive file. The invoker of the GET_ROUTINE_SAR procedure must have DBADM authority. sarblob An output argument of type BLOB(3M) that contains the routine SAR file contents. type An input argument of type CHAR(2) that specifies whether the type of routine, using one of the following values: o P for a procedure. o SP for the specific name of a procedure. routine_name_string An input argument of type VARCHAR(257) that specifies a qualified name of the routine. If no schema name is specified, the default is the CURRENT SCHEMA when the routine is processed. Notes: The routine_name_string cannot include the double quote character ("). The qualified name of the routine is used to determine which routine to retrieve. The routine that is found must be an SQL routine or an error is raised (SQLSTATE 428F7). When not using a specific name, this may result in more than one routine and an error is raised (SQLSTATE 42725). If this occurs, the specific name of the routine must be used to get the routine. The SAR file must include a bind file which may not be available at the server. If the bind file cannot be found and stored in the SAR file, an error is raised (SQLSTATE 55045). 38.3.4.2 PUT_ROUTINE_SAR >>-PUT_ROUTINE_SAR----------------------------------------------> >----(--sarblob--+-------------------------------------+--)---->< '-,--new_owner--,--use_register_flag--' The schema is SYSFUN. This procedure was first available in FixPak 3 of Version 7.1. The PUT_ROUTINE_SAR procedure passes the necessary file to create an SQL routine at the server and then defines the routine. The invoker of the PUT_ROUTINE_SAR procedure must have DBADM authority. sarblob An input argument of type BLOB(3M) that contains the routine SAR file contents. new_owner An input argument of type VARCHAR(128) that contains an authorization-name used for authorization checking of the routine. The new-owner must have the necessary privileges for the routine to be defined. If new-owner is not specified, the authorization-name of the original routine definer is used. use_register_flag An input argument of type INTEGER that indicates whether or not the CURRENT SCHEMA and CURRENT PATH special registers are used to define the routine. If the special registers are not used, the settings for the default schema and SQL path are the settings used when the routine was originally defined. Possible values for use-register-flag: 0 Do not use the special registers of the current environment 1 Use the CURRENT SCHEMA and CURRENT PATH special registers. If the value is 1, CURRENT SCHEMA is used for unqualified object names in the routine definition (including the name of the routine) and CURRENT PATH is used to resolve unqualified routines and data types in the routine definition. If the use-registers-flag is not specified, the behavior is the same as if a value of 0 was specified. The identification information contained in sarblob is checked to confirm that the inputs are appropriate for the environment, otherwise an error is raised (SQLSTATE 55046). The PUT_ROUTINE_SAR procedure then uses the contents of the sarblob to define the routine at the server. The contents of the sarblob argument are extracted into the separate files that make up the SQL archive file. The shared library and bind files are written to files in a temporary directory. The environment is set so that the routine definition statement processing is aware that compiling and linking are not required, and that the location of the shared library and bind files is available. The contents of the DDL file are then used to dynamically execute the routine definition statement. Notes: No more than one procedure can be concurrently installed under a given schema. Processing of this statement may result in the same errors as executing the routine definition statement using other interfaces. During routine definition processing, the presence of the shared library and bind files is noted and the precompile, compile and link steps are skipped. The bind file is used during bind processing and the contents of both files are copied to the usual directory for an SQL routine. Notes: If a GET ROUTINE or a PUT ROUTINE operation (or their corresponding procedure) fails to execute successfully, it will always return an error (SQLSTATE 38000), along with diagnostic text providing information about the cause of the failure. For example, if the procedure name provided to GET ROUTINE does not identify an SQL procedure, diagnostic "100, 02000" text will be returned, where "100" and "02000" are the SQLCODE and SQLSTATE, respectively, that identify the cause of the problem. The SQLCODE and SQLSTATE in this example indicate that the row specified for the given procedure name was not found in the catalog tables. ------------------------------------------------------------------------ 38.4 Chapter 5. Queries 38.4.1 select-statement/syntax diagram The syntax diagram changes to: >>-+---------------------------------------+--fullselect--------> | .-,--------------------------. | | V | | '-WITH-----common-table-expression---+--' >----+-----------------+--+--------------------+----------------> '-order-by-clause-' '-fetch-first-clause-' >----*--+---------------------+--*--+---------------------+--*--> +-read-only-clause----+ '-optimize-for-clause-' | (1) | '-update-clause-------' >-----+---------------+---------------------------------------->< '-WITH--+-RR-+--' +-RS-+ +-CS-+ '-UR-' Notes: 1. The update-clause and the order-by-clause cannot both be specified in the same select-statement. Add the following paragraph to the description below the syntax diagram: The optional WITH clause specifies the isolation level at which the select statement is executed. o RR - Repeatable Read o RS - Read Stability o CS - Cursor Stability o UR - Uncommitted Read The default isolation level of the statement is the isolation level of the package in which the statement is bound. 38.4.2 select-statement/fetch-first-clause The last paragraph in the description of the fetch-first-clause: Specification of the fetch-first-clause in a select-statement makes the cursor not deletable (read-only). This clause cannot be specified with the FOR UPDATE clause. is incorrect and should be removed. ------------------------------------------------------------------------ 38.5 Chapter 6. SQL Statements 38.5.1 Update of the Partitioning Key Now Supported Update the partitioning key is now supported. The following text from various statements in Chapter 6 should be deleted only if the DB2_UPDATE_PART_KEY=ON: Notes: If DB2_UPDATE_PART_KEY=OFF, then the restrictions still apply. 38.5.1.1 Statement: ALTER TABLE Rules * A partitioning key column of a table cannot be updated (SQLSTATE 42997). * A nullable column of a partitioning key cannot be included as a foreign key column when the relationship is defined with ON DELETE SET NULL (SQLSTATE 42997). 38.5.1.2 Statement: CREATE TABLE Rules * A partitioning key column of a table cannot be updated (SQLSTATE 42997). * A nullable column of a partitioning key cannot be included as a foreign key column when the relationship is defined with ON DELETE SET NULL (SQLSTATE 42997). 38.5.1.3 Statement: DECLARE GLOBAL TEMPORARY TABLE PARTITIONING KEY (column-name,...) Notes: The partitioning key columns cannot be updated (SQLSTATE 42997). 38.5.1.4 Statement: UPDATE Footnotes * 108 A column of a partitioning key is not updatable (SQLSTATE 42997). The row of data must be deleted and inserted to change columns in a partitioning key. 38.5.2 Larger Index Keys for Unicode Databases 38.5.2.1 ALTER TABLE The length of variable length columns that are part of any index, including primary and unique keys, defined when the registry variable DB2_INDEX_2BYTEVARLEN was on, can be altered to a length greater than 255 bytes. The fact that a variable length column is involved in a foreign key will no longer prevent the length of that column from being altered to larger than 255 bytes, regardless of the registry variable setting. However, data with length greater than 255 cannot be inserted into the table unless the column in the corresponding primary key has length greater than 255 bytes, which is only possible if the primary key was created with the registry variable ON. 38.5.2.2 CREATE INDEX Indexes can be defined on variable length columns whose length is greater than 255 bytes if the registry variable DB2_INDEX_2BYTEVARLEN is ON. 38.5.2.3 CREATE TABLE Primary and unique keys with variable keyparts can have a size greater than 255 if the registry variable DB2_INDEX_2BYTEVARLEN is ON. Foreign keys can be defined on variable length columns whose length is greater than 255 bytes. 38.5.3 ALTER SEQUENCE ALTER SEQUENCE The ALTER SEQUENCE statement modifies the attributes of a sequence by: * Restarting the sequence * Changing the increment between future sequence values * Setting new minimum or maximum values * Changing the number of cached sequence numbers * Changing whether the sequence can cycle or not * Changing whether sequence numbers must be generated in order of request 碰駒 This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared. However, if the bind option DYNAMICRULES BIND applies, the statement cannot be dynamically prepared (SQLSTATE 42509). Authorization The privileges held by the authorization ID of the statement must include at least one of the following: * Definer of the sequence * The ALTERIN privilege for the schema implicitly or explicitly specified * SYSADM or DBADM authority Syntax >>-ALTER SEQUENCE--sequence-name--------------------------------> .-------------------------------------------. V | >-------+-RESTART--+-------------------------+-+--+------------>< | '-WITH--numeric-constant--' | +-INCREMENT BY--numeric-constant-------+ +-+-MINVALUE--numeric-constant--+------+ | '-NO MINVALUE-----------------' | +-+-MAXVALUE--numeric-constant--+------+ | '-NO MAXVALUE-----------------' | +-+-CYCLE----+-------------------------+ | '-NO CYCLE-' | +-+-CACHE--integer-constant--+---------+ | '-NO CACHE-----------------' | '-+-ORDER----+-------------------------' '-NO ORDER-' Description sequence-name Identifies the particular sequence. The combination of name, and the implicit or explicit schema name must identify an existing sequence at the current server. If no sequence by this name exists in the explicitly or implicitly specified schema, an error (SQLSTATE 42704) is issued. RESTART Restarts the sequence. If numeric-constant is not specified, the sequence is restarted at the value specified implicitly or explicitly as the starting value on the CREATE SEQUENCE statement that originally created the sequence. WITH numeric-constant Restarts the sequence with the specified value. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 42820) as long as there are no non-zero digits to the right of the decimal point (SQLSTATE 42894). INCREMENT BY Specifies the interval between consecutive values of the sequence. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 42820), and does not exceed the value of a large integer constant (SQLSTATE 42815), without non-zero digits existing to the right of the decimal point (SQLSTATE 428FA). If this value is negative, then the sequence of values descends. If this value is positive, then the sequence of values ascends. If this value is 0 or greater than the range defined by MINVALUE and MAXVALUE, only one value will be generated, but the sequence is treated as an ascending sequence otherwise. MINVALUE or NO MINVALUE Specifies the minimum value at which a descending sequence either cycles or stops generating values, or an ascending sequence cycles to after reaching the maximum value. MINVALUE numeric-constant Specifies the numeric constant that is the minimum value. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 42820), without non-zero digits existing to the right of the decimal point (SQLSTATE 428FA), but the value must be less than or equal to the maximum value (SQLSTATE 42815). NO MINVALUE For an ascending sequence, the value is the START WITH value, or 1 if START WITH is not specified. For a descending sequence, the value is the minimum value of the data type associated with the sequence. This is the default. MAXVALUE or NO MAXVALUE Specifies the maximum value at which an ascending sequence either cycles or stops generating values, or a descending sequence cycles to after reaching the minimum value. MAXVALUE numeric-constant Specifies the numeric constant that is the maximum value. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 428FA), without non-zero digits existing to the right of the decimal point (SQLSTATE 428FA), but the value must be greater than or equal to the minimum value (SQLSTATE 42815). NO MAXVALUE For an ascending sequence, the value is the maximum value of the data type associated with the sequence. For a descending sequence, the value is the START WITH value, or -1 if START WITH is not specified. This is the default. CYCLE or NOCYCLE Specifies whether the sequence should continue to generate values after reaching either its maximum or minimum value. The boundary of the sequence can be reached either with the next value landing exactly on the boundary condition, or by overshooting it in which case the next value would be determined from wrapping around to the START WITH value if cycles were permitted. CYCLE Specifies that values continue to be generated for this sequence after the maximum or minimum value has been reached. If this option is used, after an ascending sequence reaches its maximum value, it generates its minimum value; or after a descending sequence reaches its minimum value, it generates its maximum value. The maximum and minimum values for the sequence determine the range that is used for cycling. When CYCLE is in effect, then duplicate values can be generated for the sequence. NO CYCLE Specifies that values will not be generated for the sequence once the maximum or minimum value for the sequence has been reached. This is the default. CACHE or NO CACHE Specifies whether to keep some preallocated values in memory for faster access. This is a performance and tuning option. CACHE integer-constant Specifies the maximum number of sequence values that are preallocated and kept in memory. Preallocating and storing values in the cache reduces synchronous I/O to the log when values are generated for the sequence. In the event of a system failure, all cached sequence values that have not been used in committed statements are lost (that is, they will never be used). The value specified for the CACHE option is the maximum number of sequence values that could be lost in case of system failure. The minimum value is 2 (SQLSTATE 42815). The default value is CACHE 20. NO CACHE Specifies that values of the sequence are not to be preallocated. It ensures that there is not a loss of values in the case of a system failure, shutdown or database deactivation. When this option is specified, the values of the sequence are not stored in the cache. In this case, every request for a new value for the sequence results in synchronous I/O to the log. NO ORDER or ORDER Specifies whether the sequence numbers must be generated in order of request. ORDER Specifies that the sequence numbers are generated in order of request. NO ORDER Specifies that the sequence numbers do not need to be generated in order of request. This is the default. After restarting a sequence or changing to CYCLE, it is possible for sequence numbers to be duplicate values of ones generated by the sequence previously. Version * Only future sequence numbers are affected by the ALTER SEQUENCE statement. * The data type of a sequence cannot be changed. Instead, drop and recreate the sequence specifying the desired data type for the new sequence. * All cached values are lost when a sequence is altered. Examples Example 1: A possible reason for specifying RESTART without a numeric value would be to reset the sequence to the START WITH value. In this example, the goal is to generate the numbers from 1 up to the number of rows in the table and then inserting the numbers into a column added to the table using temporary tables. Another use would be to get results back where all the resulting rows are numbered: ALTER SEQUENCE org_seq RESTART SELECT NEXTVAL for org_seq, org.* FROM org 38.5.4 ALTER TABLE Changes to syntax fragments: column-alteration |--column-name--------------------------------------------------> >-----+-SET--+-DATA TYPE--+-VARCHAR-----------+---(--integer--)--+-------+> | | +-CHARACTER VARYING-+ | | | | '-CHAR VARYING------' | | | '-EXPRESSION AS--(--generation-expression--)--------' | +-ADD SCOPE--+-typed-table-name-+----------------------------------+ | '-typed-view-name--' | '-+-| identity-alteration |--------------------------------------+-' '-SET GENERATED--+-ALWAYS-----+---+--------------------------+-' '-BY DEFAULT-' '-| identity-alteration |--' >---------------------------------------------------------------| identity-alteration |---+-RESTART--+--------------------------+-+-------------------| | '-WITH--numeric-constant---' | +-SET INCREMENT BY--numeric-constant----+ | (1) | +-SET--+-NO MINVALUE-----------------+--+ | '-MINVALUE--numeric-constant--' | +-SET--+-NO MAXVALUE-----------------+--+ | '-MAXVALUE--numeric-constant--' | +-SET--+-CYCLE----+---------------------+ | '-NO CYCLE-' | +-SET--+-NO CACHE-----------------+-----+ | '-CACHE--integer-constant--' | '-SET--+-NO ORDER-+---------------------' '-ORDER----' Notes: 1. These parameters can be specified without spaces: NOMINVALUE, NOMAXVALUE, NOCYCLE, NOCACHE, and NOORDER. These single word versions are all acceptable alternatives to the two word versions. Add the following parameters: SET GENERATED Specifies whether values are to be generated for the column always or only when a default value is needed. ALWAYS A value will always be generated for the column when a row is inserted or updated in the table. The column must already be defined as a generated column (SQLSTATE 42837). BY DEFAULT The value will be generated for the column when a row is inserted into the table, unless a value is specified. The column must already be defined as a generated column (SQLSTATE 42837). RESTART or RESTART WITH numeric-constant Resets the state of the sequence associated with the identity column. If WITH numeric-constant is not specified, then the sequence for the identity column is restarted at the value that was specified, either implicitly or explicitly, as the starting value when the identity column was originally created. The numeric-constant is an exact numeric constant that can be any positive or negative value that could be assigned to this column (SQLSTATE 42820) as long as there are no non-zero digits to the right of the decimal point (SQLSTATE 42894). The column must already be defined with the IDENTITY attribute (SQLSTATE 42837). The numeric-constant will be used as the next value for the column. SET INCREMENT BY numeric-constant Specifies the interval between consecutive values of the identity column. The column must already be defined with the IDENTITY attribute (SQLSTATE 42837). This value is any positive or negative value that could be assigned to this column (SQLSTATE 42820), and does not exceed the value of a large integer constant (SQLSTATE 42815), as long as there are no non-zero digits to the right of the decimal point (SQLSTATE 42894). If this value is negative, then the sequence of values for this identity column descends. If this value is positive, then the sequence of values for this identity column ascends. If this value is 0, or is greater than the range defined by MINVALUE and MAXVALUE, then DB2 will only generate one value, but the sequence is treated as an ascending sequence otherwise. SET MINVALUE numeric-constant or NO MINVALUE Specifies the minimum value at which a descending identity column either cycles or stops generating values, or the value to which an ascending identity column cycles to after reaching the maximum value. The column must already be defined with the IDENTITY attribute (SQLSTATE 42837). MINVALUE numeric-constant Specifies the minimum numeric constant value . This value can be any positive or negative value that could be assigned to this column (SQLSTATE 42820), without non-zero digits existing to the right of the decimal point (SQLSTATE 42894), but the value must be less than the maximum value (SQLSTATE 42815). NO MINVALUE For an ascending sequence, the value is the START WITH value, or 1 if START WITH is not specified. For a descending sequence, the value is the minimum value of the data type of the column. SET MAXVALUE numeric-constant or NO MAXVALUE Specifies the maximum value at which an ascending identity column either cycles or stops generating values, or the value to which a descending identity column cycles to after reaching the minimum value. The column must already be defined with the IDENTITY attribute (SQLSTATE 42837). MAXVALUE numeric-constant Specifies the numeric constant that is the maximum value. This value can be any positive or negative value that could be assigned to this column (SQLSTATE 42820), without non-zero digits existing to the right of the decimal point (SQLSTATE 42894), but the value must be greater than the minimum value (SQLSTATE 42815). NO MAXVALUE For an ascending sequence, the value is the maximum value of the data type of the column. For a descending sequence, the value is the START WITH value, or -1 if START WITH is not specified. SET CYCLE or NO CYCLE Specifies whether this identity column should continue to generate values after generating either the maximum or minimum value. The column must already be defined with the IDENTITY attribute (SQLSTATE 42837). CYCLE Specifies that values continue to be generated for this column after the maximum or minimum value has been reached. If this option is used, then after an ascending identity column reaches the maximum value, it generates its minimum value; or after a descending sequence reaches the minimum value, it generates its maximum value. The maximum and minimum values for the identity column determine the range that is used for cycling. When CYCLE is in effect, then duplicate values can be generated for an identity column. Although not required, if unique values are desired, a single-column unique index defined using the identity column will ensure uniqueness. If a unique index exists on such an identity column and a non-unique value is generated, then an error occurs (SQLSTATE 23505). NO CYCLE Specifies that values will not be generated for the identity column once the maximum or minimum value has been reached. SET CACHE integer-constant or NO CACHE Specifies whether to keep some preallocated values in memory for faster access. This is a performance and tuning option. The column must already be defined with the IDENTITY attribute (SQLSTATE 42837). CACHE integer-constant Specifies how many values of the identity sequence are preallocated and kept in memory. When values are generated for the identity column, preallocating and storing values in the cache reduces synchronous I/O to the log. If a new value is needed for the identity column and there are no unused values available in the cache, then the allocation of the value requires waiting for I/O to the log. However, when a new value is needed for the identity column and there is an unused value in the cache, the allocation of that identity value can happen more quickly by avoiding the I/O to the log. When a database manager is stopped (database deactivation, system failure, or shutdown, for example), all cached sequence values that have not been used in committed statements are lost (that is, they will never be used). The value specified for the CACHE option is the maximum number of values for the identity column that could be lost in case of system failure. The minimum value is 2 (SQLSTATE 42615). NO CACHE Specifies that values for the identity column are not to be preallocated. When this option is specified, the values of the identity column are not stored in the cache. In this case, every request for a new identity value results in synchronous I/O to the log. SET ORDER or NO ORDER Specifies whether the identity column values must be generated in order of request. The column must already be defined with the IDENTITY attribute (SQLSTATE 42837). ORDER Specifies that the identity column values are generated in order of request. NO ORDER Specifies that the identity column values do not need to be generated in order of request. 38.5.5 Compound SQL (Embedded) A prepared COMMIT statement is not allowed in an ATOMIC compound SQL statement. 38.5.6 Compound Statement (Dynamic) Compound Statement (Dynamic) A compound statement groups other statements together into an executable block. You can declare SQL variables within a dynamically prepared atomic compound statement. Invocation This statement can be embedded in a trigger, SQL Function, or SQL Method, or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared. Authorization No privileges are required to invoke a dynamic compound statement. However, the authorization ID of the compound statement must hold the necessary privileges to invoke the SQL statements embedded in the compound statement. Syntax dynamic-compound-statement >>-+--------------+--BEGIN ATOMIC-------------------------------> | (1) | '-label:-------' >-----+-----------------------------------------------+---------> | .-----------------------------------------. | | V | | '-----+-| SQL-variable-declaration |-+---;---+--' '-| condition-declaration |----' .-,-----------------------------. V | >--------SQL-procedure-statement--;---+---END--+--------+------>< '-label--' SQL-variable-declaration .-,--------------------. V | |---DECLARE-------SQL-variable-name---+--data-type--------------> .-DEFAULT NULL-------------. >-----+--------------------------+------------------------------| '-DEFAULT--default-values--' condition-declaration |---DECLARE--condition-name--CONDITION--FOR---------------------> .-VALUE-. .-SQLSTATE--+-------+---. >----+-----------------------+---string-constant----------------| Notes: 1. A label can only be specified when the statement is in a function, method, or trigger definition. Description label Defines the label for the code block. If the beginning label is specified, it can be used to qualify SQL variables declared in the dynamic compound statement and can also be specified on a LEAVE statement. If the ending label is specified, it must be the same as the beginning label. ATOMIC ATOMIC indicates that, if an error occurs in the compound statement, all SQL statements in the compound statement will be rolled back and any remaining SQL statements in the compound statement are not processed. SQL-procedure-statement The following list of SQL-control-statements can be used within the dynamic compound statement: o FOR Statement o GET DIAGNOSTICS Statement o IF Statement o ITERATE Statement o LEAVE Statement o SIGNAL Statement o WHILE Statement The SQL statements that can be issued are: o fullselect 6 o Searched UPDATE o Searched DELETE o INSERT o SET variable statement SQL-variable-declaration Declares a variable that is local to the dynamic compound statement. SQL-variable-name Defines the name of a local variable. DB2 converts all SQL variable names to uppercase. The name cannot: + Be the same as another SQL variable within the same compound statement. + Be the same as a parameter name. + Be the same as column names. If an SQL statement contains an identifier with the same name as an SQL variable and a column reference, DB2 interprets the identifier as a column. data-type Specifies the data type of the variable. DEFAULT default-values or NULL Defines the default for the SQL variable. The variable is initialized when the dynamic compound statement is called. If a default value is not specified, the variable is initialized to NULL. condition-declaration Declares a condition name and corresponding SQLSTATE value. condition-name Specifies the name of the condition. The condition name must be unique within the procedure body and can be referenced only within the compound statement in which it is declared. FOR SQLSTATE string-constant Specifies the SQLSTATE associated with the condition. The string-constant must be specified as five characters enclosed in single quotes, and cannot be '00000'. Version * Dynamic compound statements are compiled by DB2 as one single statement. This statement is effective for short scripts involving little control flow logic but significant data flow. For larger constructs with nested complex control flow, a better choice is to use SQL procedures for details on using SQL procedures. 38.5.7 CREATE FUNCTION (Source or Template) The syntax diagram changes to the following >>-CREATE FUNCTION--function-name-------------------------------> >----(--+------------------------------------------+---)---*----> | .-,----------------------------------. | | V | | '----+-----------------+---data-type1---+--' '-parameter-name--' >----RETURNS--data-type2---*----+--------------------------+----> '-SPECIFIC--specific-name--' >----*----------------------------------------------------------> >-----+-SOURCE--+-function-name--------------------------------+------------------+> | +-SPECIFIC--specific-name----------------------+ | | '-function-name--(--+-------------------+---)--' | | | .-,-----------. | | | | V | | | | '----data-type---+--' | | .-NOT DETERMINISTIC--. .-EXTERNAL ACTION----. | '-AS TEMPLATE--*----+--------------------+--*----+--------------------+--*--' '-DETERMINISTIC------' '-NO EXTERNAL ACTION-' >----*--------------------------------------------------------->< Add the following to the "Description" section: DETERMINISTIC or NOT DETERMINISTIC This optional clause specifies whether the function always returns the same results for given argument values (DETERMINISTIC) or whether the function depends on some state values that affect the results (NOT DETERMINISTIC). That is, a DETERMINISTIC function must always return the same table from successive invocations with identical inputs. Optimizations taking advantage of the fact that identical inputs always produce the same results are prevented by specifying NOT DETERMINISTIC. NOT DETERMINISTIC must be explicitly or implicitly specified if the body of the function accesses a special register or calls another non-deterministic function (SQLSTATE 428C2). NO EXTERNAL ACTION or EXTERNAL ACTION This optional clause specifies whether or not the function takes some action that changes the state of an object not managed by the database manager. By specifying NO EXTERNAL ACTION, the system can use certain optimizations that assume functions have no external impacts. EXTERNAL ACTION must be explicitly or implicitly specified if the body of the function calls another function that has an external action (SQLSTATE 428C2). 38.5.8 CREATE FUNCTION (SQL Scalar, Table or Row) The syntax diagram changes to: >>-CREATE FUNCTION--function-name-------------------------------> >----(--+------------------------------------+---)---*----------> | .-,----------------------------. | | V | | '----parameter-name--data-type1---+--' >----RETURNS--+-data-type2--------------------+--*--------------> '--+-ROW---+---| column-list |--' '-TABLE-' .-LANGUAGE SQL--. >-----+--------------------------+--*----+---------------+--*---> '-SPECIFIC--specific-name--' .-NOT DETERMINISTIC--. .-EXTERNAL ACTION----. >-----+--------------------+--*----+--------------------+--*----> '-DETERMINISTIC------' '-NO EXTERNAL ACTION-' .-READS SQL DATA--. .-STATIC DISPATCH--. >-----+-----------------+--*----+------------------+--*---------> '-CONTAINS SQL----' (1) .-CALLED ON NULL INPUT-------. >-----+----------------------------+--*-------------------------> >-----+-----------------------------------------------------+---> | (2) | '-PREDICATES--(--| predicate-specification |--)-------' >----| SQL-function-body |------------------------------------->< column-list .-,--------------------------. V | |---(-----column-name--data-type3---+---)-----------------------| SQL-function-body |---+-RETURN Statement-----------+------------------------------| '-dynamic-compound-statement-' Notes: 1. NULL CALL may be specified in place of CALLED ON NULL INPUT 2. Valid only if RETURNS specifies a scalar result (data-type2) Change the following parameters: LANGUAGE SQL Specifies that the function is written using SQL. This parameter section replaces the "RETURN expression, NULL, WITH common-table-expression, fullselect" parameter section. SQL-function-body Specifies the body of the function. Parameter names can be referenced in the SQL-function-body. Parameter names may be qualified with the function name to avoid ambiguous references. If the SQL-function-body is a dynamic compound statement, it must contain at least one RETURN statement and a RETURN statement must be executed when the function is called (SQLSTATE 42632). If the function is a table or row function, then it can contain only one RETURN statement which must be the last statement in the dynamic compound (SQLSTATE 429BD). For additional details, see Compound Statement (Dynamic) and RETURN. 38.5.9 CREATE METHOD The syntax diagram changes to: CREATE METHOD Syntax >>-CREATE-------------------------------------------------------> >-----+-METHOD--+-method-name----------+---FOR--type-name--+----> | '-| method-signature |-' | '-SPECIFIC METHOD--specific-name---------------------' >-----+-*----EXTERNAL--+-----------------------+--*----+------------------------------+--*--+> | '-NAME--+-'string'---+--' '-TRANSFORM GROUP--group-name--' | | '-identifier-' | '-| SQL-method-body |-----------------------------------------------------------------' >-------------------------------------------------------------->< method-signature |---method-name--(--+---------------------------------------------------------+---)--> | .-,--------------------------------------------------. | | V | | '----+-----------------+---data-type1--+-------------+--+-' '-parameter-name--' '-AS LOCATOR--' >----+------------------------------------------------------------------+-> '-RETURNS--+-data-type2--+-------------+------------------------+--' | '-AS LOCATOR--' | '-data-type3--CAST FROM--data-type4--+-------------+-' '-AS LOCATOR--' >---------------------------------------------------------------| SQL-method-body |---+-RETURN Statement-----------+------------------------------| '-dynamic-compound-statement-' The following parameters replace the "RETURN scalar-expression or NULL" section: SQL-method-body The SQL-method-body defines the how the method is implemented if the method specification in CREATE TYPE is LANGUAGE SQL. The SQL-method-body must comply with the following parts of the method specification: o DETERMINISTIC or NOT DETERMINISTIC (SQLSTATE 428C2) o EXTERNAL ACTION or NO EXTERNAL ACTION (SQLSTATE 428C2) o CONTAINS SQL or READS SQL DATA (SQLSTATE 42985) Parameter names can be referenced in the SQL-method-body. The subject of the method is passed to the method implementation as an implicit first parameter named SELF. For additional details, see Compound Statement (Dynamic) and RETURN. 38.5.10 CREATE SEQUENCE CREATE SEQUENCE The CREATE SEQUENCE statement creates a sequence at the application server. Invocation This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared. However, if the bind option DYNAMICRULES BIND applies, the statement cannot be dynamically prepared (SQLSTATE 42509). Authorization The privileges held by the authorization ID of the statement must include at least one of the following: * CREATEIN privilege for the implicitly or explicitly specified schema * SYSADM or DBADM authority Syntax .-AS INTEGER-----. >>-CREATE SEQUENCE--sequence-name---*----+----------------+--*--> '-AS--data-type--' >-----+-------------------------------+--*----------------------> '-START WITH--numeric-constant--' .-INCREMENT BY 1------------------. >-----+---------------------------------+--*--------------------> '-INCREMENT BY--numeric-constant--' (1) .-NO MINVALUE-----------------. >-----+-----------------------------+--*------------------------> '-MINVALUE--numeric-constant--' .-NO MAXVALUE-----------------. .-NO CYCLE--. >-----+-----------------------------+--*----+-----------+--*----> '-MAXVALUE--numeric-constant--' '-CYCLE-----' .-CACHE 20-----------------. .-NO ORDER--. >-----+--------------------------+--*----+-----------+--*------>< +-CACHE--integer-constant--+ '-ORDER-----' '-NO CACHE-----------------' Notes: 1. These parameters can be specified without spaces: NOMINVALUE, NOMAXVALUE, NOCYCLE, NOCACHE, and NOORDER. These single word versions are all acceptable alternatives to the two word versions. Description sequence-name Names the sequence. The combination of name, and the implicit or explicit schema name must not identify an existing sequence at the current server (SQLSTATE 42710). The unqualified form of sequence-name is an SQL identifier. The qualified form is a qualifier followed by a period and an SQL identifier. The qualifier is a schema name. If the sequence name is explicitly qualified with a schema name, the schema name cannot begin with 'SYS' or an error (SQLSTATE 42939) is raised. AS data-type Specifies the data type to be used for the sequence value. The data type can be any exact numeric type (SMALLINT, INTEGER, BIGINT or DECIMAL) with a scale of zero or a user-defined distinct type for which the source type is an exact numeric type with a scale of zero (SQLSTATE 42815). The default is INTEGER. START WITH numeric-constant Specifies the first value for the sequence. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 42820), without non-zero digits existing to the right of the decimal point (SQLSTATE 428FA). The default is MINVALUE for ascending sequences and MAXVALUE for descending sequences. This value is not necessarily the value that a sequence would cycle to after reaching the maximum or minimum value of the sequence. The START WITH clause can be used to start a sequence outside the range that is used for cycles. The range used for cycles is defined by MINVALUE and MAXVALUE. INCREMENT BY numeric-constant Specifies the interval between consecutive values of the sequence. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 42820), and does not exceed the value of a large integer constant (SQLSTATE 42815), without non-zero digits existing to the right of the decimal point (SQLSTATE 428FA). If this value is negative, then the sequence of values descends. If this value is positive, then the sequence of values ascends. If this value is 0 or greater than the range defined by MINVALUE and MAXVALUE, only one value will be generated, but the sequence is treated as an ascending sequence otherwise. The default is 1. MINVALUE or NO MINVALUE Specifies the minimum value at which a descending sequence either cycles or stops generating values, or an ascending sequence cycles to after reaching the maximum value. MINVALUE numeric-constant Specifies the numeric constant that is the minimum value. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 42820), without non-zero digits existing to the right of the decimal point (SQLSTATE 428FA), but the value must be less than or equal to the maximum value (SQLSTATE 42815). NO MINVALUE For an ascending sequence, the value is the START WITH value, or 1 if START WITH is not specified. For a descending sequence, the value is the minimum value of the data type associated with the sequence. This is the default. MAXVALUE or NO MAXVALUE Specifies the maximum value at which an ascending sequence either cycles or stops generating values, or a descending sequence cycles to after reaching the minimum value. MAXVALUE numeric-constant Specifies the numeric constant that is the maximum value. This value can be any positive or negative value that could be assigned to a column of the data type associated with the sequence (SQLSTATE 428FA), without non-zero digits existing to the right of the decimal point (SQLSTATE 428FA), but the value must be greater than or equal to the minimum value (SQLSTATE 42815). NO MAXVALUE For an ascending sequence, the value is the maximum value of the data type associated with the sequence. For a descending sequence, the value is the START WITH value, or -1 if START WITH is not specified. This is the default. CYCLE or NO CYCLE Specifies whether the sequence should continue to generate values after reaching either its maximum or minimum value. The boundary of the sequence can be reached either with the next value landing exactly on the boundary condition, or by overshooting it. CYCLE Specifies that values continue to be generated for this sequence after the maximum or minimum value has been reached. If this option is used, after an ascending sequence reaches its maximum value it generates its minimum value; after a descending sequence reaches its minimum value it generates its maximum value. The maximum and minimum values for the sequence determine the range that is used for cycling. When CYCLE is in effect, then duplicate values can be generated for the sequence. NO CYCLE Specifies that values will not be generated for the sequence once the maximum or minimum value for the sequence has been reached. This is the default. CACHE or NO CACHE Specifies whether to keep some preallocated values in memory for faster access. This is a performance and tuning option. CACHE integer-constant Specifies the maximum number of sequence values that are preallocated and kept in memory. Preallocating and storing values in the cache reduces synchronous I/O to the log when values are generated for the sequence. In the event of a system failure, all cached sequence values that have not been used in committed statements are lost (that is, they will never be used). The value specified for the CACHE option is the maximum number of sequence values that could be lost in case of system failure. The minimum value is 2 (SQLSTATE 42815). The default value is CACHE 20. NO CACHE Specifies that values of the sequence are not to be preallocated. It ensures that there is not a loss of values in the case of a system failure, shutdown or database deactivation. When this option is specified, the values of the sequence are not stored in the cache. In this case, every request for a new value for the sequence results in synchronous I/O to the log. NO ORDER or ORDER Specifies whether the sequence numbers must be generated in order of request. ORDER Specifies that the sequence numbers are generated in order of request. NO ORDER Specifies that the sequence numbers do not need to be generated in order of request. This is the default. Version * It is possible to define a constant sequence, that is, one that would always return a constant value. This could be done by specifying the same value for MINVALUE or MAXVALUE, or by specifying an INCREMENT value of zero. In either case, in order to allow for NEXTVAL to generate the same value more than once, CYCLE must be specified. A constant sequence can be used as a numeric global variable. ALTER SEQUENCE can be used to adjust the values that will be generated for a constant sequence. * A sequence can be cycled manually, by using the ALTER SEQUENCE statement. If NO CYCLE is implicitly or explicitly specified, the sequence can be restarted or extended using the ALTER SEQUENCE statement to cause values to continue to be generated once the maximum or minimum value for the sequence has been reached. * Caching sequence numbers implies that a range of sequence numbers can be kept in memory for fast access. When an application accesses a sequence that can allocate the next sequence number from the cache, the sequence number allocation can happen quickly. However, if an application accesses a sequence that cannot allocate the next sequence number from the cache, the sequence number allocation may require having to wait for I/O operations to persistent storage. The choice of the value for CACHE should be done keeping in mind the performance and application requirements tradeoffs. * The owner has the ALTER and USAGE privileges on the new sequence. Only the USAGE privilege can be granted by the owner and only to PUBLIC. * The following syntax is also supported: NOMINVALUE, NOMAXVALUE, NOCYCLE, NOCACHE, and NOORDER. Examples Example 1: Create a sequence called org_seq: CREATE SEQUENCE org_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO CYCLE CACHE 24 38.5.11 CREATE TRIGGER CREATE TRIGGER Syntax >>-CREATE TRIGGER--trigger-name----+-NO CASCADE BEFORE-+--------> '-AFTER-------------' >-----+-INSERT-----------------------------+--ON--table-name----> +-DELETE-----------------------------+ '-UPDATE--+------------------------+-' | .-,--------------. | | V | | '-OF----column-name---+--' >-----+----------------------------------------------------------------------+> | .----------------------------------------------------. | | V (1) (2) .-AS-. | | '-REFERENCING-------------------+-OLD--+----+--correlation-name--+--+--' | .-AS-. | +-NEW-+----+--correlation-name---+ | .-AS-. | +-OLD_TABLE-+----+--identifier---+ | .-AS-. | '-NEW_TABLE-+----+--identifier---' >-----+-FOR EACH ROW---------------+--MODE DB2SQL---------------> | (3) | '--------FOR EACH STATEMENT--' >-----| triggered-action |------------------------------------->< triggered-action |--+-------------------------------+--SQL-procedure-statement---| '-WHEN--(--search-condition--)--' Notes: 1. OLD and NEW may only be specified once each. 2. OLD_TABLE and NEW_TABLE may only be specified once each and only for AFTER triggers. 3. FOR EACH STATEMENT may not be specified for BEFORE triggers. Replace the description of "triggered-action" with the following: triggered-action Specifies the action to be performed when a trigger is activated. A triggered-action is composed of an SQL-procedure-statement and an optional condition for the execution of the SQL-procedure-statement. WHEN (search-condition) Specifies a condition that is true, false, or unknown. The search-condition provides a capability to determine whether or not a certain triggered action should be executed. The associated action is performed only if the specified search condition evaluates as true. If the WHEN clause is omitted, the associated SQL-procedure statement is always performed. SQL-procedure-statement The SQL-procedure-statement can contain a dynamic compound statement or any of the SQL control statements listed in Compound Statement (Dynamic). If the trigger is a BEFORE trigger, then an SQL-procedure-statement can also include a fullselect or a SET variable statement (SQLSTATE 42987). If the trigger is an AFTER trigger, then an SQL-procedure-statement can also include one of the following (SQLSTATE 42987): o an INSERT SQL statement o a searched UPDATE SQL statement o a searched DELETE SQL statement o a SET variable statement o a fullselect 7 The SQL-procedure-statement cannot reference an undefined transition variable (SQLSTATE 42703) or a declared temporary table (SQLSTATE 42995). The SQL-procedure-statement in a BEFORE trigger cannot reference a summary table defined with REFRESH IMMEDIATE (SQLSTATE 42997). The SQL-procedure-statement in a BEFORE trigger cannot reference a generated column, other than the identity column, in the new transition variable (SQLSTATE 42989). The Notes section changes to the following: * The result of a fullselect specified in the SQL-procedure-statement is not available inside or outside of the trigger. * Inoperative triggers: An inoperative trigger is a trigger that is no longer available and is therefore never activated. A trigger becomes inoperative if: o A privilege that the creator of the trigger is required to have for the trigger to execute is revoked. o An object such as a table, view or alias, upon which the triggered action is dependent, is dropped. o A view, upon which the triggered action is dependent, becomes inoperative. o An alias that is the subject table of the trigger is dropped. In practical terms, an inoperative trigger is one in which a trigger definition has been dropped as a result of cascading rules for DROP or REVOKE statements. For example, when an view is dropped, any trigger with an SQL-procedure-statement defined using that view is made inoperative. When a trigger is made inoperative, all packages with statements performing operations that were activating the trigger will be marked invalid. When the package is rebound (explicitly or implicitly) the inoperative trigger is completely ignored. Similarly, applications with dynamic SQL statements performing operations that were activating the trigger will also completely ignore any inoperative triggers. The trigger name can still be specified in the DROP TRIGGER and COMMENT ON TRIGGER statements. An inoperative trigger may be recreated by issuing a CREATE TRIGGER statement using the definition text of the inoperative trigger. This trigger definition text is stored in the TEXT column of SYSCAT.TRIGGERS. Note that there is no need to explicitly drop the inoperative trigger in order to recreate it. Issuing a CREATE TRIGGER statement with the same trigger-name as an inoperative trigger will cause that inoperative trigger to be replaced with a warning (SQLSTATE 01595). Inoperative triggers are indicated by an X in the VALID column of the SYSCAT.TRIGGERS catalog view. * Errors executing triggers: Errors that occur during the execution of triggered SQL statements are returned using SQLSTATE 09000 unless the error is considered severe. If the error is severe, the severe error SQLSTATE is returned. The SQLERRMC field of the SQLCA for non-severe error will include the trigger name, SQLCODE, SQLSTATE and as many tokens as will fit from the tokens of the failure. The SQL-procedure-statement could include a SIGNAL SQLSTATE statement or contain a RAISE_ERROR function. In both these cases, the SQLSTATE returned is the one specified in the SIGNAL SQLSTATE statement or the RAISE_ERROR condition. 38.5.12 CREATE WRAPPER Linux uses libraries called LIBDRDA.SO and LIBSQLNET.SO, not LIBDRDA.A and LIBSQLNET.A. 38.5.13 DECLARE CURSOR Within the "DECLARE CURSOR" statement, near the end of the Notes section the following sentence should be changed from: An ambiguous cursor is considered read-only if the BLOCKING bind option is ALL, otherwise it is considered deletable. to: An ambiguous cursor is considered read-only if the BLOCKING bind option is ALL; otherwise, it is considered updatable. The change is from the word "deletable" to the word "updatable". 38.5.14 DELETE The searched DELETE syntax diagram changes to the following: >>-DELETE FROM----+-table-name-------------------+--------------> +-view-name--------------------+ '-ONLY--(--+-table-name-+---)--' '-view-name--' >-----+---------------------------+-----------------------------> | .-AS-. | '-+----+--correlation-name--' >-----+--------------------------+---+---------------+--------->< '-WHERE--search-condition--' '-WITH--+-RR-+--' +-RS-+ +-CS-+ '-UR-' Positioned DELETE: >>-DELETE FROM----+-table-name-------------------+--------------> +-view-name--------------------+ '-ONLY--(--+-table-name-+---)--' '-view-name--' >----WHERE CURRENT OF--cursor-name----------------------------->< Add the following to the description section: WITH Specifies the isolation level used when locating the rows to be deleted. RR Repeatable Read RS Read Stability CS Cursor Stability UR Uncommitted Read The default isolation level of the statement is the isolation level of the package in which the statement is bound. 38.5.15 DROP Add the following option: >>-SEQUENCE--sequence-name--RESTRICT--------------------------->< Add the following parameters: SEQUENCE sequence-name RESTRICT Identifies the particular sequence that is to be dropped. The sequence-name, along with the implicit or explicit schema name, must identify an existing sequence at the current server. If no sequence by this name exists in the explicitly or implicitly specified schema, an error (SQLSTATE 42704) is raised. The RESTRICT keyword enforces the rule that the sequence is not dropped if the definition of a table column refers to the sequence (through an IDENTITY column). Notes: o System created sequences for IDENTITY columns cannot be dropped using the DROP sequence command. o When a sequence is dropped, all privileges on the sequence are also dropped. The table showing the dependencies that objects have on each other (Table 27) needs to be updated as follows: New row: DROP SEQUENCE The entry at the intersection of the new row "DROP SEQUENCE" and the column "PACKAGE" will be an "A". The rest of the entries in this new row will be "-" 38.5.16 GRANT (Sequence Privileges) GRANT (Sequence Privileges) This form of the GRANT statement grants privileges on a user-defined sequence. Invocation This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared. However, if the bind option DYNAMICRULES BIND applies, the statement cannot be dynamically prepared (SQLSTATE 42509). Authorization The privileges held by the authorization ID of the statement must include at least one of the following: * Owner of the sequence * SYSADM or DBADM authority Syntax >>-GRANT--USAGE--ON SEQUENCE--sequence-name--TO PUBLIC--------->< Description USAGE Grants the USAGE privilege for a sequence. ON SEQUENCE sequence-name Identifies the sequence on which the USAGE privilege is to be granted. The sequence-name, including the implicit or explicit schema qualifier, must uniquely identify an existing sequence at the current server. If no sequence by this name exists in the specified schema, an error (SQLSTATE 42704) is raised. TO PUBLIC Grants the USAGE privilege to all users. Examples Example 1: Grant any user the privilege on a sequence called MYNUM GRANT USAGE ON SEQUENCE MYNUM TO PUBLIC 38.5.17 INSERT Syntax diagram changes to: >>-INSERT INTO----+-table-name-+--------------------------------> '-view-name--' >-----+----------------------------+----------------------------> | .-,--------------. | | V | | '-(-----column-name---+---)--' .-,------------------------------------. V | >-----+-VALUES------+-+-expression-+----------------+--+--------+> | | +-NULL-------+ | | | | '-DEFAULT----' | | | | .-,-----------------. | | | | V | | | | '-(------+-expression-+--+---)--' | | +-NULL-------+ | | '-DEFAULT----' | '-+---------------------------------------+---fullselect--' | .-,--------------------------. | | V | | '-WITH-----common-table-expression---+--' >-----+---------------+---------------------------------------->< '-WITH--+-RR-+--' +-RS-+ +-CS-+ '-UR-' Add the following to the description section: WITH Specifies the isolation level at which the fullselect is executed. RR Repeatable Read RS Read Stability CS Cursor Stability UR Uncommitted Read The default isolation level of the statement is the isolation level of the package in which the statement is bound. 38.5.18 SELECT INTO The syntax diagram changes to: .-,----------------. V | >>-select-clause--INTO-------host-variable---+--from-clause-----> >----+--------------+--+-----------------+--+---------------+---> '-where-clause-' '-group-by-clause-' '-having-clause-' >-----+---------------+---------------------------------------->< '-WITH--+-RR-+--' +-RS-+ +-CS-+ '-UR-' Add the following to the description section: WITH Specifies the isolation level at which the SELECT INTO statement is executed. RR Repeatable Read RS Read Stability CS Cursor Stability UR Uncommitted Read The default isolation level of the statement is the isolation level of the package in which the statement is bound. 38.5.19 SET ENCRYPTION PASSWORD SET ENCRYPTION PASSWORD The SET ENCRYPTION PASSWORD statement sets the password that will be used by the encryption and decryption functions. The password is not tied to DB2 authentication, and is used for data encryption only. This statement is not under transaction control. Invocation The statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared. Authorization No authorization is required to execute this statement. Syntax .-=-. >>-SET--ENCRYPTION PASSWORD--+---+--+-host-variable---+-------->< '-string-constant-' Description The ENCRYPTION PASSWORD can be used by the ENCRYPT, DECRYPT_BIN, and DECRYPT_CHAR built-in functions for password based encryption. The length must be between 6 and 127 inclusive. All characters must be specified in the exact case intended as there is no conversion to uppercase characters. host-variable A variable of type CHAR or VARCHAR. The length of the contents of the host-variable must be between 6 and 127 inclusive (SQLSTATE 428FC). It cannot be set to null. All characters must be specified in the exact case intended as there is no conversion to uppercase characters. string-constant A character string constant. The length must be between 6 and 127 inclusive (SQLSTATE 428FC). Rules * The initial ENCRYPTION PASSWORD value is the empty string (''). * The host-variable or string-constant is transmitted to the database server using normal DB2 mechanisms. Version * See 38.3.2.3, ENCRYPT and 38.3.2.2, DECRYPT_BIN and DECRYPT_CHAR for additional information on using this statement. Examples Example 1: The following statement sets the ENCRYPTION PASSWORD. SET ENCRYPTION PASSWORD = 'bubbalu' 38.5.20 SET transition-variable This section changes to the following: SET Variable The SET Variable statement assigns values to local variables or to new transition variables. It is under transaction control. Invocation This statement can only be used as an SQL statement in either a dynamic compound statement, trigger, SQL function or SQL method. Authorization To reference a transition variable, the privileges held by the authorization ID of the trigger creator must include at least one of the following: * UPDATE of the columns referenced on the left hand side of the assignment and SELECT for any columns referenced on the right hand side. * CONTROL privilege on the table (subject table of the trigger) * SYSADM or DBADM authority. To execute this statement with a row-fullselect as the right hand side of the assignment, the privileges held by the authorization ID of either the trigger definer or the dynamic compound statement owner must also include at least one of the following, for each table or view referenced: * SELECT privilege * CONTROL privilege * SYSADM or DBADM. Syntax >>-SET----------------------------------------------------------> .-,---------------------------------------------------------------------------------. V | >--------+-| target-variable |--=--+-expression-+--------------------------------------+--+> | +-NULL-------+ | | '-DEFAULT----' | | .-,----------------------. .-,--------------------. | | V | V (1) | | '-(-----| target-variable |---+---)--=--(--+----+-expression------+--+-+---)--' | +-NULL------------+ | | '-DEFAULT---------' | | (2) | '-row-fullselect------------' >-------------------------------------------------------------->< target-variable |---+-SQL-variable-name--------+---+--------------------------+-| '-transition-variable-name-' | .--------------------. | | V | | '----..attribute-name---+--' Notes: 1. The number of expressions, NULLs and DEFAULTs must match the number of target-variables. 2. The number of columns in the select list must match the number of target-variables. Description target-variable Identifies the target variable of the assignment. A target-variable representing the same variable must not be specified more than once (SQLSTATE 42701). SQL-variable-name Identifies the SQL variable that is the assignment target. SQL variables must be declared before they are used. SQL variables can be defined in a dynamic compound statement. transition-variable-name Identifies the column to be updated in the transition row. A transition-variable-name must identify a column in the subject table of a trigger, optionally qualified by a correlation name that identifies the new value (SQLSTATE 42703). ..attribute name Specifies the attribute of a structured type that is set (referred to as an attribute assignment). The SQL-variable-nameor transition-variable-name specified must be defined with a user-defined structured type (SQLSTATE 428DP). The attribute-name must be an attribute of the structured type (SQLSTATE 42703). An assignment that does not involve the ..attribute name clause is referred to as a conventional assignment. expression Indicates the new value of the target-variable. The expression is any expression of the type described in Chapter 2 of the SQL Reference. The expression can not include a column function except when it occurs within a scalar fullselect (SQLSTATE 42903). In the context of a CREATE TRIGGER statement, an expression may contain references to OLD and NEW transition variables and must be qualified by the correlation-name to specify which transition variable (SQLSTATE 42702). NULL Specifies the null value and can only be specified for nullable columns (SQLSTATE 23502). NULL cannot be the value in an attribute assignment (SQLSTATE 429B9), unless it was specifically cast to the data type of the attribute. DEFAULT Specifies that the default value should be used. If target-variable is a column, the value inserted depends on how the column was defined in the table. o If the column was defined using the WITH DEFAULT clause, then the value is set to the default defined for the column. o If the column was defined using the IDENTITY clause, the value is generated by the database manager. o If the column was defined without specifying the WITH DEFAULT clause, the IDENTITY clause, or the NOT NULL clause, then the value is NULL. o If the column was defined using the NOT NULL clause and the IDENTITY clause is not used, or the WITH DEFAULT clause was not used or DEFAULT NULL was used, the DEFAULT keyword cannot be specified for that column (SQLSTATE 23502). If target-variable is an SQL variable, then the value inserted is the default as specified or implied in the variable declaration. row-fullselect A fullselect that returns a single row with the number of columns corresponding to the number of target-variables specified for assignment. The values are assigned to each corresponding target-variable. If the result of the row-fullselect is no rows, then null values are assigned. In the context of a CREATE TRIGGER statement, a row-fullselect may contain references to OLD and NEW transition variables which must be qualified by their correlation-name to specify which transition variable to use (SQLSTATE 42702). An error is returned if there is more than one row in the result (SQLSTATE 21000). Rules * The number of values to be assigned from expressions, NULLs and DEFAULTs or the row-fullselect must match the number of target-variables specified for assignment (SQLSTATE 42802). * A SET Variable statement cannot assign an SQL variable and a transition variable in one statement (SQLSTATE 42997). * Values are assigned to target-variables under the assignment rules described in Chapter 2 of the SQL Reference. If the statement is used in a BEFORE UPDATE trigger, and the registry variable DB2_UPDATE_PART_KEY=OFF, then a transition-variable specified as target-variable cannot be a partitioning key column (SQLSTATE 42997). Version * If more than one assignment is included, all expressions and row-fullselects are evaluated before the assignments are performed. Thus references to target-variables in an expression or row fullselect are always the value of the target-variable prior to any assignment in the single SET statement. * When an identity column defined as a distinct type is updated, the entire computation is done in the source type, and the result is cast to the distinct type before the value is actually assigned to the column. 8 * To have DB2 generate a value on a SET statement for an identity column, use the DEFAULT keyword: SET NEW.EMPNO = DEFAULT In this example, NEW.EMPNO is defined as an identity column, and the value used to update this column is generated by DB2. The examples for this statement stay the same. 38.5.21 UPDATE The searched UPDATE syntax diagram is changed to: >>-UPDATE----+-table-name-------------------+-------------------> +-view-name--------------------+ '-ONLY--(--+-table-name-+---)--' '-view-name--' >-----+---------------------------+-----------------------------> | .-AS-. | '-+----+--correlation-name--' >-----SET--| assignment-clause |--------------------------------> >-----+--------------------------+---+---------------+--------->< '-WHERE--search-condition--' '-WITH--+-RR-+--' +-RS-+ +-CS-+ '-UR-' Add the following to the description section: WITH Specifies the isolation level at which the UPDATE statement is executed. RR Repeatable Read RS Read Stability CS Cursor Stability UR Uncommitted Read The default isolation level of the statement is the isolation level of the package in which the statement is bound. ------------------------------------------------------------------------ 38.6 Chapter 7. SQL Procedures now called Chapter 7. SQL Control Statements Control statements are SQL statements that allow SQL to be used in a manner similar to writing a program in a structured programming language. SQL control statements can be used in the body of a routine, trigger or a dynamic compound statement. This chapter contains the syntax and descriptions of the supported SQL control statements, along with the SQL-procedure-statement. 38.6.1 SQL Procedure Statement The SQL Procedure Statement information changes to the following: SQL Procedure Statement This chapter contains syntax diagrams, semantic descriptions, rules, and examples of the use of the statements that constitute the procedure body of an SQL routine, trigger, or dynamic compound statement. Syntax >>-+---------+---+-| SQL-control-statement |-+----------------->< '-label:--' '-| SQL-statement |---------' SQL-control-statement (1) |---+-ALLOCATE CURSOR statement---------+-----------------------| | (1) | +-assignment statement--------------+ | (1) | +-ASSOCIATE LOCATORS statement------+ | (1) | +-CASE statement--------------------+ | (2) | +-dynamic-compound statement--------+ +-FOR statement---------------------+ +-GET DIAGNOSTICS statement---------+ | (1) | +-GOTO statement--------------------+ +-IF statement----------------------+ +-ITERATE statement-----------------+ +-LEAVE statement-------------------+ | (1) | +-LOOP statement--------------------+ | (1) | +-procedure-compound statement------+ | (1) | +-REPEAT statement------------------+ | (1) | +-RESIGNAL statement----------------+ +-RETURN statement------------------+ +-SIGNAL statement------------------+ '-WHILE statement-------------------' Notes: 1. This statement is only supported in the scope of an SQL Procedure. 2. This statement is only supported within a trigger, SQL function, or SQL method. It must be the outermost statement. Description label: Specifies the label for an SQL procedure statement. The label must be unique within a list of SQL procedure statements, including any compound statements nested within the list. Note that compound statements that are not nested may use the same label. A list of SQL procedure statements is possible in a number of SQL control statements. In the context of a trigger, an SQL function or method, or a dynamic compound statement, only the dynamic compound statement, the FOR statement and the WHILE statement may be labeled. SQL-statement In the body of an SQL procedure, all executable SQL statements can be contained, with the exception of the following: o CONNECT o CREATE any object other than indexes, tables, or views o DESCRIBE o DISCONNECT o DROP any object other than indexes, tables, or views o FLUSH EVENT MONITOR o REFRESH TABLE o RELEASE (connection only) o RENAME TABLE o RENAME TABLESPACE o REVOKE o SET CONNECTION o SET INTEGRITY Notes: You may include CALL statements within an SQL procedure body, but these CALL statements can only call another SQL procedure or a C procedure. CALL statements within an SQL procedure body cannot call other types of stored procedures. 38.6.2 FOR FOR The FOR statement executes a statement or group of statements for each row of a table. Syntax >>-+---------+---FOR--for-loop-name--AS-------------------------> '-label:--' >-----+-------------------------------+--select-statement---DO--> | (1) | '-cursor-name--CURSOR FOR-------' .-------------------------------. V | >--------SQL-procedure-statement--;---+--END FOR----+--------+->< '-label--' Notes: 1. This option can only be used in the context of an SQL Procedure. Description label Specifies the label for the FOR statement. If the beginning label is specified, that label can be used in LEAVE and ITERATE statements. If the ending label is specified, it must be the same as the beginning label. for-loop-name Specifies a label for the implicit compound statement generated to implement the FOR statement. It follows the rules for the label of a compound statement except that it cannot be used with and ITERATE or LEAVE statement within the FOR statement. The for-loop-name is used to qualify the column names returned by the specified select-statement. cursor-name Names the cursor that is used to select rows from the result table from the SELECT statement. If not specified, DB2 generates a unique cursor name. select-statement Specifies the SELECT statement of the cursor. All columns in the select list must have a name and there cannot be two columns with the same name. In a trigger, function, method, or dynamic compound statement, the select-statement must consist of only a fullselect with optional common table expressions. SQL-procedure-statement Specifies a statement (or statements) to be invoked for each row of the table. Rules * The select list must consist of unique column names and the table specified in the select list must exist when the procedure is created, or it must be a table created in a previous SQL procedure statement. * The cursor specified in a for-statement cannot be referenced outside the for-statement and cannot be specified in an OPEN, FETCH, or CLOSE statement. Examples In the following example, the for-statement is used to iterate over the entire employee table. For each row in the table, the SQL variable fullname is set to the last name of the employee, followed by a comma, the first name, a blank space, and the middle initial. Each value for fullname is inserted into table tnames. BEGIN DECLARE fullname CHAR(40); FOR vl AS SELECT firstnme, midinit, lastname FROM employee DO SET fullname = lastname || ',' || firstnme ||' ' || midinit; INSERT INTO tnames VALUE (fullname); END FOR END 38.6.3 Compound Statement changes to Compound Statement (Procedure) A procedure compound statement groups other statements together in an SQL procedure. You can declare SQL variables, cursors, and condition handlers within a compound statement. The syntax diagram now has a title: procedure-compound-statement. .-NOT ATOMIC--. >>-+---------+--BEGIN----+-------------+------------------------> '-label:--' '-ATOMIC------' >-----+-----------------------------------------------+---------> | .-----------------------------------------. | | V | | '-----+-| SQL-variable-declaration |-+---;---+--' +-| condition-declaration |----+ '-| return-codes-declaration |-' >-----+--------------------------------------+------------------> | .--------------------------------. | | V | | '----| statement-declaration |--;---+--' >-----+-------------------------------------+-------------------> | .-------------------------------. | | V | | '----DECLARE-CURSOR-statement--;---+--' >-----+------------------------------------+--------------------> | .------------------------------. | | V | | '----| handler-declaration |--;---+--' .-------------------------------. V | >--------SQL-procedure-statement--;---+---END--+--------+------>< '-label--' SQL-variable-declaration .-,--------------------. V | |---DECLARE-------SQL-variable-name---+-------------------------> .-DEFAULT NULL-------. >-----+-data-type----+--------------------+-+-------------------| | '-DEFAULT--constant--' | '-RESULT_SET_LOCATOR--VARYING---------' condition-declaration |---DECLARE--condition-name--CONDITION--FOR---------------------> .-VALUE-. .-SQLSTATE--+-------+---. >----+-----------------------+---string-constant----------------| statement-declaration .-,-----------------. V | |---DECLARE-----statement-name---+---STATEMENT------------------| return-codes-declaration |---DECLARE----+-SQLSTATE--CHAR (5)--+---+--------------------+-| '-SQLCODE--INTEGER----' '-DEFAULT--constant--' handler-declaration |---DECLARE----+-CONTINUE-+---HANDLER--FOR----------------------> +-EXIT-----+ '-UNDO-----' .-,-----------------------------------. V .-VALUE-. | >---------+-SQLSTATE--+-------+--string--+--+-------------------> +-condition-name---------------+ +-SQLEXCEPTION-----------------+ +-SQLWARNING-------------------+ '-NOT FOUND--------------------' >----SQL-procedure-statement------------------------------------| statement-declaration A statement-declaration declares a list of one or more names that are local to the compound statement. A statement name cannot be the same as another statement name within the same compound statement. 38.6.4 RETURN RETURN The RETURN statement is used to return from the routine. For SQL functions or methods, it returns the result of the function or method. For an SQL procedure, it optionally returns an integer status value. Syntax >>-RETURN--+---------------------------------------------------------+-> +-expression----------------------------------------------+ +-NULL----------------------------------------------------+ '-+---------------------------------------+---fullselect--' | .-,--------------------------. | | V | | '-WITH-----common-table-expression---+--' >-------------------------------------------------------------->< Description expression Specifies a value that is returned from the routine: o If the routine is a function or method, one of expression, NULL, or fullselect must be specified (SQLSTATE 42630) and the data type of the result must be assignable to the RETURNS type of the routine (SQLSTATE 42866). o A scalar expression (other than a scalar fullselect) cannot be specified for a table function (SQLSTATE 428F1). o If the routine is a procedure, the data type of expression must be INTEGER (SQLSTATE 428E2). A procedure cannot return NULL or a fullselect. NULL Specifies that the function or method returns a null value of the data type defined in the RETURNS clause. NULL cannot be specified for a RETURN from a procedure. WITH common-table-expression Defines a common table expression for use with the fullselect that follows. fullselect Specifies the row or rows to be returned for the function. The number of columns in the fullselect must match the number of columns in the function result (SQLSTATE 42811). In addition, the static column types of the fullselect must be assignable to the declared column types of the function result, using the rules for assignment to columns (SQLSTATE 42866). The fullselect cannot be specified for a RETURN from a procedure. If the routine is a scalar function or method, then the fullselect must return one column (SQLSTATE 42823) and, at most, one row (SQLSTATE 21000). If the routine is a row function, it must return, at most, one row (SQLSTATE 21505). If the routine is a table function, it can return zero or more rows with one or more columns. Rules * The execution of an SQL function or method must end with a RETURN (SQLSTATE 42632). * In an SQL table or row function using a dynamic-compound-statement, the only RETURN statement allowed is the one at the end of the compound statement (SQLSTATE 429BD). Version * When a value is returned from a procedure, the caller may access the value using: o the GET DIAGNOSTICS statement to retrieve the RETURN_STATUS when the SQL procedure was called from another SQL procedure o the parameter bound for the return value parameter marker in the escape clause CALL syntax (?=CALL...) in a CLI application o directly from the SQLCA returned from processing the CALL of an SQL procedure by retrieving the value of SQLERRD[0] when the SQLCODE is not less than zero (assume a value of -1 when SQLCODE is less than zero). Examples Use a RETURN statement to return from an SQL stored procedure with a status value of zero if successful, and -200 if not. BEGIN ... GOTO FAIL ... SUCCESS: RETURN 0 FAIL: RETURN -200 END 38.6.5 SIGNAL The SIGNAL SQLSTATE Statement is no longer used, in favor of this usage. SIGNAL The SIGNAL statement is used to signal an error or warning condition. It causes an error or warning to be returned with the specified SQLSTATE, along with optional message text. Syntax .-VALUE-. >>-SIGNAL----+-SQLSTATE--+-------+--sqlstate-string-constant--+-> '-condition-name---------------------------------' >-----+--------------------------------------------------------+->< +-SET--MESSAGE_TEXT-- = --+-variable-name--------------+-+ | '-diagnostic-string-constant-' | | (1) | '-(--diagnostic-string--)--------------------------------' Notes: 1. This option is only provided within the scope of a CREATE TRIGGER statement for compatibility with older versions of DB2. Description SQLSTATE VALUE sqlstate-string-constant The specified string constant represents an SQLSTATE. It must be a character string constant with exactly 5 characters that follow the rules for SQLSTATEs: o Each character must be from the set of digits ('0' through '9') or non-accented upper case letters ('A' through 'Z'). o The SQLSTATE class (first two characters) cannot be '00', since this represents successful completion. In the context of either a dynamic compound statement, trigger, SQL function, or SQL method, the following rules must also be applied: o The SQLSTATE class (first two characters) cannot be '01' or '02', since these are not error classes. o If the SQLSTATE class starts with the numbers '0' through '6' or the letters 'A' through 'H', then the subclass (the last three characters) must start with a letter in the range of 'I' through 'Z'. o If the SQLSTATE class starts with the numbers '7', '8', '9', or the letters 'I' through 'Z', then the subclass can be any of '0' through '9' or 'A' through 'Z'. If the SQLSTATE does not conform to these rules, an error is raised (SQLSTATE 428B3). condition-name Specifies the name of the condition. The condition name must be unique within the procedure and can only be referenced within the compound statement in which it is declared. SET MESSAGE_TEXT= Specifies a string that describes the error or warning. The string is returned in the SQLERRMC field of the SQLCA. If the actual string is longer than 70 bytes, it is truncated without warning. This clause can only be specified if a SQLSTATE or condition-name is also specified (SQLSTATE 42601). variable-name Identifies an SQL variable that must be declared within the compound statement. The SQL variable must be defined as a CHAR or VARCHAR data type. diagnostic-string-constant Specifies a character string constant that contains the message text. diagnostic-string An expression with a type of CHAR or VARCHAR that returns a character string of up to 70 bytes to describe the error condition. If the string is longer than 70 bytes, it will be truncated. This option is only provided within the scope of a CREATE TRIGGER statement, for compatibility with older versions of DB2. Regular use is not recommended. Version * If a SIGNAL statement is issued, the SQLCODE that is assigned is: +438 if the SQLSTATE begins with '01' or '02' -438 otherwise * If the SQLSTATE or condition indicates that an exception (SQLSTATE class other than '01' or '02') is signaled: o Then the exception is handled and control is transferred to a handler, provided that a handler exists in the same compound statement (or an outer compound statement) as the signal statement, and the compound statement contains a handler for the specified SQLSTATE, condition-name, or SQLEXCEPTION; o If the exception cannot be handled, then control is immediately returned to the end of the compound statement. * If the SQLSTATE or condition indicates that a warning (SQLSTATE class '01') or not found condition (SQLSTATE class '02') is signaled: o Then the warning or not found condition is handled and control is transferred to a handler, provided that a handler exists in the same compound statement (or an outer compound statement) as the signal statement, and the compound statement contains a handler for the specified SQLSTATE, condition-name, SQLWARNING (if the SQLSTATE class is '01'), or NOT FOUND (if the SQLSTATE class is '02'); o If the warning cannot be handled, then processing continues with the next statement. * SQLSTATE values are comprised of a two-character class code value, followed by a three-character subclass code value. Class code values represent classes of successful and unsuccessful execution conditions. Any valid SQLSTATE value can be used in the SIGNAL statement. However, it is recommended that programmers define new SQLSTATEs based on ranges reserved for applications. This prevents the unintentional use of an SQLSTATE value that might be defined by the database manager in a future release. o SQLSTATE classes that begin with the characters '7' through '9', or 'I' through 'Z' may be defined. Within these classes, any subclass may be defined. o SQLSTATE classes that begin with the characters '0' through '6', or 'A' through 'H' are reserved for the database manager. Within these classes, subclasses that begin with the characters '0' through 'H' are reserved for the database manager. Subclasses that begin with the characters 'I' through 'Z' may be defined. Examples An SQL procedure for an order system that signals an application error when a customer number is not known to the application. The ORDERS table includes a foreign key to the CUSTOMER table, requiring that the CUSTNO exist before an order can be inserted. CREATE PROCEDURE SUBMIT_ORDER (IN ONUM INTEGER, IN CNUM INTEGER, IN PNUM INTEGER, IN QNUM INTEGER) SPECIFIC SUBMIT_ORDER MODIFIES SQL DATA LANGUAGE SQL BEGIN DECLARE EXIT HANDLER FOR SQLSTATE VALUE '23503' SIGNAL SQLSTATE '75002' SET MESSAGE_TEXT = 'Customer number is not known'; INSERT INTO ORDERS (ORDERNO, CUSTNO, PARTNO, QUANTITY) VALUES (ONUM, CNUM, PNUM, QNUM); END ------------------------------------------------------------------------ 38.7 Appendix A. SQL Limits There is a change to Table 33, Database Manager Limits. With the registry variable DB2_INDEX_2BYTEVARLEN set to ON, the longest variable index key part (in bytes) can now be greater than 255. ------------------------------------------------------------------------ 38.8 Appendix D. Catalog Views A new catalog view has been added: 38.8.1 SYSCAT.SEQUENCES The view SYSCAT.SEQUENCES is automatically generated for databases created with FixPak 3 or later. For databases created prior to FixPak 3, run the db2updv7 command in order to add the view to the database. See the Command Reference update in the Release Notes for details. This catalog view is updated during normal operation, in response to SQL data definition statements, environment routines, and certain utilities. Data in the catalog view is available through normal SQL query facilities. Columns have consistent names based on the type of objects that they describe. Table 30. Columns in SYSCAT.SEQUENCES Catalog View Column Name Data Type NullableDescription SEQSCHEMA VARCHAR(128) Schema of the sequence. SEQNAME VARCHAR(128) Sequence name (generated by DB2 for an identity column). DEFINER VARCHAR(128) Definer of the sequence. OWNER VARCHAR(128) Owner of the sequence. SEQID INTEGER Internal ID of the sequence. SEQTYPE CHAR(1) Sequence type S - Regular sequence INCREMENT DECIMAL(31,0) Increment value. START DECIMAL(31,0) Starting value. MAXVALUE DECIMAL(31,0) Yes Maximal value. MINVALUE DECIMAL(31,0) Minimum value. CYCLE CHAR(1) Whether cycling will occur when a boundary is reached: Y - cycling will occur N - cycling will not occur CACHE INTEGER Number of sequence values to preallocate in memory for faster access. 0 indicates that values are not preallocated. ORDER CHAR(1) Whether or not the sequence numbers must be generated in order of request: Y - sequence numbers must be generated in order of request N - sequence numbers are not required to be generated in order of request DATATYPEID INTEGER For built-in types, the internal ID of the built-in type. For distinct types, the internal ID of the distinct type. SOURCETYPEID INTEGER For a built-in type, this has a value of 0. For a distinct type, this is the internal ID of the built-in type that is the source type for the distinct type. CREATE_TIME TIMESTAMP Time when the sequence was created. ALTER_TIME TIMESTAMP Time when the last ALTER SEQUENCE statement was executed for this sequence. PRECISION SMALLINT The precision defined for a sequence with a decimal or numeric type. Values are: 5 for a SMALLINT, 10 for INTEGER, and 19 for BIGINT. ORIGIN CHAR(1) Sequence Origin U - User generated sequence S - System generated sequence REMARKS VARCHAR(254) Yes User supplied comments, or null. ------------------------------------------------------------------------ IBM DB2 暖酨獛鑅齗 ------------------------------------------------------------------------ 39.1 Java 1.2 儭暖酨獛鑅齗 DB2 暖酨獛鑅齗儭 Java 暖酨獛媥 Java 1.2 閱耶 駙鴉耍暖酨獛鑅 齗儭嵢砰躨耍愩詹鏶砰碉鏶鉒y耍詻媥蛈妒O Java 1.2 戍 bi-di 儭耶 殛儭骷擋腺 Windows NT 樹鬧椴洄耶 長柅暖酨獛鑅齗ル碉媥 Java 1.2 戍閱耍詻鄧繐灁揅壧 Java 1.2耶 揅壧 Java 1.2胃 1. JDK 1.2.2 彀 DB2 UDB CD 戍 DB2\bidi\NT 到柰耶 ibm-inst-n122p-win32-x86.exe 板揅壧獛搨耍 ibm-jdk-n122p-win32-x86.exe 板 JDK 牁鷫耶 醨譇盎獞忘柼戍皈到珫耍 潒雚欑到鸉揅 壧獛搨耶 2. 醨擂揅壧彀 \java\Java12 柰鬙揅壧 JDK/JRE耍詰鶔 \java\Java12 歃到戍巰戠耶 薿繐醳胃繐醨 \java\Java12 碉 \Java12 Vc耶 \Java12 板 DB2 揅壧戍柜倌鰣A虋遮霄服 Java 1.2 戍 JDBC 儭耶 ------------------------------------------------------------------------ 39.2 DB2 暖酨獛戍茗抑 礔繐媥 UNIX 碉 Windows 樹鬧戍 Java 碉 C 暖酨獛祌茗抑柮耍 巷揅壧 IBM Distributed Debugger耶IBM Distributed Debugger 養腺 Visual Age for Java Professional Edition CD 洇灥隳耶齗雚膼鷑u彀 Windows 樹鬧柼鸉耶儭 再齗樹鬧霄服胃Windows耑AIX 碉 Solaris耶 巷媥袚x酨獛鑅齗洇戍 SQL 柮耍長 Windows 碉 UNIX 樹鬧劑抑碉茗抑 SQL 暖酨獛耶 殛潲妄儭 OS/2 樹鬧耶嗀 DB2 for OS/390 暖酨獛鑅齗戍欏僝鬞耍 巷s鼪柰媴 霠胃 http://www-4.ibm.com/software/data/db2/os390/spb/exciting 儵彀 OS/390 樹鬧灁 SQL 獛耍柛澱鏺嗀 OS/390 R1 恙戍 IBM C/C++ 茨饎 泚爩耶OS/390 R1 戍 IBM C/C++ 茨饎泚爩祌欏僝鬞耍巷s鼪柰媴霠胃 http://www.ibm.com/software/ad/c390/pt/ ------------------------------------------------------------------------ 39.3 彀 Windows耑OS/2 詰 UNIX 樹鬧柼礤熪 SQL 獛 彀鞮爦媥袚x酨獛鑅齗腺 Windows耑OS/2 詰 UNIX 定柼鐀顟廇礤熪 SQL 獛祌容耍 澱鏺歧呃 SQL 獛戍再齗耶嗀愩摃歧呃 SQL 獛戍再齗耍巷囓酀 34.3, 4 礤熪 Java Applets 碉睦擋獛搨耶 ------------------------------------------------------------------------ 39.4 彀 Solaris 樹鬧媥 DB2 暖酨獛鑅齗 儵彀 Solaris 樹鬧媥 DB2 暖酨獛鑅齗胃 1. 柰碉揅壧 JDK 1.1.8耶 椻 JavaSoft 霠柰 JDK 1.1.8耶 2. ]肄 JAVA_HOME 揅壧 JDK 戍鑅耶 3. ]肄 DB2 JDK11_PATH 揅壧 JDK 戍到柰耶 儵]肄 DB2 JDK11_PATH耍巷媥豜U媴銻胃 DB2 UPDATE DBM CFG USING JDK11_PATH. ------------------------------------------------------------------------ 39.5 洄何齶ガ烈貙 * 容 Windows 98 虋儭 SQL 獛耶 * 腺 Java 暖酨獛耍JAR ID耑ю顢巰投烈妄巰投養霄鰗唏 ASCII 戠祅耶 * 彀 AS/400 柼柰媴 V4R4 PTFs |矧擋 OS/400 V4R4胃 - SF59674 - SF59878 * 暖酨獛暖酨腺定耍爩 FOR MIXED DATA 詰 FOR SBCS DATA 歃ю悚戍暖 酨獛囓耍 餪|ず彀哀齗甇戍絛俄珫耶 * 容戍齶ガ板 Java 絛俄板墨定跌灥鄏妣C 跌灥獛搨俄戍祗腦|髊{ 搌幏戍搨耶 o|洋T彀唏 ASCII 戠俄贄柼媥 DB2 暖酨獛鑅齗戍媥 舌耍 廅長醋謰戍雚膼鰳P再齗媥豜嵥戍戠俄贄耶 ------------------------------------------------------------------------ 39.6 彀甥珫砰躨蓔U媥 DB2 暖酨獛鑅齗 彀甥珫砰躨蓔U媥 JDK 詰 JRE 1.1.8 |熪擁齶ガ耶暖酨獛鑅齗獛搨 戍徦軝倔鐨 (霄鰗閱式耑哀齗戠耑鬞昔瞉瞉) 潲妄譂ず耶鬙讘板 font.properties.zh_TW 耍擂|彀柰媴到珫胃 sqllib/java/jdk/lib sqllib/java/jre/lib 鶔胃 monospaced.0=\u7d30\u660e\u9ad4,CHINESEBIG5_CHARSET,NEED_CONVERTED 長胃 monospaced.0=Courier New,ANSI_CHARSET ------------------------------------------------------------------------ 39.7 UNIX (AIX耑Sun Solaris耑Linux) 揅壧烈暖酨獛鑅齗 彀 Sun Solaris 揅壧耍礔鞮媥 Java Development Kit 詰 Runtime 椴板彀 AIX 柼揅壧 UDB 戍搨耍鞮餪澱鏺醨 JAVA_HOME ]肄洄揅壧 Java 戍 尚珫 (柛餪板欑到鏺鰗 /bin 烈 /lib 到)耶暖酨獛鑅齗冀儭 Linux 鏼~ 鑶蚼A椷養彀洄儭戍樹鬧柼鑅詰鸉 DB2 UDB for Linux 鑶豜W戍暖酨獛耶 儭戍樹鬧霄服擋腺雚膼鬫 AIX耑Solaris 瓬 NT耍烈擋腺再齗戍 Aix耑Solaris 耑NT耑Linux耑OS/2耑HP-UX 瓬 NUMA-Q耶 ------------------------------------------------------------------------ 39.8 鑅 OS/390 戍 SQL 暖酨獛 DB2 暖酨獛鑅齗儭彀 OS390 V7 再齗戍 DB2 UDB 柼鑅 SQL 暖酨獛耶 ------------------------------------------------------------------------ 39.9 SQL 暖酨獛 {彀耍SQL 暖酨獛彀 Windows 瓬 UNIX 樹鬧柼戍耍洄托鼪鬷幏 DB2 暖酨獛 鑅齗珫耶 彀唏j塒 (埔戍) SQL 獛耍KEEPDARI 定扯z]肄 醳養]肄長 YES 詰 NO胚椷板耍彀j塒 (唏埔戍) SQL 獛耍澱鏺]肄長YES (w]襏)耶 巷囓酀暖酨獛鑅齗戍祗腦耍鄧灥隳嗀媥酘べX齗戍醋鬞耶 ------------------------------------------------------------------------ 39.10 鋇 Java 暖酨獛 DB2 暖酨獛鑅齗{彀儭鋇 Java 暖酨獛耶 礔繐鋇 Java 暖酨獛胃 1. 彀暖酨獛蘮柼柜柰挽k耍柜柰赴鋇 Java 暖酨獛赳鄧礤鼖 赴鋇 Java 暖酨獛赳甇耶 2. 灥鞮繐鋇戍暖酨獛耍醨擂謰齍赴洄灥戍暖酨獛赳托耶 3. 灥鞮Q繐戍醳祌耍巷柜柰赴俊肄赳耶 ------------------------------------------------------------------------ 39.11 彀 OS/390 柼麰枵暖酨獛 黳鸉 OS/390 戍 DB2 暖酨獛鑅齗次劑 5 瓬鶔s次劑耍 愩刖鞮媥蚹F黽 枵暖酨獛虋潲 WLM 膍醳耍 屑擁戍獛搨俄|霄鰗鄧柰戍戠胃NO WLM ENVIRONMENT耶 o獛搨俄|鼒x酨獛彀 SPAS 鶐繾珫稗w齔鸉耶 殛儘獛 搨鬙讘酨彀腺 DB2 暖酨獛鑅齗次劑 6 瓬鶔s次劑珫戍齶ガ耶 鄧儘獛搨詻擁戍獛搨俄ず愩柰胃 CREATE PROCEDURE SYSPROC.Proc2 ( ) RESULT SETS 1 LANGUAGE SQL MODIFIES SQL DATA COLLID TEST NO WLM ENVIRONMENT ASUTIME NO LIMIT RUN OPTIONS 'NOTEST(ALL,*,,VADTCPIP&9.112.14.91:*)' ------------------------------------------------------------------- -- SQL Stored Procedure ------------------------------------------------------------------- P1: BEGIN -- Declare cursor DECLARE cursor1 CURSOR WITH RETURN FOR SELECT * FROM SYSIBM.SYSPROCEDURES; -- Cursor left open for client application OPEN cursor1; END P1 ------------------------------------------------------------------------ 39.12 彀泚鏼霠再齗珫]肄 SQL 暖酨獛戍鑅醳 彀 UNIX 瓬 Windows 樹鬧柼媥 DB2 暖酨獛鑅齗耍養鄧長詻嗀戍 SQL 暖酨獛 ]肄鑅醳耶 o鑅醳霄鰗柰媴戍哀鏵瓬容鑅哀鏵 DB2 熡韄胃 * DB2_SQLROUTINE_PREPOPTS * DB2_SQLROUTINE_COMPILER_PATH * DB2_SQLROUTINE_COMPILE_COMMAND * DB2_SQLROUTINE_KEEP_FILES 潒養鄧媥 db2set 銻]肄o熡韄耍 媥袚x酨獛鑅齗養舫酨灥 定再齗鄧熪鋇銻詰欘耍 潒薿s鼖韥再齗鶔擁戍茫臡耶 礔繐礤鼖赴SQL 暖酨獛鑅醳赳甇耍巷彀鄾蘞浀+浀材定s哎柜柰 挽k耍 潒柜柰赴SQL 暖酨獛鑅醳赳耶 嗀]肄o醳戍欏僝鬞耍 巷囓酀 DB2 暖酨獛祗腦耶 ------------------------------------------------------------------------ 39.13 椻韥駻s OS/390 柼暖酨獛鑅戍 WLM 鶐繾 ♂z鐀顟廇彀 OS/390 柼鑅醨彀 WLM 鸉戍暖酨獛祌耍DB2 暖酨獛鑅齗醨 椻韥駻s WLM 鶐繾耶 ------------------------------------------------------------------------ 39.14 彀 OS/390 礤熪 Java 暖酨獛 赴DB2 暖酨獛鑅齗赳儭 DB2 UDB for OS/390 次劑 6 (詰鄧柼) 戍 Java 暖酨 獛戍礤熪耶鞮養鄧擔s戍詰鶔{酨戍 Java 暖酨獛耶 ------------------------------------------------------------------------ 39.15 長 MQ Series 烈 OLE DB 鑅 DB2 式媥蛈瑏w霿閱 (UDF) 赴DB2 暖酨獛鑅齗赳虪F鄧灨饎鞮擔 MQSeries 烈 OLE DB 戍式 UDF耶 鞮養鄧媥蚼u擔 OLE DB 式 UDF赳F酨灥 OLE DB 虪舌耶殛F|擔 OLE 式 UDF 烈擋戍式照耶鞮養鄧媥蚼u擔 MQSeries赳式 UDF F鉈 擔爩嗀醳式照戍式 UDF耍 鄧酨灥 MQSeries 鬞昔虋吐肄癸膌搨珫戍 耶 ------------------------------------------------------------------------ Unicode 鶔s ------------------------------------------------------------------------ 40.1 媽祊 Unicode 癸板岩柞戠祅瓬戠貘曄yq擋戍戠祅哀俄妄耶 Unicode 板擋愫譇 祅潁鄏▽柜譇戠祅耶 擂肄霿柅柜柜癚戍搨僔N愫砰躨戠哀俄耍 嵅o戠 養彀舫繾黈耍虋挩彄@n戍嗜耶 Unicode 虪鄧柰哀俄妄耶w]戍哀俄妄板 UTF-16 (16 祅戍哀俄搨)耶 UCS-2 板 UTF-16 戍氡鐖耍 擂媥釱譇祅潁鄏▽柜譇戠祅耶UCS-2 q鎈Q砸養長 曄y詫戍戠俄贄耍 擂爦式容詻嗀祅槷r俄贄瓬祅槷r俄贄戍曄倌茫 戠祅耶UCS-2 彀 IBM 珫銳長戠俄贄 1200耶 駙柜譇 Unicode 哀俄搨板 UTF-8耍擂板祅殢嵢戍耍 遮板Q]繣閞堉{嗀 ASCII 鑶蛈杜媥蚼CUTF-8 媥豜肄戍祅 (q鎈長 1-3耍嗀板 4) 鈮x酨 臠譇戠祅耶 潲戍 ASCII 戠祅餪暖酨長祅摮C詻嗀擂戠祅餪媥軝h譇祅 潁鈮x酨耶q鎈 UTF-8 養祼擙D]繣長愫祅槷r俄贄戍戠俄馰長趁銬戍 ASCII 耶 UTF-8 彀 IBM 珫銳長戠俄贄 1208耶 睦擋獛搨繐楯洌彀鱦戠俄贄耑UCS-2 碉 UTF-8 祌繾鷽黈戍茫臡耍 o板 薿繐戍耶蜙p耍20 譇戠祅彀 UCS-2 珫茫繐蘠鬷戍 40 譇祅摮A UTF-8 屑祊腺 20 60 譇祅樕蘟 (樺媥蛈抖r俄贄瓬戠椴肄)耶 40.1.1 DB2 Unicode 定瓬睦擋獛搨 媥 UTF-8 戠俄鐖擔戍 Unix耑Windows 詰 OS/2 DB2 Universal 定 養擋鈮x 酨 UCS-2 瓬 UTF-8 搨戍耶 o皇戍定養Q長 Unicode 定耶 SQL CHAR 板媥 UTF-8 鄎s俄戍耍椴 SQL GRAPHIC 板媥 UCS-2 鄎s俄 戍耶 o養鄧虎☆Ob CHAR 托暖酨祅 (SBCS) 瓬愫祅 (MBCS) 戠俄鐖耍 鄧瓬彀 GRAPHIC 托暖酨祅 (DBCS) 戠俄鐖耶 睦擋獛搨戍戠俄贄養碉 DB2 擋鈮x酨戍戠俄贄柜皇耶 彀唏 Unicode 定 珫耍彀戠俄贄柜皇耍 定扯z獛搨|黈雚膼龢軝再齗祌繾鷫戍戠祅瓬 灉 (pure DBCS) 耶 彀 Unicode 定珫耍雚膼攥r俄贄烈 UTF-8 祌繾戍戠祅 黈|椻韥墨定扯z獛搨僤鬾耍 椷板詻嗀戍徦 (UCS-2) 鑌L 黈餪彀雚膼龢軝再齗祌繾鷫耶 7. 定扯z獛搨詻鸉戍戠俄贄黈 [定扯z獛搨詻鸉戍戠俄贄黈] : 1. ∥s鼪 Unicode 定耍愩刖睦擋獛搨]肄 DB2CODEPAGE=1208耍 屑鱦戠 俄贄板 UTF-8耍詻鄧茫繐鷽戠俄贄黈耶 2. +ws鼪 Unicode 定耍CLI 睦擋獛搨柛養醨戠祅↓@徦釬鼪 搌耍 鄧瓬醨徦釬↓@戠祅耶 睦擋獛搨板養鄧肄 UTF-8 戠俄贄耍鄧鋇擂醨擋 UCS-2 僳鷫瓬鼪搌徦釬耍 虋擋 UTF-8 僳鷫瓬鼪搌戠祅耶 殛睦擋獛搨戠俄贄骷儭 Unicode 定耶 媥 Unicode 繐楯洌戍擂醳長胃 1. 定戠俄贄板彀擔定戍謼讘肄戍耍 遮擂戍襏w]|雚鏼~鑶蚽y躨 (詰戠俄贄) 僓M肄耶 CODESET 瓬 TERRITORY 戠養擋鉊ㄚT廇擔 Unicode DB2 定耶 蜙p胃 CREATE DATABASE unidb USING CODESET UTF-8 TERRITORY US 2. 睦擋獛搨戠俄贄柛w]長鱦戠俄贄耍椷板o養擋柰媴妄墨 UTF-8 僝m黈胃 o 媥軝銻醨睦擋獛搨戠俄贄]肄長 UTF-8 (1208)胃 db2set DB2CODEPAGE=1208 o 腺 CLI/ODBC 睦擋獛搨耍養碰駒 SQLSetConnectAttr() 瓬]肄 SQL_ATTR_ANSI_APP 長 SQL_AA_FALSE耶 w]]肄板 SQL_AA_TRUE耶 3. GRAPHIC 托珫戍腺臠譇 Unicode 戠祅|媥酓鬷戍譇祅摮A 椴 CHAR 托珫戍腺臠譇 Unicode 戠祅|媥 1 3 譇祅摮C 彀 GRAPHIC 托戠祅貘戍 SQL 貙q鎈板 CHAR 托戠祅戍柜鞍耍 椷彀祅 貘板柜皇戍耶 CHAR 托戍瘐j戠祅板 254耶 GRAPHIC 托戍瘐j戠祅 板 127耶 礔茫欏僝鬞耍巷囓酀 SQL Reference "Functions" 躒珫戍 MAX耶 4. 徦豜戠擋 G 戠藃鉒P戠祅戠鱦顢耶 蜙p胃 SELECT * FROM mytable WHERE mychar = 'utf-8 data' AND mygraphic = G'ucs-2 data' : 腺 Unicode 定餪茫繐 G 戠藃耶 巷囓酀"Literals in Unicode Databases"耍灥隳鏊鬞瓬鶔s戍儭耶 5. 儭 CLI/ODBC 碉 JDBC 睦擋獛搨嵥腺儭洇鰗戍睦擋獛搨耶 礔茫 CLI/ODBC 儭戍虎鬞耍巷囓酀40.3, "CLI Guide and Reference(潲珫次)"耶 6. UCS-2 戍祅槷蘻養廅樹鬧椴鶩C DB2 彀洇酊O媥 big-endian 搨耶 40.1.2 麩鶔s 殛麩鶔s柰媴嗀彀 DB2 次劑 7.1 珫媥 Unicode 戍鬞胃 * SQL Reference: Chapter 3 Language Elements Chapter 4 Functions * CLI Guide and Reference: Chapter 3. Using Advanced Features Appendix C. DB2 CLI and ODBC * Data Movement Utilities Guide and Reference, Appendix C. Export/Import/Load Utility File Formats 礔茫嗀彀 DB2 珫媥 Unicode 戍欏僝鬞耍巷囓 Administration Guide 戍 Appendix J. National Language Support (NLS)胃 "Unicode/UCS-2 and UTF-8 Support in DB2 UDB"耶 ------------------------------------------------------------------------ 40.2 SQL Reference(潲珫次) 40.2.1 Chapter 3 Language Elements 40.2.1.1 Promotion of Data Types In this section table 5 shows the precedence list for each data type. Please note: 1. For a Unicode database, the following are considered to be equivalent data types: o CHAR and GRAPHIC o VARCHAR and VARGRAPHIC o LONG VARCHAR and LONG VARGRAPHIC o CLOB and DBCLOB 2. In a Unicode database, it is possible to create functions where the only difference in the function signature is between equivalent CHAR and GRAPHIC data types, for example, foo(CHAR(8)) and foo(GRAPHIC(8)). We strongly recommend that you do not define such duplicate functions since migration to a future release will require one of them to be dropped before the migration will proceed. If such duplicate functions do exist, the choice of which one to invoke is determined by a two pass algorithm. The first pass attempts to find a match using the same algorithm as is used for resolving functions in a non-Unicode database. If no match is found, then a second pass will be done taking into account the following promotion precedence for CHAR and GRAPHIC strings: GRAPHIC-->CHAR-->VARGRAPHIC-->VARCHAR-->LONG VARGRAPHIC-->LONG VARCHAR-->DBCLOB-->CLOB 40.2.1.2 Casting Between Data Types The following entry has been added to the list introduced as: "The following casts involving distinct types are supported": * for a Unicode database, cast from a VARCHAR or VARGRAPHIC to distinct type DT with a source data type CHAR or GRAPHIC. The following are updates to Table 6. Supported Casts between Built-in Data Types. Only the affected rows of the table are included. Table 31. Supported Casts between Built-in Data Types L O N L G Target Data Type O V V N A A G R R V V G G G A A R R R D R R A A A B C C C C P P P C H H H L H H H L Source Data Type A A A O I I I O V R R R B C C C B CHAR Y Y Y Y Y1 Y1 - - VARCHAR Y Y Y Y Y1 Y1 - - LONGVARCHAR Y Y Y Y - - Y1 Y1 CLOB Y Y Y Y - - - Y1 GRAPHIC Y1 Y1 - - Y Y Y Y VARGRAPHIC Y1 Y1 - - Y Y Y Y LONGVARGRAPHIC - - Y1 Y1 Y Y Y Y DBCLOB - - - Y1 Y Y Y Y 1 Cast is only supported for Unicode databases. 40.2.1.3 Assignments and Comparisons Assignments and comparisons involving both character and graphic data are only supported when one of the strings is a literal. For function resolution, graphic literals and character literals will both match character and graphic function parameters. The following are updates to Table 7. Data Type Compatibility for Assignments and Comparisons. Only the affected rows of the table, and the new footnote 6, are included: Binary Decimal Floating CharacterGraphic Time- Binary Operands Integer Number Point String String Date Time stamp String UDT CharacterNo No No Yes Yes 6 1 1 1 No 3 2 String Graphic No No No Yes 6 Yes No No No No 2 String 6 Only supported for Unicode databases. String Assignments Storage Assignment The last paragraph of this sub-section is modified as follows: When a string is assigned to a fixed-length column and the length of the string is less than the length attribute of the target, the string is padded to the right with the necessary number of single-byte, double-byte, or UCS-22 blanks. The pad character is always a blank even for columns defined with the FOR BIT DATA attribute. Retrieval Assignment The third paragraph of this sub-section is modified as follows: When a character string is assigned to a fixed-length variable and the length of the string is less than the length attribute of the target, the string is padded to the right with the necessary number of single-byte, double-byte, or UCS-22 blanks. The pad character is always a blank even for strings defined with the FOR BIT DATA attribute. 2 UCS-2 defines several SPACE characters with different properties. For a Unicode database, the database manager always uses the ASCII SPACE at position x'0020' as UCS-2 blank. For an EUC database, the IDEOGRAPHIC SPACE at position x'3000' is used for padding GRAPHIC strings. Conversion Rules for String Assignments The following paragraph has been added to the end of this sub-section: For Unicode databases, character strings can be assigned to a graphic column, and graphic strings can be assigned to a character column. DBCS Considerations for Graphic String Assignments The first paragraph of this sub-section has been modified as follows: Graphic string assignments are processed in a manner analogous to that for character strings. For non-Unicode databases, graphic string data types are compatible only with other graphic string data types, and never with numeric, character string, or datetime data types. For Unicode databases, graphic string data types are compatible with character string data types. String Comparisons Conversion Rules for Comparison This sub-section has been modified as follows: When two strings are compared, one of the strings is first converted, if necessary, to the encoding scheme and/or code page of the other string. For details, see the "Rules for String Conversions" section of Chapter 3 Language Elements in the SQL Reference. 40.2.1.4 Rules for Result Data Types Character and Graphic Strings in a Unicode Database This is a new sub-section inserted after the sub-section "Graphic Strings". In a Unicode database, character strings and graphic strings are compatible. If one operand is... And the other operand The data type of the is... result is... GRAPHIC(x) CHAR(y) or GRAPHIC(y) GRAPHIC(z) where z = max(x,y) VARGRAPHIC(x) CHAR(y) or VARCHAR(y) VARGRAPHIC(z) where z = max(x,y) VARCHAR(x) GRAPHIC(y) or VARGRAPHIC(z) where z = VARGRAPHIC max(x,y) LONG VARGRAPHIC CHAR(y) or VARCHAR(y) LONG VARGRAPHIC or LONG VARCHAR LONG VARCHAR GRAPHIC(y) or LONG VARGRAPHIC VARGRAPHIC(y) DBCLOB(x) CHAR(y) or VARCHAR(y) DBCLOB(z) where z = or CLOB(y) max(x,y) DBCLOB(x) LONG VARCHAR DBCLOB(z) where z = max(x,16350) CLOB(x) GRAPHIC(y) or DBCLOB(z) where z = VARGRAPHIC(y) max(x,y) CLOB(x) LONG VARGRAPHIC DBCLOB(z) where z = max(x,16350) 40.2.1.5 Rules for String Conversions The third point has been added to the following list in this section: For each pair of code pages, the result is determined by the sequential application of the following rules: * If the code pages are equal, the result is that code page. * If either code page is BIT DATA (code page 0), the result code page is BIT DATA. * In a Unicode database, if one code page denotes data in an encoding scheme different from the other code page, the result is UCS-2 over UTF-8 (that is, the graphic data type over the character data type).1 * Otherwise, the result code page is determined by Table 8 of the "Rules for String Conversions" section of Chapter 3 Language Elements in the SQL Reference. An entry of 'first' in the table means the code page from the first operand is selected and an entry of 'second' means the code page from the second operand is selected. 1 In a non-Unicode database, conversion between different encoding schemes is not supported. 40.2.1.6 Expressions The following has been added: In a Unicode database, an expression that accepts a character or graphic string will accept any string types for which conversion is supported. With the Concatenation Operator The following has been added to the end of this sub-section: In a Unicode database, concatenation involving both character string operands and graphic string operands will first convert the character operands to graphic operands. Note that in a non-Unicode database, concatenation cannot involve both character and graphic operands. 40.2.1.7 Predicates The following entry has been added to the list introduced by the sentence: "The following rules apply to all types of predicates": * In a Unicode database, all predicates that accept a character or graphic string will accept any string types for which conversion is supported. 40.2.2 Chapter 4 Functions 40.2.2.1 Scalar Functions The following sentence has been added to the end of this section: In a Unicode database, all scalar functions that accept a character or graphic string will accept any string types for which conversion is supported. ------------------------------------------------------------------------ 40.3 CLI Guide and Reference(潲珫次) 40.3.1 Chapter 3. Using Advanced Features The following is a new section for this chapter. 40.3.1.1 Writing a DB2 CLI Unicode Application There are two main areas of support for DB2 CLI Unicode Applications: 1. The addition of a set of functions that can accept Unicode string arguments in place of ANSI string arguments. 2. The addition of new C and SQL data types to describe data as ANSI or Unicode data. The following sections provide more information for both of these areas. To be considered a Unicode application, the application must set the SQL_ATTR_ANSI_APP connection attribute to SQL_AA_FALSE, before a connection is made. This will ensure that CLI will connect as a Unicode client, and all Unicode data will be sent in either UTF-8 for CHAR data or UCS-2 for GRAPHIC data. Unicode Functions The following is a list of the ODBC API functions that support both Unicode (W) and ANSI (A) versions (the function name will have a W for Unicode): SQLBrowseConnect SQLForeignKeys SQLPrimaryKeys SQLColAttribute SQLGetConnectAttr SQLProcedureColumns SQLColAttributes SQLGetConnectOption SQLProcedures SQLColumnPrivileges SQLGetCursorName SQLSetConnectAttr SQLColumns SQLGetDescField SQLSetConnectOption SQLConnect SQLGetDescRec SQLSetCursorName SQLDataSources SQLGetDiagField SQLSetDescField SQLDescribeCol SQLGetDiagRec SQLSetStmtAttr SQLDriverConnect SQLGetInfo SQLSpecialColumns SQLDrivers SQLGetStmtAttr SQLStatistics SQLError SQLNativeSQL SQLTablePrivileges SQLExecDirect SQLPrepare SQLTables Unicode functions that always return, or take, string length arguments are passed as count-of-characters. For functions that return length information for server data, the display size and precision are described in number of characters. When the length (transfer size of the data) could refer to string or nonstring data, the length is described in octet lengths. For example, SQLGetInfoW will still take the length as count-of-bytes, but SQLExecDirectW will use count-of-characters. CLI will return result sets in either Unicode or ANSI, depending on the application's binding. If an application binds to SQL_C_CHAR, the driver will convert SQL_WCHAR data to SQL_CHAR. The driver manager maps SQL_C_WCHAR to SQL_C_CHAR for ANSI drivers but does no mapping for Unicode drivers. New datatypes and valid conversions There are two new CLI or ODBC defined data types, SQL_C_WCHAR and SQL_WCHAR. SQL_C_WCHAR indicates that the C buffer contains UCS-2 data. SQL_WCHAR indicates that a particular column or parameter marker contains Unicode data. For DB2 Unicode Servers, graphic columns will be described as SQL_WCHAR. Conversion will be allowed between SQL_C_WCHAR and SQL_CHAR, SQL_VARCHAR, SQL_LONGVARCHAR and SQL_CLOB, as well as between the graphic data types. Table 32. Supported Data Conversions S S Q Q L S S L _ Q Q _ C L L C S S _ _ _ _ Q Q T C C D S L L Y _ _ B S Q S _ _ P S S C B C S Q S S L S Q C C E Q Q L L L Q L S Q S Q _ Q L _ _ _ L L O O O L _ Q L Q L C L _ T T T _ S _ B B B _ C L _ L _ _ _ C Y Y I C Q C _ _ _ C _ _ C _ C T C _ P P M _ L _ L L L _ N C _ C _ I _ D E E E B _ D O O O B U _ W _ S N F O _ _ S I C B C C C I M C C L H Y L U D T T N _ C A A A G E H H O O I O B A I A A B H T T T I R A A N R N A L T M M R I A O O O N I SQL Data Type R R G T T T E E E P Y T R R R R T C BLOB X X D X CHAR D X X X X X X X X X X X X X CLOB D X X X DATE X X D X DBCLOB X X D X DECIMAL D X X X X X X X X X X DOUBLE X X X X X X D X X X FLOAT X X X X X X D X X X GRAPHIC X X D (Non-Unicode) GRAPHIC X X X X X X X X X X X X D X (Unicode) INTEGER X X D X X X X X X X LONG D X X VARCHAR LONG X X X D VARGRAPHIC (Non-Unicode) LONG X X X D VARGRAPHIC (Unicode) NUMERIC D X X X X X X X X REAL X X X X X D X X X SMALLINT X X X D X X X X X X BIGINT X X X X X X X X X D X TIME X X D X TIMESTAMP X X X X D VARCHAR D X X X X X X X X X X X X X VARGRAPHIC X X D (Non-Unicode) VARGRAPHIC X X X X X X X X X X X X D X (Unicode) Notes: D Conversion is supported. This is the default conversion for the SQL data type. X All IBM DBMSs support the conversion. blank No IBM DBMS supports the conversion. o Data is not converted to LOB Locator types, rather locators represent a data value, refer to Using Large Objects for more information. o SQL_C_NUMERIC is only available on 32-bit Windows operating systems. Obsolete Keyword/Patch Value Before Unicode applications were supported, applications that were written to work with single byte character data could be made to work with double byte graphic data by a series of cli ini file keywords, such as GRAPHIC=1,2 or 3, Patch2=7 etc. These workarounds presented graphic data as character data, and also affected the reported length of the data. These keywords are no longer required for Unicode applications, and in fact should not be used otherwise there could be serious side effects. If it is not known if a particular application is a Unicode application, we suggest you try without any of the keywords that affect the handling of graphic data. Literals in Unicode Databases In Non-Unicode databases, data in LONG VARGRAPHIC and LONG VARCHAR columns cannot be compared. Data in GRAPHIC/VARGRAPHIC and CHAR/VARCHAR columns can only be compared, or assigned to each other, using explicit cast functions since no implicit code page conversion is supported. This includes GRAPHIC/VARGRAPHIC and CHAR/VARCHAR literals where a GRAPHIC/VARGRAPHIC literal is differentiated from a CHAR/VARCHAR literal by a G prefix. For Unicode databases, casting between GRAPHIC/VARGRAPHIC and CHAR/VARCHAR literals is not required. Also, a G prefix is not required in front of a GRAPHIC/VARGRAPHIC literal. Provided at least one of the arguments is a literal, implicit conversions occur. This allows literals with or without the G prefix to be used within statements that use either SQLPrepareW() or SQLExecDirect(). Literals for LONG VARGRAPHICs still must have a G prefix. For more information, please see "Casting Between Data Types" in Chapter 3 Language Elements of the SQL Reference. New CLI Configuration Keywords The following three keywords have been added to avoid any extra overhead when Unicode applications connect to a database. 1. DisableUnicode Keyword Description: Disables the underlying support for Unicode. db2cli.ini Keyword Syntax: DisableUnicode = 0 | 1 Default Setting: 0 (false) DB2 CLI/ODBC Settings Tab: This keyword cannot be set using the CLI/ODBC Settings notebook. The db2cli.ini file must be modified directly to make use of this keyword. Usage Notes: With Unicode support enabled, and when called by a Unicode application, CLI will attempt to connect to the database using the best client codepage possible to ensure there is no unnecessary data loss due to codepage conversion. This may increase the connection time as codepages are exchanged, or may cause codepage conversions on the client that did not occur before this support was added. Setting this keyword to True will cause all Unicode data to be converted to the application's local codepage first, before the data is sent to the server. This can cause data loss for any data that cannot be represented in the local codepage. 2. ConnectCodepage Keyword Description: Specifies a specific codepage to use when connecting to the data source to avoid extra connection overhead. db2cli.ini Keyword Syntax: ConnectCodepage = 0 | 1 Default Setting: 0 DB2 CLI/ODBC Settings Tab: This keyword cannot be set using the CLI/ODBC Settings notebook. The db2cli.ini file must be modified directly to make use of this keyword. Usage Notes: Non-Unicode applications always connect to the database using the application's local codepage, or the DB2Codepage environment setting. By default, CLI will ensure that Unicode applications will connect to Unicode databases using UTF-8 and UCS-2 codepages, and will connect to non-Unicode databases using the database's codepage. This ensures there is no unnecessary data loss due to codepage conversion. This keyword allows the user to specify the database's codepage when connecting to a non-Unicode database in order to avoid any extra overhead on the connection. Specify a value of 1 to cause SQLDriverConnect() to return the correct value in the output connection string, so the value can be used on future SQLDriverConnect() calls. 3. UnicodeServer Keyword Description: Indicates that the data source is a Unicode Server. Equivalent to setting ConnectCodepage=1208. db2cli.ini Keyword Syntax: UnicodeServer = 0 | 1 Default Setting: 0 DB2 CLI/ODBC Settings Tab: This keyword cannot be set using the CLI/ODBC Settings notebook. The db2cli.ini file must be modified directly to make use of this keyword. Usage Notes: This keyword is equivalent to ConnectCodepage=1208, and is added only for convenience. Set this keyword to avoid extra connect overhead when connecting to DB2 for OS/390 Version 7 or higher. There is no need to set this keyword for DB2 for Windows, DB2 for Unix or DB2 for OS/2 databases, since there is no extra processing required. 40.3.2 Appendix C. DB2 CLI and ODBC The following is a new section added to this appendix. 40.3.2.1 ODBC Unicode Applications A Unicode ODBC application sends and retrieves character data primarily in UCS-2. It does this by calling Unicode versions of the ODBC functions ('W' suffix) and by indicating Unicode data types. The application does not explicitly specify a local code page. The application can still call the ANSI functions and pass local code page strings. For example, the application may call SQLConnectW() and pass the DSN, User ID and Password as Unicode arguments. It may then call SQLExecDirectW() and pass in a Unicode SQL statement string, and then bind a combination of ANSI local code page buffers (SQL_C_CHAR) and Unicode buffers (SQL_C_WCHAR). The database data types may be local code page or UCS-2 and UTF-8. If a CLI application calls SQLConnectW or calls SQLSetConnectAttr with SQL_ATTR_ANSI_APP set to SQL_AA_FALSE, the application is considered a Unicode application. This means all CHAR data is sent and received from the database in UTF-8 format. The application can then fetch CHAR data into SQL_C_CHAR buffers in local code page (with possible data loss), or into SQL_C_WCHAR buffers in UCS-2 without any data loss. If the application does not do either of the two calls above, CHAR data is converted to the applications local codepage at the server. This means CHAR data fetched into SQL_C_WCHAR may suffer data loss. If the DB2CODEPAGE instance variable is set (using db2set) to code page 1208 (UTF-8), the application will receive all CHAR data in UTF-8 since this is now the local code page. The application must also ensure that all CHAR input data is also in UTF-8. ODBC also assumes that all SQL_C_WCHAR data is in the native endian format. CLI will perform any required byte-reversal for SQL_C_WCHAR. ODBC Unicode Versus Non-Unicode Applications This release of DB2 Universal Database contains the SQLConnectW() API. A Unicode driver must export SQLConnectW in order to be recognized as a Unicode driver by the driver manager. It is important to note that many ODBC applications (such as Microsoft Access and Visual Basic) call SQLConnectW(). In previous releases of DB2 Universal Database, DB2 CLI has not supported this API, and thus was not recognized as a Unicode driver by the ODBC driver manager. This caused the ODBC driver manager to convert all Unicode data to the application's local code page. With the added support of the SQLConnectW() function, these applications will now connect as Unicode applications and DB2 CLI will take care of all required data conversion. DB2 CLI now accepts Unicode APIs (with a suffix of "W") and regular ANSI APIs. ODBC defines a set of functions with a suffix of "A", but the driver manager does not pass ANSI functions with the "A" suffix to the driver. Instead, it converts these functions to ANSI function calls without the suffix, and then passes them to the driver. An ODBC application that calls the SQLConnectW() API is considered a Unicode application. Since the ODBC driver manager will always call the SQLConnectW() API regardless of what version the application called, ODBC introduced the SQL_ATTR_ANSI_APP connect attribute to notify the driver if the application should be considered an ANSI or UNICODE application. If SQL_ATTR_ANSI_APP is not set to SQL_AA_FALSE, DB2 CLI converts all Unicode data to the local code page before sending it to the server. ------------------------------------------------------------------------ 40.4 Data Movement Utilities Guide and Reference(潲珫次) 40.4.1 Appendix C. Export/Import/Load Utility File Formats The following update has been added to this Appendix: The export, import, and load utilities are not supported when they are used with a Unicode client connected to a non-Unicode database. Unicode client files are only supported when the Unicode client is connected to a Unicode database. ------------------------------------------------------------------------ s鼪遭q鑶 倌鷎到 * s鼪裱銬 o 41.1 彀 VM 蓔U揅壧睦擋獛搨再齗 o 41.2 CLI/ODBC/JDBC 歧呃 PATCH1 碉 PATCH2 ]肄襏 ------------------------------------------------------------------------ s鼪裱銬 ------------------------------------------------------------------------ 41.1 彀 VM 蓔U揅壧睦擋獛搨再齗 s柱柰媴魅氡赴虪鱦沮鬞赳躒耍赴肄霿睦擋獛搨再齗赳歃躒戍柜魅氡 祌胃 RDB_NAME 墨 SQLSTART EXEC 虪耍養鏼長 DBNAME 囓耶 ------------------------------------------------------------------------ 41.2 CLI/ODBC/JDBC 歧呃 PATCH1 碉 PATCH2 ]肄襏 CLI/ODBC/JDBC X韥獛搨戍歧呃養鄧墨雚膼鱆[呃茨饎獛搨耑ODBC X韥獛搨扯z獛搨 苗礔鑶軝揅壧殛獛搨英耑哀 db2cli.ini 僛歈耶 欏僝耍巷囓酀揅壧烈歧 呃銬詰 CLI Guide and Reference耶 鞮養鄧zL db2cli.ini 耍詰舌zL SQLDriverConnect() 詰 SQLBrowseConnect() CLI API耍 肄 PATCH1 瓬 PATCH2 戠戍襏耍僦 DB2 CLI/ODBC X韥獛搨戍 w]長耶 鞮養鄧醨媥蛈稒Q繐]肄戍詻嗀戠閭彀柜鱌耍 鉈肄 PATCH1 戠耶 蜙p耍 愩刖肄獛搨 1耑2 瓬 8耍屑 PATCH1 戍襏醨板 11耶 柰媴板X韥獛搨柼臠柜 戠襏瓬刖戍祗腦胃 1 - o嵅oX韥獛搨醨j餬 "count(exp)"耍虋鄧 "count(distinct exp)" 鑅黈擂耶廅長嗀次劑戍 DB2 儭 "count(exp)" 砰妄耍遮欑砰妄 板墨欣 ODBC 睦擋獛搨詻擔戍耍詻鄧茫繐o刖耶 ≡再齗儭 "count(exp)" 砰妄耍Microsoft 睦擋獛搨茫繐擂耶 2 - 倌 ODBC 睦擋獛搨|Q]麰A SQLGetTypeInfo() 珫腺 LITERAL_PREFIX 詰 LITERAL_SUFFIX 托廌 SQL_NULL_DATA 耶o|鎣X韥獛搨椴廌柜譇 戠耶Impromptu 2.0 |茫繐擋耶 4 - o|鎣X韥獛搨醨枵繾超韄長齔耍愩刖繾碉繾超韄戍洟 倌鰝Os耶Microsoft Access |茫繐擋耶 8 - 愩刖繾超韄戍齔倌鰝 1899-12-30耍o|鎣X韥獛搨 醨枵繾超韄長繾耶Microsoft Access 茫繐o刖耶 16 - 媥蚼C 32 - o|鎣X韥獛搨廌腺 SQL_LONGVARCHAR耑SQL_LONGVARBINARY 瓬 SQL_LONGVARGRAPHIC 托戍鬞耶彀睦擋獛搨表酯A餪愯虋儭耶 Lotus 123 |茫繐擋耶 64 - o|鎣X韥獛搨鄧 NULL 襏徦蚳鋇戠耶 祅撌蓔浀 Microsoft Access 茫繐o刖耶 128 - o|鎣X韥獛搨 "SELECT Config, nValue FROM MSysConf" 泥欒再齗颳耶 容X韥獛搨|廌砷耍虎 SQLSTATE 襏板 S0002 (式)耶愩刖媥蛈 洄彀定珫擔柅殛歧呃式遮睦擋獛搨養鄧酨灥|茫繐擋耶 256 - o|鎣X韥獛搨彀 SQLStatistics() 碰駒珫樺廌遭繐托耶容耍X韥獛搨 |稒麀舜魦W投廌洄戍豯矧耍蠽板癸戍 ODBC 長耶 512 - o|鎣X韥獛搨彀 SQLGetFunctions() 珫 SQL_API_SQLTABLEPRIVILEGES 瓬 SQL_API_SQLCOLUMNPRIVILEGES 舌廌 FALSE耶 1024 - o|鎣X韥獛搨彀 SQLExecute() 詰 SQLExecDirect() 珫廌 SQL_SUCCESS耍 椴唏 SQL_NO_DATA_FOUND耍愩刖鸉戍 UPDATE 詰 DELETE 闉z搨鑭嗀摃媴 熪擁鏼擋耶Visual Basic 睦擋獛搨|茫繐擋耶 2048 - 媥蚼C 4096 - 彀椻韥 COMMIT 研搨珫耍腺迎癸耍o|鎣X韥獛搨 熪鋇 COMMIT耶 8192 - o|鎣X韥獛搨彀碰駒暖酨獛廌オ鴉戍膣刖鐖耶o譇膣刖鐖板柜譇柜 媴戍膣刖鐖耍墨暖酨獛戍鋇襏槷靋C養Q Powerbuild 睦擋獛搨靲s灥耶 32768 - o|鎣X韥獛搨 Microsoft Query 睦擋獛搨媥 DB2 MVS 嵥霿戠耶 65536 - o|鎣X韥獛搨椻麰枵柜譇 "G" 舫柼長徦豜戠戍戠祅戠容貘耶 o譇獛搨彀祅撌蓔珫u鏼柜肄繐虪耶 131072 - o|鎣X韥獛搨醨繾超韄托長柜譇 CHAR(26) 托耍彀擂板柜譇鸅柜 豯矧戍柜倌鰫耶Microsoft 睦擋獛搨|茫繐擋耶 262144 - o|鎣X韥獛搨媥 pseudo-catalog 式 db2cli.procedures耍椴唏 SYSCAT.PROCEDURES 瓬 SYSCAT.PROCPARMS 式耶 524288 - o|鎣X韥獛搨媥 SYSTEM_TABLE_SCHEMA耍椴唏 TABLE_SCHEMA耍 彀 DB2/400 V3.x 鑶酓@鑶蛌d欒耶o皇養共耶 1048576 - o|鎣X韥獛搨zL SQLPutData() 醨s戍戠長 SQL_NULL_DATA耶 PATCH2 戠嵥腺 PATCH1 戠耶 彀o餼如珫耍醨媥釤r貂牁j戠祅鉈肄 愫譇獛搨耶 蜙p耍愩刖肄柅獛搨 1耑4 瓬 5耍屑 PATCH2 醨爩嗀襏 "1,4,5"耶 柰媴板X韥獛搨柼臠柜戠襏瓬刖戍祗腦胃 1 - o|鎣X韥獛搨醨 CALL 闉z搨珫戍暖酨獛巰投黈長毠柞戠耶 2 - 媥蚼C 3 - o|鎣X韥獛搨醨找碰駒戍詻嗀矧黈長毠柞戠耶 4 - o|鎣X韥獛搨腺找碰駒 (柛餪板 SQLColumns()耑SQLProcedureColumns() 瞉瞉) 廌ю次劑 2.1.2 戍膣刖鐖耍椴唏ю次劑 5 戍膣刖鐖耶 5 - o|鎣X韥獛搨繐稙豜枵 VARCHAR 托戍Bz耍嵢戍癸碉嵢戍 癸彀韄鯬珫板s戍耶 6 - o|鎣X韥獛搨廌儭養巃韥癸戍鬞昔耶Visual Basic 獛搨|茫繐擋耍愩刖 DB2 雚膼鱆O次劑 5耍遮再齗板 DB2 UDB 次劑 5耶 7 - o|鎣X韥獛搨醨詻嗀 GRAPHIC 托ю悚杯 CHAR 托ю悚耶彀祅撌蓔炟艛no刖耶 8 - o|鎣X韥獛搨落洇靘碰駒珫戍到j餬矧耶 9 - 癸椲版繐 COMMIT 10 - 媥 11 - 鬑儭到巰投, (VB 暖酨獛) 12 - 雚找碰駒矧颳矧襶, (Visual Interdev) 13 - 巷醨 db2cli.ini 戍戠K閭鋇s鼪戠 14 - 落 SQLProcedures() 瓬 SQLProcedureColumns() 柼戍找巰投 15 - 媥袛y貂鋅式戠祅鋇珫戍洟貂襶 16 - 鎣蟢廌臠柜礤鼖戍祗腦鬞 17 - 巷彀祗腦柼廌托巰投 18 - 覃敺H囓韄襶灥鋅戠 19 - 容耍DB2 MVS V4.1 儭 ODBC 砰妄耍廅長擂委\彀鴉剜幏氡魅珫戍 ON 氡魅養嗀服躲耶 礤鼖o譇 PATCH2 |癚 IBM DB2 ODBC X韥獛搨彀鴉剜幏氡魅彀 ODBC ESC 媴珫醨s戠襶颳耶o譇 PATCH2 骷嗀彀顟腺 DB2 MVS 4.1 浂媥蚼C 20 - 容耍MVS 柼戍 DB2 儭囓韄襶長譇B祅 (expression ? BETWEEN ?) 戍 BETWEEN 翷耶礤鼖o譇獛搨|癚 IBM ODBC X韥獛搨醨翷剽柞長 (expression >= ? and expression <= ?)耶 21 - 醨暖酨獛戍詻嗀譧 OUTPUT 囓]肄長 SQL_NULL_DATA 22 - o譇 PATCH2 |癚 IBM ODBC X韥獛搨鬑儭鴉剜幏 (OUTER Join)耶 o譂擋腺彀媥袛~剜幏闉z搨|擁 SELECT DISTINCT col1 詰 ORDER BY col1 戍睦擋獛搨耍珫 col1 戍毠腺 254 譇戠祅耍遮y歈 DB2 UDB 廌砷 (廅長 DB2 UDB 彀殛擋妄柼儭毠腺 254 譇祅憒圻 23 - 巷稙豜zL cbColDef=0 膣幏戍囓祌枵 24 - 酨灥杯繾戍膋鷾r祅 25 - 酨灥洟托戍 - 颳戠祅闉z黦抑戍s 26 - 醨 SQL 獛搨 464 廌聤睦擋獛搨 - 式洄廌膣刖鐖 27 - 蟢 SQLTables 媥 TABLETYPE 戠襏耍饓媟擋獛搨肄柅柜譇嗀襏 28 - 祗腦舫戍托長藂托 29 - 洟托戍 ADO - 颳 x 襏戍容s耍珫 x 長 1 > x > -1苗欣 MDAC 次劑茫繐殛刖英 30 - 灥稙豜耍欘媥袚x酨獛 31 - 廌 SQLStatistics 碰駒顢巰戍郬p襏 32 - 鑅黈 SQL 獛搨 -727 廅俄 4 Bz獛 33 - 彀黈歈戠祅耍廌繾超韄戍 ISO 次劑 (虎腺 ODBC 次劑) 34 - 鄧 CHAR 巰投靲^ CHAR FOR BIT DATA 托 35 - SQL_DESC_BASE_TABLE_NAMER Q繐臡柰廌柜譇潲戍式巰投 - ADO 鸅似稙豜 36 - 奚蟂 37 - 奚蟂 ------------------------------------------------------------------------ 柜鬞 倌鷎到 * 柜鬞 o 42.1 DB2 Universal Database Business Intelligence t o 42.2 DB2 Everywhere 洄長 DB2 Everyplace o 42.3 悖薋D o 42.4 灚嵅q DB2 Run-time Client s膣癚赴s膣赳砷 o 42.5 Search 厴豯 (Search Discovery) o 42.6 HP-UX 11 戍韄鯬甇 o 42.7 dlfm client_conf 噬媥蛈瘐蘧秝@ o 42.8 戍麩胃盎鎈鏮獛搨彀 dlfm 欘鑭嗀欘 o 42.9 鬙揅壧 DB2 DFS 雚膼虀裲祔{搨 o 42.10 Windows NT 雚膼蠮蟴ъ o 42.11 彀擔氡獛 AutoLoader 養|♂ o 42.12 DATALINK 駻鑅 o 42.13 Windows NT (CS/NT) 戍 IBM Communications 再齗肄霿媥蛈 ID 碉q俄 + 42.13.1 躒貂肄霿 o 42.14 皖幏鑶蛈攻蹠 o 42.15 DataJoiner 貙 o 42.16 Windows NT 戍鏶閞鬞悚到扯z獛搨 o 42.17 Microsoft SNA Server 碉 SNA 愫霠鶔s (藶沮俊肄) 儭 o 42.18 鼖韥 Windows 祌潲妄鼖韥 DB2 戍 SNA SPM o 42.19 DB2 扯z再齗戍砰躨裼]肄 o 42.20 嚪尚潲 o 42.21 Windows NT 瓬 Windows 2000 柼戍 DB2 再髕鎟茫臡 o 42.22 彀次劑 6 珫擔戍 Query Patroller 媥蛈瑔蝨h柅 EXECUTE 鄾擋 v o 42.23 Query Patroller 貙 o 42.24 茫繐俊肄詻嗀|彀暖珫眃(DWC)珫媥蛈杜媥蛈瑏w霿獛搨 o 42.25 暖珫眃祺銻鋇戍s醳 o 42.26 Backup Services APIs (XBSA) o 42.27 OS/390 鋅z獛搨 + 42.27.1 揅壧[ + 42.27.2 揅壧腦 + 42.27.3 ]鑅オ鴉戍鋅z獛搨 + 42.27.4 擋熪獛搨獛暖纙J (XTClient) + 42.27.5 黈獛搨 + 42.27.6 酨灥 DB2 鑶媴祌鴉戍定 + 42.27.7 鸉 DB2 for OS/390 洢擋獛搨 + 42.27.8 纋柞 + 42.27.9 鋅z獛搨韄 o 42.28 Windows NT 柼戍雚膼鬻薏灥 o 42.29 Enterprise Edition UNIX CD-ROM 戍灚擋恙 o 42.30 DB2 Connect Enterprise Edition UNIX CD-ROM 戍灚擋恙 o 42.31 鵛鞥 Data Links Manager o 42.32 媥 SMIT 鬙揅壧 DLFM 祅麩養|颳オ鴉戍鐖 o 42.33 彀 Windows 2000 柼媥 CLP 熪擁砷 SQL1035N o 42.34 SQL 茨饎獛搨戍閭鎣閱 o 42.35 Linux 柼戍 DB2 戍 Gnome 碉 KDE 貘鬷幏 o 42.36 彀 Windows 2000 Terminal Server 扯z研搨柰鸉 DB2 o 42.37 樵烈駻鑅銻戍哎柼祗腦 o 42.38 "Warehouse Manager" 睦長 "DB2 Warehouse Manager" ------------------------------------------------------------------------ 柜鬞 ------------------------------------------------------------------------ 42.1 DB2 Universal Database Business Intelligence t 赴t鴙v譂擋腺 DB2 for Linux 詰 Linux/390耶 鄧洟戍鑶軝r悚鸉赴t鴙v耍養隳稙蚸刖耶鞮養茫繐怠鬷 Web 鈕檍戍 戠悚毠洟耍 鄧儘俊廇彀 OS/2 柼照赴t鴙v耶巷囓 Web 鈕檍戍祗腦耍鄧 灥隳怠鬷戠悚毠洟戍鬞耶 礔繐儘俊廇照赴t鴙v(譧譂擋腺 SBCS)耍鞮 媥 8 貂戍 Helv 戠悚耶黳劑瓬童朗耍鞮媥 8 貂戍 Mincho 戠悚耶 ]肄戠悚戍摴n]肄耍巷俊肄灥赴摴n]肄赳甇赴戠悚赳贄戍赴媥釸w]戠 悚耍鑅黈麩肄戍戠悚赳醳耶 彀欣蓔l斖耍養|彀柫譇鈕檍甇貘鼖韥赴t鴙v耶 礔繐鶔儘o譇齶 ガ耍巷狎ut鴙v耍虋芋駽 2.4, 鼖韥 Netscape 擁戍砷鬞昔 斖戍纙 J耶 鼖韥赴t鴙v耍鞮養|鼪搌ю柰媴戍 JavaScript 砷胃 file:/C/Program Files/SQLLIB/doc/html/db2qt/index4e.htm耍65 胃 甇冀肄霿耶 o譇 JavaScript 砷|位赴t鴙v鼖韥贄 index4e.htm耍 彀鼖韥赴t 鴙v椻韥狎C養墨ず index4e.htm 戍鈕檍甇鉲狎ut鴙v鼖 韥贄耶 彀赴s蕶詫祊悜v鱦沮耍赴扯z赳遭ガ戍柰 彀 7.1 次珫儭赴饓矩 奚酨儭赳耶柼虋板o皇耶珫柛胃 矩戍毠洟雚 4GB 柱閭 32GB耶 魅氡睦長胃 曄郎杆{矩繾洄雚 4GB 柱閭 32GB耶 祗腦 DB2 Data Links Manager 戍鱦沮珫嗀柜譇魅氡愩柰胃 椴遮耍養儭 Veritas XBSA 祊貘戍媥蚼A 鄧堉媥 NetBackup 鏼樵瓬駻鑅耶 魅氡睦長胃 椴遮耍養儭 XBSA 祊貘僤瘛鄂瓬廌駻耶 暖酨扯z獛搨儭戍 XBSA 祊貘霄鰗 Legato NetWorker 瓬 Veritas NetBackup耶 ------------------------------------------------------------------------ 42.2 DB2 Everywhere 洄長 DB2 Everyplace DB2 Everywhere 戍巰投{彀洄長 DB2 Everyplace耶 ------------------------------------------------------------------------ 42.3 悖薋D 柅甇祌鴉耍詻嗀戍樹鬧茫繐涇僓媥釱珫戍泚爩耶 ------------------------------------------------------------------------ 42.4 灚嵅q DB2 Run-time Client s膣癚赴s膣赳砷 廅長 DB2 Run-time Client 鑭嗀鬷憒杉s膣耍詻鄧潲妄蘠歈 GUI 泚爩戍s膣耍 骷養鄧雚 DB2 Administration Client 蘠歈 GUI 泚爩戍s膣耶 ------------------------------------------------------------------------ 42.5 Search 厴豯 (Search Discovery) Search 厴豯骷儭毗洮韔耶蜙p耍Search 厴豯醨潲妄zL ATM 黂鼪鞏僛@擋耶椷 板耍殛醳貙虋譂擋腺 Known 厴豯耶 ------------------------------------------------------------------------ 42.6 HP-UX 11 戍韄鯬甇 韄鯬甇板虪毠悚 HP 64 祅鼭齗戍媥蛈瑏蒝蚼A 廅醋謰Q繐顟擋 32 祅睦擋 獛搨櫹L 1.75GB 戍媷擋韄鯬耶 愩刖鞮板鸉 64 祅次劑戍 DB2耍餪茫繐韄鯬 甇耶 韄鯬甇養悹C柜獛詰獛顪槷U嗀柜譇 1 GB 戍媷擋韄鯬養擋耶 o醨委\裺べ椻洳戍 1GB 媷擋韄鯬耍嫀閭柼 0.75GB 戍毗媷擋韄鯬耶 愩 刖媥蛈稒Q繐瑹擋o譇暉貂耍醋謰養鄧鸉愫譇蒤A臠柜裷兼b椻洳戍甇珫鸉 耶 柰媴板媥釴O鯬甇戍樺讘麩胃 * DB2 EE o 獛搨胃Extension Software 12/98 瓬 PHKL_17795耶 o 澱鏺裼]肄 $DB2INSTANCE 耶 o 鞮彀韄鯬甇柰鸉戍臠柜譇 DB2 蒤A彀 /etc/services.window 珫嗀熡到耶蜙p胃 db2instance1 50 db2instance2 60 胃巰投瓬 ID 祌繾譧嗀柜譇耶 o 鞮澱鏺媥 TCP/IP 鷮妄耍鸉摃鞮繐彀再齗柼鸉遮茫繐愫譇 柜闉z搨戍 DB2 銻耶 o板廅長↖O鯬甇蘠歈柜譇闉z搨戍獛 耍shell 醨鸉耶赴DB2 再髕獛搨赳何D愩摃蘠歈殛醳鏼~耶 o 摃繐彀韄鯬甇柰詻鸉戍蓔村鬾 DB2 銻耍澱鏺鄧 db2win (彀 sqllib/bin 珫) 鏼長戠藃耶蜙p胃 db2win db2start db2win db2stop o 韄鯬甇鴉鸉戍摃 DB2 銻 (椷韄鯬甇儘彀鸉) 睦欑廌 1042耶 蜙p胃 db2win db2start <== OK db2 connect to db <==SQL1042 db2stop <==SQL1042 db2win db2stop <== OK * DB2 EEE o 獛搨胃Extension Software 12/98 瓬 PHKL_17795耶 o 澱鏺裼]肄 $DB2INSTANCE 耶 o DB2_ENABLE_MEM_WINDOWS 熡到澱鏺]肄長 TRUE耶 o 鞮彀韄鯬甇柰詻鸉戍臠柜譇膃杜C柜譇閮躒貂耍彀 /etc/services.window 珫嗀熡到耶 臠柜譇熡到戍柜醨歈長烈 靇襶s鼪戍蜙W投耶蜙p胃 === $HOME/sqllib/db2nodes.cfg for db2instance1 === 5 host1 0 7 host1 1 9 host2 0 === $HOME/sqllib/db2nodes.cfg for db2instance2 === 1 host1 0 2 host2 0 3 host2 1 === /etc/services.window on host1 === db2instance10 50 db2instance11 55 db2instance20 60 === /etc/services.window on host2 === db2instance10 30 db2instance20 32 db2instance21 34 o 鞮擋 db2win 鏼 DB2 銻戍礤慍耍擂骷譂擋彀 EE 蓔U耶 ------------------------------------------------------------------------ 42.7 dlfm client_conf 噬媥蛈瘐蘧秝@ 彀 DLFM 雚膼龢洐A愩刖 dlfm client_conf 廅長欣z墨椴噬韖耍 DB2 悚到珫戍 "stale" 醳詰\板廅貔祌柜耶鬙讘長熪鋇柰媴銻胃 db2 uncatalog db db2 uncatalog node db2 terminate 潒耍嫀覃 dlfm client_conf耶 ------------------------------------------------------------------------ 42.8 戍麩胃盎鎈鏮獛搨彀 dlfm 欘鑭嗀欘 o餼如熪擁耶↗媥蛈碔o鋇 dlfm stop 銻詰儘鎈鼭耍 dlfm_copyd (copy 鎈鏮獛搨) 鑭嗀欘耶 愩刖熪擁o餼如耍彀覃歑浦s鼖韥 dlfm 祌容耍熪鋇 dlfm shutdown 銻耶 ------------------------------------------------------------------------ 42.9 鬙揅壧 DB2 DFS 雚膼虀裲祔{搨 鬙揅壧 DB2 DFS 雚膼虀裲祔{搨祌容耍root 睦欑俊肄 DFS 彀媥豜洐A 椴 遮鑭嗀媥蛈睚b DFS 繾礤鼖 Shell耶 鄧 root 蟴瑟o鋇柰媴銻胃 stop.dfs dfs_cl 照泥 /... 嫀Q壧胃 mount | grep -i dfs 愩刖鑭嗀o皇鷽耍DB2 DFS 雚膼虀裲祔{搨鬙揅壧耍欑鼭齗茫繐薿s鼖韥耶 ------------------------------------------------------------------------ 42.10 Windows NT 雚膼蠮蟴ъ Windows NT 戍蓔U耍s戍 DB2 熡到 DB2DOMAINLIST 烈{酨戍雚膼蠮蟴ъ 鼭虎膣幏耶Windows NT 再齗戍 DB2 養媥軝肄霿柜譇詰愫譇 Windows NT 耶骷嗀肄霿腺殛媴珫戍媥蛈犌杉s哎詰s鼪繐臡浂|Q鼪耶 骷嗀彀貕戍 Windows NT 蓔U鸉 DB2 再齗碉雚膼鬫蜀 7 戍餼如柰耍 浂養媥軝熡到耶 嗀殛熡到戍]肄耍巷囓楯 Administration Guide: Performance 洇戍赴DB2 Registry and Environment Variables赳倌鰣C ------------------------------------------------------------------------ 42.11 彀擔氡獛 AutoLoader 養|♂ AIX 4.3.3 霄鰗柅柜譇儘獛搨耍擋鄧鬙讘彀擔氡獛養癚 AutoLoader 珫 跛戍 libc 齶ガ耶AutoLoader 板柜譇愫薿鸉戍獛搨耶珫戍柜譇鸉|鱌絛駙 柜譇獛耶鱌絛柜譇氡獛耍|y歈噸醳戍韄鯬洋擔彀氡醳珫耶 養|熪擁胃墨 libc.a 擋鄑噠z愫薿鸉雚虎嵥獛珫祌黂鑅韄鯬戍 肄耍 Q唏鱌絛戍 (non-forking) 鸉詻奚蟂耶廅長唏鱌絛戍鸉|酨彀腺 氡獛耍 o譇肄醨|溝X聤氡醳耍廅椴y歈嗀噸醳|珫跛耶 ------------------------------------------------------------------------ 42.12 DATALINK 駻鑅 定駻鑅祌詻灁戍塒哎樵駻鑅耍潲嗀詰鑭嗀 ROLL-FORWARD耍 |o t柜癚詫戍Bz獛耶殛餼如柰耍膣嚭醳祌柰嗀 DATALINK 托戍詻嗀 式醨Q鑅腺膣柜癚詫殿鑅 (DRP) 扛你柰耶 ------------------------------------------------------------------------ 42.13 Windows NT (CS/NT) 戍 IBM Communications 再齗肄霿媥蛈 ID 碉q俄 愩刖鞮媥 APPC 鏼長茗抑 DB2 雚膼鰳P DB2 再齗s鼪祌q鬞灨肄耍 嵥耍鞮 CS/NT ≡ SNA 恙媥蚼A巷俊肄鞮洄彀 CS/NT 歧呃洇儘俊戍]肄柅柰媴 戠耶q鎈鞮養鄧彀 x:\ibmcs\private 到柰彀欑耶 42.13.1 躒貂肄霿 TG_SECURITY_BEHAVIOR 殛囓委\媥蛈稙M肄耍愩刖 TP 板鼭鄺奚@戍歧呃耍躒貂板愩摃Bz鋇{彀 ATTACH 洇戍揅曄鬞耶 IGNORE_IF_NOT_DEFINED 殛囓委\媥蛈稙M肄板騶檍瓕K奚@囓鋇{彀 ATTACH 洇耍嵥耍礔 TP 板鼭鄺奚@戍歧呃養落狊椲猺C 礔鞮媥 IGNORE_IF_NOT_DEFINED耍屑潲鏺腺 CS/NT 肄霿媥蛈 ID 碉q 俄耶 VERIFY_EVEN_IF_NOT_DEFINED 殛囓委\媥蛈稙M肄板騶檍瓕K奚@囓鋇{彀 ATTACH 洇耍 虋ъ擂謰耍 饓 TP 冀歧呃長鼭鄺奚@耶o板w]襏耶 礔鞮媥 VERIFY_EVEN_IF_NOT_DEFINED耍屑澱鏺腺 CS/NT 洇肄霿媥蛈 ID 碉 q俄耶 儵肄霿 CS/NT 媥蛈 ID 碉q俄耍巷鸉柰媴纙J胃 1. 礤絛 --> 獛搨鐖 --> IBM Communications Server --> SNA Node Configuration耶 饓礤鼖赴w媥 Communications Server 歧呃甇赳耶 2. 鞮繐戍歧呃耶柜柰赴柰柜纙赳耶詻戍歧呃髕削蜪甇礤鼖耶 3. 鎣怠ず CPI-C, APPC 詰 5250 研毽獛搨耶柜柰赴蘠歈赳耶饓養礤鼖 Communications Server SNA 躒貂甇耶 4. 柜柰 CPI-C 碉 APPC 戍 [+] 襶耶 5. 柜柰 LU6.2 鼭鄺奚@戍 [+] 襶耶 6. 餒柜柰媥蛈稕q俄耍虋灥擔耶肄霿媥蛈 ID q俄戍甇礤鼖耶 7. 穭柞媥蛈 ID 碉q俄耶柜柰俊肄耶 柜柰蘠歈鄧鼪鶔耶 ------------------------------------------------------------------------ 42.14 皖幏鑶蛈攻蹠 柰媴板譂擋腺皖幏鑶蛈攻蹠胃 * 霄鰗皆巰戍泥欒儭 Oracle ю悚 NCHAR耑NVARCHAR2耑NCLOB 瓬 BFILE耶 * 赴嚭珫眃赳儭赴擔再齗醳赳耑赴鶔再齗醳赳瓬赴鵛鞥再齗 醳赳銻耶礔繐熪鋇鄧柼柜銻耍澱鏺媥袑R銻Bz齗 (CLP)耶 * 黳霄鰗皆巰戍泥欒耍DB2 UDB 板學茗芋 DFT_SQLMATHWARN 定戍歧呃 醳耶瓮祌耍DB2 UDB 托鼪雚茗抑僬拜廌B式搨砷詰翭i耍椴落 DFT_SQLMATHWARN ]肄耶 * CREATE SERVER OPTION 闉z搨委\ COLSEQ 再齗醳]肄長 'I' (黳爩 嗀鱦牁毠洟柞僳鏷戍僬)耶 * 肄潲戍醳耍醨廌 ALTER NICKNAME 闉z搨耶 * 黳 Oracle耑Microsoft SQL Server 瓬 Sybase 僬垠A襏ю悚潲妄 杯 DB2 戍 BIGINT ю悚耶 稗w]襏耍Oracle 戍戠 (p,s) ю悚 (10 <= p <= 18 椴 s = 0) |杯 DB2 戍 DECIMAL ю悚耶 ------------------------------------------------------------------------ 42.15 DataJoiner 貙 皖幏蓔扳o鋇戍牁燽搨繐臡|貙長鸅佐@~耶 ------------------------------------------------------------------------ 42.16 Windows NT 戍鏶閞鬞悚到扯z獛搨 赴鬞悚到扯z獛搨赳祅麩養譂擋腺鏶閞耍 虋遮彀 DB2 Warehouse Manager for Windows NT CD 柼虪耶 鏶閞戍陲鐐虪腺 IL_ICM.ZIP o譇琳珫耍 腺 DB2 Warehouse Manager for Windows NT CD 戍 DB2\IL 到斖耶 礔繐揅壧鏶閞陲籉妣u鬞悚到扯z獛搨赳耍 巷樺揅壧禭次戍 DB2 Warehouse Manager for Windows NT耍 鄧瓬 Windows NT 鏶閞次戍詻嗀樺讘麩耶 揅壧 DB2 Warehouse Manager for Windows NT 祌耍 雚 DB2\IL 到醨 IL_ICM.ZIP 鬙琳揅壧 DB2 Warehouse Manager for Windows NT 戍到柼耶 巷俊肄鬙琳獛搨洄儘俊戍醳耍鄧彀琳斖擔到膣呃耶 鬙琳耍曄 LC_ALL 澱鏺雚 En_US 鶔長 Iw_IL耶 礔繐鶔] 肄胃 1. 礤鼖 Windows NT 嚭鬧耍虋彀鑶釸媥柼柰耶 2. 彀鑶豜妝e甇耍柜柰蒗蒤A 潒餬鑶鱦沮珫戍 LC_ALL 耶 3. 柜柰耍鄧ず襏哀斖戍襏耶醨襏雚 En_US 鶔長 Iw_IL耶 4. 柜柰]肄盭耶 5. 門t豜妝e甇瓬嚭鬧耶 {彀洄揅壧鏶閞次戍赴鬞悚到扯z獛搨赳耶 ------------------------------------------------------------------------ 42.17 Microsoft SNA Server 碉 SNA 愫霠鶔s (藶沮俊肄) 儭 Microsoft SNA Server 板媥豜浀 SNA 恙耍 遭q碉 AS/400 睦擋獛搨潲 妄酨灥媥 SNA 藶沮俊肄戍 DB2 UDB 再齗耶摃式儭鄧柼閱戍 DB2 UDB 鋇次恙板儘俊戍耶澱鏺繐嗀 IBM Communications Server for Windows NT 5.02 次詰鄧柼戍次劑耶 : 媥 DB2 UDB for Windows 靲s灥遭q瓬 AS/400 定再齗戍睦擋獛搨 養鄧媥 Microsoft SNA Server 次劑 4 Service Pack 3 詰鄧柼次劑僓媥 SNA 藶沮俊肄耶 ------------------------------------------------------------------------ 42.18 鼖韥 Windows 祌潲妄鼖韥 DB2 戍 SNA SPM 礔鞮媥 Microsoft SNA Server 次劑 4 SP3 詰鄧柼戍次劑耍 巷ъ DB2 戍 SNA SPM 養彀薿s鼖韥祌儘鎈鼖韥耶照泥 \sqllib\<蜙W投>\db2diag.log 耍 鄧 灥隳ю柰媴詻戍醳胃 2000-04-20-13.18.19.958000 Instance:DB2 Node:000 PID:291(db2syscs.exe) TID:316 Appid:none common_communication sqlccspmconnmgr_APPC_init Probe:19 SPM0453C 廅長 Microsoft SNA Server 冀鼖韥耍詻鄧嵥纙貂扯z獛搨冀鼖韥耶 2000-04-20-13.18.23.033000 Instance:DB2 Node:000 PID:291(db2syscs.exe) TID:302 Appid:none common_communication sqlccsna_start_listen Probe:14 DIA3001E 冀歈閱鼖韥 "SNA SPM"耶 2000-04-20-13.18.23.603000 Instance:DB2 Node:000 PID:291(db2syscs.exe) TID:316 Appid:none common_communication sqlccspmconnmgr_listener Probe:6 DIA3103E APPC q埔灨肄儭熪擁砷耶APPC verb "APPC(DISPLAY 1 BYTE)". 遭繐廌俄 "F004"耶歃繐廌俄 "00000000"耶 礔 db2diag.log 斖嗀o醳耍 遮繾超韄碉鞮犌毋浦s鼖韥戍繾虎耍鞮澱 鏺胃 1. 碰駒 db2stop耶 2. 鼖韥 SnaServer 再髕獛搨 (礔腮冀鼖韥)耶 3. 碰駒 db2start耶 嫀歃照泥 db2diag.log 耍鄧俊肄鑭嗀嫀K閭醋醳耶 ------------------------------------------------------------------------ 42.19 DB2 扯z再齗戍砰躨裼]肄 巷俊肄 DB2 扯z再齗膃妖y躨膋磡e腺 DB2 膃妖y躨蒤C騶屑耍DB2 蜪L妄烈 DB2 扯z再齗齘q耶 礔 LANG 鑭嗀彀 DB2 扯z再齗戍媥蛈稕]肄斖]肄耍 DB2 扯z再齗 醨鄧w]戍鑶蚽y躨蜤裲珥C礔鑭嗀肄霿w]戍鑶蚽y躨蒤A DB2 扯z再齗醨 |鄧戠俄贄 819 僔裲珥C礔 DB2 裺媥蛌Y DBCS 砰躨蒤A遮 DB2 扯z再齗 板鄧戠俄贄 819 僔裲珥A 屑蜤N潲妄烈 DB2 扯z再齗齘q耶DB2 扯z再齗碉 DB2 膃妖y躨蒝鏺虎委耶蜙p耍彀媽珫 Linux 鑶豜W耍 睦欑彀 DB2 扯z 再齗戍媥蛈稕]肄斖]肄 "LANG=zh_CN"耶 ------------------------------------------------------------------------ 42.20 嚪尚潲 彀欣砰躨斖耍腺 UNIX 鑶袑M OS/2 柼戍赴嚭珫眃赳鉒限A 嗀俠嚪尚潲 耶巷媥釳涇鄖灥醳耶 ------------------------------------------------------------------------ 42.21 Windows NT 瓬 Windows 2000 柼戍 DB2 再髕鎟茫臡 彀 DB2 for Windows NT 詰 Windows 2000 戍揅壧齔繾耍揅壧獛搨|擔譇 Windows 再髕耍 虋肄臠柜譇再髕戍再髕鎟耶礔繐譂≡a鸉 DB2耍揅壧獛搨|騅 烈柰媴媥蛈v顟聤烈 DB2 再髕嗀皖戍再髕鎟胃 * 鏼長鏼~鑶蛈彷@倌 * 擔 token 旨麩 * 柱閭黂オ * 鄧再髕搨熡枵 * 鶔黈獛柳 token耶 愩刖鞮繐媥豜嵥戍再髕鎟虪 DB2 再髕媥蚼A鞮澱鏺醨o媥蛈v顟騅烈再髕鎟 耶 柅o媥蛈v顟耍再髕鎟腺揅壧 DB2 恙戍到柛澱鏺嗀柞枵戍v顟耶 DB2 Administration Server 再髕 (DB2DAS00 再髕) 戍再髕鎟柛澱鏺嗀鼖韥瓬欘 擂 DB2 再髕 (柛餪板祗耍再髕鎟澱鏺萎竀 Power Users 顪) 戍v貙耍鄧 瓬腺 摃擂詻扯z戍 DB2 蜰嗀 DB2 SYSADM v貙耶 ------------------------------------------------------------------------ 42.22 彀次劑 6 珫擔戍 Query Patroller 媥蛈瑔蝨h柅 EXECUTE 鄾擋v 廅長倌籗s戍暖酨獛 (IWM.DQPGROUP耑IWM.DQPVALUR耑IWM.DQPCALCT 瓬 IWM.DQPINJOB) s柱 Query Patroller 次劑 7 珫耍Query Patroller 次劑 6 珫戍 {酨媥蛈碙N腺蠽 霄嫀奚嗀 EXECUTE 鄾擋v耶 養椻韥鶔儘殛齶ガ戍睦擋獛 搨洄s柱 FixPak 1 珫柅耶 ♂z覃潁媥 DQP 泥欒扯z僦 DQP 媥蛈稑鬞耍巷繐灚緺雚媥蛈稢M珫 齁 {嗀戍媥蛈猺C ------------------------------------------------------------------------ 42.23 Query Patroller 貙 廅長 JVM (Java Virtual Machine) 樹鬧貙耍彀 HP-UX 瓬 NUMA-Q 柼虋儭赴泥 欒鼖韥獛搨赳耶殛祌鴉耍彀 NUMA-Q 柼虋儭赴Query Patroller 鷲齗赳耶愩 刖茫繐詻嗀戍 Query Patroller 雚膼龢u爩耍鞮媥豜嵥戍樹鬧 (洃愩 Windows NT) 僰 HP-UX 詰 NUMA-Q 再齗鸉o泚爩耶 ------------------------------------------------------------------------ 42.24 茫繐俊肄詻嗀|彀暖珫眃(DWC)珫媥蛈杜媥蛈瑏w霿獛搨 愩刖鞮繐醨赴DB2 暖酨獛鑅齗赳詻擔戍暖酨獛↓@赴暖珫眃(DWC)赳珫 戍 媥蛈瑏w霿獛搨僓媥蚼A鞮澱鏺麰枵柰媴闉z搨暖酨獛 con.close(); 闉z搨 容貘胃 con.commit(); 愩刖鑭嗀麰枵o譇闉z搨耍暖酨獛詻鷽戍鶔|彀暖酨獛雚 DWC 鸉Q Rollback耶 腺 DWC 珫詻嗀戍媥蛈瑏w霿獛搨耍澱鏺繐腦俊廇 COMMIT 摃洇鰗戍 DB2 耍 鄧鶔彀定珫擁胚柛餪板祗耍鞮澱鏺醨 COMMIT 闉z搨 閭媥蛈瑏w霿獛 搨珫耶 ------------------------------------------------------------------------ 42.25 暖珫眃祺銻鋇戍s醳 祺銻鋇癸嗀柅柜譇s戍醳耍/B耶殛醳潲妄zL赴暖珫眃赳祊貘 僓媥蚼C iwh2exp2 銻戍s砰妄長胃 iwh2exp2 filename.INP dbname userid password [PREFIX=table_schema] [/S] [/R] [/B] 珫 - filename.INP 板 INP 戍蘠鬷尚巰投 - dbname 板暖珫眃嚭定戍巰投 - userid 板擋馰n枵定戍媥蛈 ID - password 板擋馰n枵定戍鄺俄 - 擋囓長胃 - PREFIX=table_schema胃嚭定式戍式找 (w]襏長 IWH) - /S胃鋇鰗灥纙J戍獛式 - /R胃繐鋇鰗灥纙J戍暖僬 - /B胃繐鋇鰗灥纙J戍 contributing 纙J : 愩刖肄柅 /R 詰 /B耍↑枵膣刖癸耍暖僬姜 contributing 纙J 澱鏺洄鑌酨彀耍 騶屑|廌砷耶 ------------------------------------------------------------------------ 42.26 Backup Services APIs (XBSA) Backup Services APIs (XBSA) 洄Q禭戍 Open Group 肄霿長柜譇礤舅戍睦擋獛搨 獛搨]繣祊貘耍養擋腺茫繐暖酨扯z戍睦擋獛搨詰鼭祌繾鏼樵詰奚酨耶 o韄 彀 "Open Group Technical Standard System Management: Backup Services API (XBSA)"耍 Document Number C425 (ISBN: 1-85912-056-3)耶 長柅儭o譇祊貘耍s柅譇 DB2 熡到耍容儭 AIX耑HP耑Solaris 瓬 Windows NT胃 DB2_VENDOR_INI 嵢柜譇霄鰗詻嗀氟鸆裼]肄戍耶 襏|彀定扯z獛搨鼖韥隳耶 DB2_XBSA_LIBRARY 嵢氟鸆虪戍 XBSA 定耶彀 AIX 柼耍愩刖巰投板 shr.o耍蠽]肄襏 澱鏺霄服媷擋旨麩耶 HP耑Solaris 瓬 Windows NT 繐臡媷擋旨麩巰投耶 愩耍礔繐媥 Legato 戍 NetWorker Business Suite Module for DB2耍熡韄 澱鏺]肄愩柰胃 db2set DB2_XBSA_LIBRARY="/usr/lib/libxdb2.a(bsashr10.o)" XBSA 祊貘養zL BACKUP DATABASE 詰 RESTORE DATABASE 銻鉊I駒耶蜙p胃 db2 backup db sample use XBSA db2 restore db sample use XBSA ------------------------------------------------------------------------ 42.27 OS/390 鋅z獛搨 o譇麩珫嗀祄碑胄揅壧 OS/390 烈蕶詫 劑虪愩摃揅壧 OS/390 鋅z獛搨戍瓬蕶詫戍虎鬞耶 腺揅壧獛戍 t泥耍巷囓酀赴揅壧[赳耍 腺欏鄏妙耍巷囓酀赴揅壧僝`赳耶 腺鋅z 獛搨蕶詫戍虎鬞耍巷囓酀赴]鑅オ鴉戍鋅z獛搨閱赳耑赴黈獛搨赳瓬赴酨灥 DB2 鑶媴鄧鴉戍定赳耶 [ DB2赴暖珫眃赳霄服 OS/390 鋅z獛搨耶鞮養鄧彀 DB2 Universal Database for OS/390 瓬擂定祌繾媥袛Nz獛搨僯q埔耍 霄服擂樹鬧柼戍 DB2 定瓬唏 DB2 定耶鋅z獛搨養烈媥 ODBC s哎戍僬指q埔耶 鋅z獛搨彀 OS/390 UNIX 鑶蛈A髕柼鸉耶擂茫繐 OS/390 V2R6 詰鄧柼次劑耍虋遮烈 DB2 for OS/390 次劑 5耑6 瓬 7 虎委耶 OS/390 鋅z獛搨儭柰媴鏼~胃 * 雚僬 DB2 定盎癸 DB2 定 * 灥皇式詰戍洇委 * 鸉媥蛈瑏w霿獛搨 * zL IBM 戍 DataJoiner 獛搨酨灥唏 DB2 定 * zL Cross Access 戍 Classic Connect 酨灥 VSAM 詰 IMS * 鸉 DB2 Universal Database for OS/390 洢擋獛搨 * 鸉赴IBM 豢佬齗赳戍矧擋泚鏼 42.27.1 揅壧[ o纙J臝n祗腦揅壧獛耶彀赴揅壧腦酯v柜躒珫虪柅嗀o纙J戍鶔愫 鬞耶 1. 雚 DB2 Universal Database for OS/390 忪鎙揅壧 OS/390 鋅z獛搨耶 2. 鶔s鞮]肄珫戍耶 3. ]肄s哎胃 o 眃瓬鋅z鎈鏮獛搨祌繾耶 o 鋅z獛搨瓬醨酨灥戍定祌繾耶 4. 劑抑s膣 CLI耍s膣摃茗抑定耶 5. ]鑅鞮戍 ODBC 鱌絛]肄耶 6. ]鑅騅v耍屑媥蛈猺G o 養鸉鋅z鎈鏮獛搨耶 o W DSNAOCLI 嗀鸉v貙耶 o 韄瓬 ODBC 鷲到嗀收g戍騅v(愩刖茫繐)耶 7. 鼖韥鋅z鎈鏮獛搨耶 42.27.2 揅壧腦 揅壧 OS/390 鋅z獛搨 OS/390 鋅z獛搨衣廈腺 DB2 Universal Database for OS/390 次劑 7 忪鎙珫耶巷囓 酀忪鎙詻衣戍獛搨到耍 鄧灥隳揅壧 OS/390 鋅z獛搨戍欏僝鬞耶 彀揅壧 OS/390 鋅z獛搨祌容耍鞮澱鏺樺彀 DB2 氡鑶豜W矧擋 APAR PQ36585 詰 PQ36586耶 鶔s鞮]肄珫戍 |醨鋅z獛搨嵢愫 DB2 定耑鋇到瞉瞉耶 柰媴削膋O削 .profile 戍洇委耶.profile |肄霿耍 遮擂澱鏺 彀鼖韥鋅z鎈鏮獛搨戍媥蛈犌村_絛到珫胃 export VWS_LOGGING=/usr/lpp/DWC/logs export VWP_LOG=/usr/lpp/DWC/vwp.log export VWS_TEMPLATES=usr/lpp/DWC/ export DSNAOINI=/usr/lpp/DWC/dsnaoini export LIBPATH=usr/lpp/DWC/:$LIBPATH export PATH=/usr/lpp/DWC/:$PATH export STEPLIB=DSN710.SDSNEXIT:DSN710.SDSNLOAD ]鑅s哎 礔繐]肄眃瓬鎈鏮獛搨s哎耍巷醨柰貘o閭枵 /etc/services 詰 TCPIP.ETC.SERVICES 胃 vwkernal 11000/tcp vwd 11001/tcp vwlogger 11002/tcp 礔繐彀 OS/390 鋅z獛搨瓬定繾]肄s哎耍醨摃茗抑定s柱 OS/390 q 埔定 (CDB)耶o斖板倌鰜d CDB INSERT胃 INSERT INTO SYSIBM.LOCATIONS (LOCATION, LINKNAME, PORT) VALUES ('NTDB','VWNT704','60002'); INSERT INTO SYSIBM.IPNAMES (LINKNAME, SECURITY_OUT, USERNAMES, IPADDR) VALUES ('VWNT704', 'P', 'O', 'VWNT704.STL.IBM.COM'); INSERT INTO SYSIBM.USERNAMES (TYPE, AUTHID, LINKNAME, NEWAUTHID, PASSWORD) VALUES ('O', 'MVSUID', 'VWNT704', 'NTUID', 'NTPW'); 礔茫]鑅s哎戍欏僝鬞耍巷囓酀 DB2 UDB for OS/390 Installation Guide (GC26-9008-00) 珫戍赴Connecting Distributed Database Systems赳躒耶 s膣 CLI 廅長 OS/390 鋅z獛搨媥 CLI 鉒P DB2 齘q耍 鞮澱鏺醨 CLI W杉s膣詻嗀鞮 戍鋅z獛搨繐酨灥戍茗抑定耶 o斖板柜劑抑 DB2 for OS/390 定戍削裼s 膣霄闉z搨胃 BIND PACKAGE (DWC6CLI) MEMBER(DSNCLICS) ISO(CS) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLINC) ISO(NC) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLIRR) ISO(RR) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLIRS) ISO(RS) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLIUR) ISO(UR) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLIMS) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLIC1) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLIC2) BIND PACKAGE (DWC6CLI) MEMBER(DSNCLIF4) o斖板柜鸉彀 Windows NT 柼戍 DB2 定戍削 bind package 闉z搨胃 BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLICS) ISO(CS) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLINC) ISO(NC) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIRR) ISO(RR) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIRS) ISO(RS) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIUR) ISO(UR) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIC1) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIC2) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIQR) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIF4) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIV1) BIND PACKAGE (NTDB.DWC6CLI) MEMBER(DSNCLIV2) o斖板柜譇削 bind 闉z搨耍醨 CLI 霄柜鱌s膣W彷洐G BIND PLAN(DWC6CLI) PKLIST(*.DWC6CLI.* ) ]鑅 ODBC 鱌絛]肄 削 ODBC 鱌絛]肄 (inisamp) 洇鰗彀 usr/lpp/DWC/ 到珫耶鞮養鄧哀殛 鄧黂幏鞮戍鑶釱媥蚼A詰舌擔鞮椻洳戍耶礔繐俊肄儘俊廇B鏼耍 巷ъ 洄譂≡a歧呃胃 * DSNAOINI 澱鏺嵢鱌絛]肄耶 * 巰澱鏺媥 dsnaoini.location_name 戍祺巰伶蒤C * 澱鏺霄服 CONNECTTYPE=2 瓬 MVSATTACHTYPE=CAF 囓耶 礔茫s膣 CLI 烈 DSNAOINI 戍欏僝鬞耍巷囓酀 DB2 UDB for OS/390 ODBC Guide and Reference(SC26-9005)耶 ]鑅騅v OS/390 鋅z獛搨板柜譇鎈鏮獛搨獛耶鞮養鄧媥豜@戍 UNIX 揅曄詫詰 OS/390 UNIX 揅曄詫僤鬾鋅z鎈鏮獛搨耶 廅長鋅z獛搨茫繐鎈鏮獛搨v貙耍巷肄霿o鋅z獛搨養鸉長赴RACF 獛搨嚭 赳胃 * libtls4d.dll * iwhcomnt.dll * vwd 儵彀 RACF 獛搨嚭珫肄霿養鸉戍獛搨耍 巷炵黈赴暖珫眃赳養鸉詻彀 戍到耍鸉柰媴銻胃 extattr +p libtls4d.dll extattr +p iwhcomnt.dll extattr +p vwd 礔繐媥軝 +p 囓戍 extattr 銻耍 屑腺 BPX.FILEATTR.PROGCTL FACILITY ю 顢鞮澱鏺嗀伸v貙耶 柰媴削ず擋僔N殛\養v聤牉媥蛈 ID SMORG 戍 RACF 銻胃 RDEFINE FACILITY BPX.FILEATTR.PROGCTL UACC(NONE) PERMIT BPX.FILEATTR.PROGCTL CLASS(FACILITY) ID(SMORG) ACCESS(READ) SETROPTS RACLIST(FACILITY) REFRESH 腺騅v戍欏僝鬞耍巷囓酀 OS/390 UNIX System Services Planning (SC28-1890) 耶 鼖韥鋅z鎈鏮獛搨 彀鞮蘠歈歧呃鑶豜鶖耍巷鼖韥鋅z鎈鏮獛搨胃 1. Telnet OS/390 柼戍 UNIX Systems Services耍zL OS/390 host 瓬 USS 靇耶 2. 鼖韥鋅z鎈鏮獛搨胃 o 礔繐彀甓鴽鼖韥鎈鏮獛搨耍巷彀祺銻珫枵 vwd耶 o 礔繐彀甓鴽鼖韥鎈鏮獛搨耍巷枵 vwd>/usr/lpp/DWC/logs/vwd.log 2>&1 & 礔繐ъ OS/390 鋅z鎈鏮獛搨板騶彀鸉珫耍巷彀 UNIX Shell 祺銻枵柰媴 銻胃 ps -e | grep vwd 詰舌耍彀 OS/390 遭嚭鬧枵 D OMVS,a=all 耍虋j餬戠 vwd 42.27.3 ]鑅オ鴉戍鋅z獛搨 DB2 Warehouse Manager 霄霄服柰媴媥蛈瑏w霿獛搨胃 * vwpftp胃鸉 FTP 銻耶 * vwpmvs胃鋇 JCL 泚鏼泊耶 * vwprcpy胃媥 FTP 盎耶 * XTClient胃雚膼熪獛搨耶 * etidlmvs胃ETI (Evolutionary Technologies International) 虪戍洢擋獛 搨胚 養飁 MVS 柼戍耶 * etircmvs胃ETI 虪戍洢擋獛搨胚養彀 MVS 遭q柼鸉 FTP耶 * etiexmvs胃ETI 虪戍洢擋獛搨胚養彀 MVS 柼鸉 JCL耶 殛祌鴉耍鞮養鄧彀赴暖珫眃赳擔媥蛈瑏w霿獛搨瓬暖酨獛耶OS/390 鋅z 獛搨儭摃養彀 UNIX 鑶蛈A髕柰鸉戍養鸉耶 柜譇媥蛈瑏w霿獛搨|肄聤柜譇詰愫譇纙J耶♂z鸉媥蛈瑏w霿獛搨耍|熪擁 柰媴韥鏼胃 * 鋅z獛搨鼖韥耶 * 鋅z獛搨鸉媥蛈瑏w霿獛搨耶 * 媥蛈瑏w霿獛搨廌廌剽俄瓬廌踂聤鋅z獛搨耶 * 鋅z獛搨醨膣刖廌眃耶 長柅彀 OS/390 柼鸉 ETI耍鞮澱鏺樺醨 FixPack 2 和擋 DB2 Universal Database 次劑 7.1耶 媥 VWP_LOG 鉊w霿柜譇到耍虪媥蛈瑏w霿戍獛搨柞枵鋇耶 愩刖鞮媥釱媥蛈瑏w霿獛搨鉧 FTP 鋇泚鏼耍 鞮澱鏺樺擔繐鋇戍 JCL 瓬 耶 JCL 珫戍泚鏼巰投澱鏺板 USERIDx耍 珫 x 板柜譇柜戠祅戍戠噸詰戠 (削 蒤GMYUSERA)耶霄鰗彀 JCL 珫戍 MSGCLASS 瓬 SYSOUT 戍鋇ю顢澱鏺肄 JES-held 鋇ю顢耶 貙胃詻鋇泚鏼戍瘐j LRECL 板 254 譇戠祅耶JES 骷|颸鴶 JCL 戍容 72 譇戠 祅耶 鶔赴暖珫眃赳FTP 儭戍研吏 赴暖珫眃赳揅壧柅柜譇 JCL 研吏耍虪媥 FTP 鷫耶愩刖鞮繣 OS/390 鋅z獛搨媥 FTP 銻 GET 詰 PUT 雚欣 OS/390 遭q鷫駙柜譇 茗抑遭q耍鞮茫繐長 OS/390 鑶鶔 JCL 研吏珫戍鎟鬞胃 1. 鄧柜譇嗀v貙彀 /usr/lpp/DWC 到珫盎瓬鶔s戍 ID 熡枵耶 2. 餬 ftp.jcl耍虋擋s戍巰 systemname.ftp.jcl 盎耍 珫 systemname 板 OS/390 鑶蛈抖W投耶 3. 擔殛戍劑聤臠柜譇鞮繐彀柼鸉黈獛搨 vwpmvs 詰 ETI extract 戍 OS/390 鑶蚼C蜙p耍 愩刖鞮繐彀 STLMVS1 柼鸉柜譇獛搨耍 擔柜譇 巰投長 STLMVS1.ftp.jcl 戍劑耶 4. 媥豜戠哀獛搨靲膴q JCL耍鄧幏鞮霠鬧戍茫臡耶 鶔鎟鬞鄧幏鞮 戍 MVS 鑶蛈妞歭鎟鬞耶巷鶔摃服躲 ([) 洇戍囓耍 洃愩 [USERID] 瓬 [FTPFILE]耶(服躲牁顢長柂炟灁戠祅 x'AD' 瓬 x'BD'耶礔鞮 戍 TSO 抑鼭ю悚彀 SPF 醳 0 珫冀]歈 3278A耍o襏養|ず歈蕶屆 戠祅耍椴板服躲耶 o虋|板齶ガ耍 愩刖鞮鑭嗀鶔 x'AD' 詰 x'BD'耍 詰舌摃戠祅祌繾戍耶) 5. 鶔s VWS_TEMPLATES耍嵢盎戍研吏戍到耶 赴暖珫眃赳霄鰗殛削 JCL 研吏胃 //[USERID]A JOB , 'PUT/GET', // CLASS=A, // USER=&SYSUID, // NOTIFY=&SYSUID, // TIME=(,30), // MSGCLASS=H //STEP1 EXEC PGM=FTP,PARM='( EXIT' //INPUT DD DSN=[FTPFILE],DISP=SHR //OUTPUT DD SYSOUT=* //SYSPRINT DD SYSOUT=* 灥皇式詰戍洇委 鞮養媥 OS/390 鋅z獛搨僓ㄛ DB2 式烈貕戠戍洇委耍 洃愩 UNIX 鑶蛈A 髕瓬 OS/390 擁貕戠耶鞮柛養媥 OS/390 鋅z獛搨鄧 Classic Connect 灥皇 IMS 詰 VSAM 戍洇委耶腺貕戠耍鋅z獛搨|表肄霿戍洇委珫戍 囓僛P肄搨耶 42.27.4 擋熪獛搨獛暖纙J (XTClient) 媥熪獛搨養雚 OS/390 樹鬧獛暖纙J耶 鞮詰板 OS/390 泚鏼獛獛搨養鄧 鋇柜譇|熪赴暖珫眃赳纙J戍泚鏼耶愩刖纙J鐀顟蘠歈耍JCL 珫戍熪搨 纙J|廌廌剽俄 0耶 彀 OS/390 UNIX 鑶蛈A髕柼澱鏺揅壧 JDK 1.1.8 詰鶔s次劑鄧媥熪獛搨耶礔繐 鼖韥熪搨耍 巷樺彀鸉暖再齗戍鼭齗柼鼖韥 XTServer耶殛獛養腺 暖珫眃扯z銳戍 5 耍 癸ガ長赴雚暖珫眃祌鴉鼖韥纙J赳耶XTServer 鼖韥祌耍巷彀 OS/390 柼鼖韥 XTClient耶柰媴削ず鼖韥熪搨戍 JCL 削 蒤C //DBA1A JOB 1,'XTCLIENT',CLASS=A,MSGCLASS=H, // MSGLEVEL=(1,1),REGION=4M,NOTIFY=&SYSUID //****************************************************** //* submit iwhetrig //****************************************************** //BRADS EXEC PGM=BPXBATCH, // PARM=('sh cd /usr/lpp/DWC/; java XTClient 9.317.171.133 1100x // 9 drummond pw bvmvs2nt 1 1 100') //STDOUT DD PATH='/tmp/xtclient.stdout', // PATHOPTS=(OWRONLY,OCREAT), // PATHMODE=SIRWXU //STDERR DD PATH='/tmp/xtclient.stderr', // PATHOPTS=(OWRONLY,OCREAT), // PATHMODE=SIRWXU // : 柼翷削 JCL 俄ず愩摃~囓柰柜耶妄板枵囓耍柜托 71 譇托耍彀 72 譇托舅柜譇 'X'耍 潒彀柰柜戍 16 譇托~耶 囓 (cd /usr/lpp/DWC/;) 戍柜譇倔瘁N到鶔揅壧 OS/390 鋅z獛搨戍 鑅耶 囓戍柫倌瓕裲 XTClient 虋祝柰媴 8 譇囓胃 * 赴暖珫眃赳再齗遭q巰投詰 IP 鶐 * 赴暖珫眃赳再齗靇 (q鎈長 11009) * 赴暖珫眃赳媥蛈 ID * 赴暖珫眃赳q俄 * 繐鸉戍纙J巰投 * 赴暖珫眃赳再齗銻耍珫胃 o 1 = 鯔J纙J o 2 = 醨纙J共鵃灚研搨 o 3 = 醨纙J共擁研搨 o 4 = 醨纙J蹢鵃灚研搨 o 5 = 醨纙J蹢礤熪研搨 * 板騶瞉殊纙J蘠歈戍醳耍珫 1= 板耍0 = 騶 * 瘐j媴 (媥 0 詰曉黽灥詻嗀媴) 42.27.5 黈獛搨 媽祊 o 12 譇黈獛搨板 Java 暖酨獛耍虪柜劑戍黈耶 長柅鸉o黈 獛搨耍鞮澱鏺樺彀 DB2 氡鑶豜W]肄 Java 暖酨獛耶 腺o黈獛搨戍醋 鬞耍 巷囓酀 IBM DB2 Universal Database Data Warehouse Center 扯z銳 次劑 7耍SC40-0496-00耶 IWH.CLEAN IWH.PERIODTABLE IWH.KEYTABLE IWH.CHISQUARE IWH.CORRELATION IWH.STATISTICS IWH.INVERTDATA IWH.PIVOTDATA IWH.REGRESSION IWH.ANOVA IWH.SUBTOTAL IWH.MOVINGAVERAGE ]鑅赴Java 暖酨獛赳 o銻板蘠鬷戍媽次耍祗腦愩摃]肄 Java 暖酨獛耍巷囓酀 Application Programming Guide and Reference for Java(TM)耍SC26-9018 1. 彀 DB2 氡鑶豜W矧擋 PTFs UQ46170 碉 UQ46114耶 2. 彀 OS/390 鑶豜W揅壧 Visual Age for Java 2.0 詰鄧柼次劑耶 3. 彀 DB2 柼揅壧 JDBC耍醨 JDBC 和麩s膣 DB2 氡鑶蚼C 4. 彀 DB2 氡鑶豜W]肄 RRS 碉 DB2 WLM 暖酨獛耶 5. ]肄鞮 DB2 戍 Java 暖酨獛耶霄服長 Java 暖酨獛鶐繾擔柜譇 Java WLM 鼖韥獛耶 6. 彀 WLM 祌柰耍鞮澱鏺醨 Java WLM 鼖韥獛膣幏柜譇 WLM 蜙W投耶巷媥 WLM 睦擋獛搨蜪e貘赴擔睦擋獛搨蒤v馰幏蜙W投碉 JCL 獛耶 7. 彀 CREATE PROCEDURE 詰 ALTER PROCEDURE 戍 WLM_ENVIRONMENT 醳柼肄 WLM 睦擋獛搨蜙W投耍醨暖酨獛詰媥蛈瑏w霿戍膣幏柜譇睦擋獛搨 蒤C 8. 俊肄鞮戍 DB2 鼖韥鏼~戍嗀舌爩酨灥v靲s灥 Java WLM 鼖韥獛珫戍 定耶 暖黈獛搨戍]鑅纙J o銻板蘠鬷戍媽次耍巷囓酀IBM DB2 Universal Database Data Warehouse Center 扯z銳 次劑 7耍SC40-0496-00 1. 醨 Fixpack 3 矧擋 DB2 Universal Database for NT 次劑 7耍 詰醨赴暖 嚭定赳鶔s歈 TRANSREGISTERED = 1 碉 TRANSFENCED=1耶 儵鶔s赴暖嚭定赳耍巷彀 DB2 Universal Database 祺銻Bz齗柼 枵柰媴 SQL胃 CONNECT TO your_vw_control_database UPDATE IWH.INFORESOURCE SET TRANSREGISTERED = '1' WHERE SUBDBTYPE = 'DB2 MVS' UPDATE IWH.INFORESOURCE SET TRANSFENCED = '1' WHERE SUBDBTYPE = 'DB2 MVS' 2. 肄霿黈獛搨 DB2 o 礔鞮嗀 DB2 for OS/390 次劑 7耍巷媥 /usr/lpp/DWC/createXfSQLV7 珫戍 SQL 闉z搨耶 o 礔鞮嗀 DB2 for OS/390 次劑 6耍巷媥 /usr/lpp/DWC/createXfSQL 珫 戍 SQL 闉z搨耶 o 礔鞮嗀 DB2 for OS/390 次劑 5耍巷媥 /usr/lpp/DWC/createXfSQL 珫 鬙戍 SQL 闉z搨耶 齁詻嗀 CREATE PROCEDURE 闉z搨戍鬙耶 潒 齁 INSERT INTO SYSIBM.SYSPROCEDURES 闉z搨戍鬙耍擋鉊w霿 DB2 for OS/390 次劑 5 戍黈獛搨耶 ♂z]肄 Java 暖酨獛耍鞮媥 WLM 馰幏 Java WLM 鼖韥獛碉柜譇 WLM 蜙W投耶蜙W投肄腺 CREATE PROCEDURE 闉z搨戍 WLM ENVIRONMENT 醳珫耶 DSNWLMJ 板洇鰗腺柼翷黈獛搨肄霿珫戍 WLM 蜙W投耶 鞮養s柱 DSNWLMJ 戍 WLM 皖巰投耍詰醨臠柜譇黈獛搨肄霿戍 WLM ENVIRONMENT 醳 鶔長鞮洄膣幏鼖韥獛戍巰投耶 3. 雚 UNIX 鑶蛈A髕]肄膣僯s膣 IWH710.SIWHLOAD 珫戍黈獛搨枵研摮C o 鄧 Telnet s鼪鞮 OS/390 遭q鑶蛈 UNIX 鑶蛈A髕耶 o 炵黈鞮揅壧 OS/390 鋅z獛搨戍到耶w]揅壧到板 /usr/lpp/DWC耶 o 礔鞮媥 DB2 V7耍巷灛纙J 4耶礔鞮媥 DB2 V5 詰 V6耍 巷彀揅壧 到珫哀 trlinks 鐖耶彀殛戍柜珫閭柼柜譇 # 襶馰鬙殛 胃 ln -e IWHXFV7 xf.jll; 齁柜戍 # 襶僣齁殛戍鬙耶 #ln -e IWHXF xf.jll; 暖酨鞮戍鶔耶 o 枵 trlinks 虋柰枵耶o|彀到珫擔柜譇 xf.jll 膣耍擋鉈 鋅z獛搨枵 IWHXF 詰 IWHXFV7 研摮C 4. zL APF 騅v IWH710.SIWHPDSE耍潒s柱 DB2 Java 暖酨獛鼖韥獛戍 STEPLIB s鼪耶 5. 醨鞮戍 xf.jll 膣詻彀戍到 (w]襏胃/usr/lpp/DWC) s柱 WLM 裱 鐖珫戍 CLASSPATH 碉 LIBPATH 耶 o 礔鞮俊肄 WLM 鐖戍鑅耍巷泥表鞮戍 DB2 Java 暖酨獛鼖韥獛 耶鞮戍 WLM 裱鐖板鞮戍 JAVAENV DD 鞏嵢戍鐖耶 6. 鼖韥暖酨獛耍潒擔虋鸉暖纙J耶 Java 暖酨獛戍貙 柜譇暖酨獛戍癸韄珫戍 Java 旨麩譧腺 DB2 for OS/390 次劑 7 珫浂儭耶廅殛耍 黈獛搨彀 DB2 for OS/390 次劑 5 詰 6 戍囓珫儭 NULL 襏耶彀o次劑 珫耍礔鞮祝 NULL 襏耍屑|長s僯Bz耶 次劑 5 碉 6 黈獛搨醨s囓長 戠耶 DB2 譧腺 DB2 for OS/390 次劑 7 珫儭 COMMIT SQL 闉z搨耶INVERTDATA 暖酨獛 養彀暖酨獛洇鵛鞥虋薿式胚 廅殛茫繐 commit 闉z搨耶 腺殛z墨耍DB2 for OS/390 次劑 5 詰次劑 6 儭 IWH.INVERTDATA耶 DB2 for OS/390 儭 Java 媥蛈瑏w霿戍耍詻鄧 390 樹鬧柼儭 IWH.FORMATDATE耶 Java 暖酨獛戍削蜤裲祔{ (祗腦腺赴DB2 for OS/390 Application Programming Guide and Reference for Java赳)胃 //DSNWLMJ PROC DB2SSN=DSN,NUMTCB=5,APPLENV=DSNWLMJ <-- WLM ENVIRONMENT value in CREATE PROC //******************************************************************* //* THIS PROC IS USED TO START THE WLM-ESTABLISHED SPAS * //* ADDRESS SPACE FOR THE DSNWLMJ APPLICATION ENVIRONMENT * //* V WLM,APPLENV=DSNWLMJ,RESUME * //******************************************************************* //DSNWLMJ EXEC PGM=DSNX9WLM,TIME=1440,REGION=0M, // PARM='&DB2SSN, &NUMTCB, &APPLENV' //STEPLIB DD DSN=DSN.TESTLIB,DISP=SHR // DD DSN=IWH710.SIWHPDSE,DISP=SHR <--This has the transformers in it // DD DSN=DSN.HPJSP.PDSE.JDBC,DISP=SHR <--HPJ DLLs from HPJ setup // DD DSN=SYS1.PP.PDSELINK,DISP=SHR <--HPJ runtime libraries // DD DSN=DSN710.SDSNEXIT,DISP=SHR // DD DSN=DSN710.SDSNLOAD,DISP=SHR // DD DSN=SYS1.SCEERUN,DISP=SHR // DD DSN=DSN.PDSE,DISP=SHR <--HPJ setup info //JAVAENV DD DSN=DSN.WLMENVJ.JSPENV,DISP=SHR <--Environment variables, see below //CEEDUMP DD SYSOUT=A //DSSPRINT DD SYSOUT=A //JSPDEBUG DD SYSOUT=A //SYSABEND DD SYSOUT=A //SYSPRINT DD SYSOUT=A 削蒴鐖 (祗腦腺赴DB2 for OS/390 Application Programming Guide and Reference for Java赳)胃 ENVAR("TZ=PST07", "DB2SQLJPROPERTIES=/usr/lpp/db2/jdbc/db2710/classes/db2sqljjdbc.properties", "LIBPATH=/usr/lpp/DWC", "VWSPATH=/usr/lpp/DWC", "CLASSPATH=/usr/lpp/db2/jdbc/db2710/classes:/usr/lpp/DWC:/usr/lpp/hpj/lib"), MSGFILE(JSPDEBUG) 黈獛搨戍奄砰躨儭 OS/390 鋅z獛搨擁戍毠倌穰T昔芥鷫 NT 樹鬧僝繾A 詻鄧毠愫餼如柰耍 鬞昔砰躨鑶拚鶅 UDB for NT 愩摃揅壧椴肄耶 黈獛搨板蒝~耶OS/390 鋅z獛搨 虪柰媴鬞昔虪黈獛搨媥蚼G File name: For language: Xf.properties_Fi_FI Finnish in Finland Xf.properties_No_NO Norwegian in Norway Xf.properties_Ru_RU Russian in Russia Xf.properties_Zh_CN Chinese in China (People's Republic of China) Xf.properties_Zh_TW Chinese in Taiwan Xf.properties_Da_DK Danish in Denmark Xf.properties_De_DE German in Germany Xf.properties_En_US English in U.S. Xf.properties_Es_ES Spanish in Spain Xf.properties_Fr_FR French in France Xf.properties_It_IT Italian in Italy Xf.properties_Ja_JP Japanese in Japan Xf.properties_Ko_KR Korean in Korea Xf.properties_Pt_BR Portugese in Brazil Xf.properties_Sv_SE Swedish in Sweden 礔鞮戍黈獛搨鬞昔板禭耍巷灥柼翷珫柜譇耍醨洇委盎 Xf.properties耶 42.27.6 酨灥 DB2 鑶媴祌鴉戍定 礔繐酨灥唏 DB2 Universal Database 鑶媴戍定耍OS/390 鋅z獛搨媥 DataJoiner耶 DataJoiner 養儩Nz獛搨媥釤q鎈戍 DRDA 泊耍 灅葛擂餪板 UDB 定耶愩刖 ODBC 繐臡Q矧柜譇唏 DB2 鑶媴定僬垠ADataJoiner |碰駒 衣閭柳歃戍獛搨俄靲s灥鴉郎材定耶 DataJoiner 養鄧酨灥 Oracle耑Sybase耑Informix耑Microsoft SQL Server耑 Teradata 瓬摃擂鸉彀 Windows NT耑AIX 詰 Sun Solaris 鏼~蓔W嗀 ODBC X韥獛搨戍定耶OS/390 鋅z獛搨養酨灥鏼長僬咻 DataJoiner耍 椷鏼長癸餪 養鄧耶DataJoiner 儭柫藶沮戍 COMMIT耶 潒 DataJoiner 彀次劑 2.1 瓬 2.1.1 珫儭 TCP/IP 鏼長睦擋獛搨繐臡齗耍 椷擂虋鑭嗀睦擋獛搨再齗耶廅長 OS/390 鋅z獛搨 茫繐睦擋獛搨再齗僓媥 TCP/IP耍 巷擋 SNA s哎僔q OS/390 酨灥 DataJoiner耶 彀 OS/390 柼酨灥 IMS 瓬 VSAM Classic Connect 養譇顢雚暖鋅z獛搨菸曤瓬揅壧耶 OS/390 鋅z獛搨zL Classic Connect ODBC X韥獛搨靲s灥 IMS 瓬 VSAM耶Classic Connect 養旚z]鑅 IMS 瓬 VSAM 鐖戍 DB2-like 肄霿耍 潒媥 ODBC 靲s灥擂謰耶 OS/390 鋅z獛搨|拚鶅繐臡板騶矧 Classic Connect 詰 DB2耍 僝枵儘俊戍 ODBC X韥獛搨耶愩刖鞮繐酨灥 DB2 僬垠A 鋅z獛搨|枵 DB2 ODBC X韥獛搨耶愩 刖鞮儘彀酨灥 VSAM 詰 IMS 僬垠A 鋅z獛搨|枵 Classic Connect ODBC X韥獛 搨耶潒餪|Bz鋅z獛搨繐臡耶 ]鑅 Classic Connect ODBC X韥獛搨烈暖酨灥 Classic Connect 養譇顢雚 OS/390 鋅z獛搨菸曤瓬揅壧耶 Classic Connect 養醨 柜詰柜譇戍柜倌欉長柜詰愫譇皖搨式耶 鞮澱鏺杯 IMS 碉 VSAM 耍浂 Classic Connect 酨灥耶 鞮養韥杯詰媥 Microsoft Windows Classic Connect 唏皖搨杯獛搨耶 1. 彀 OS/390 柼揅壧 Classic Connect Data Server耶 2. 擋詫胃彀 NT 柼揅壧 Classic Connect Data Mapper 恙耶 3. 肄霿 Classic Connect 戍閮式肄霿耍 Classic Connect 養痯娩靲s灥 耶鞮養媥釬杯獛搨鉈擔 IMS 碉 VSAM 膣呃戍肄霿耍詰韥擔肄 霿耶 4. 彀鞮]肄 Classic Connect 祌耍鞮養]肄腺暖戍酨灥v貙胃 a. 擔柜譇 Classic Connect .ini 耶 削 Classic Connect 睦擋獛搨歧呃 cxa.ini 彀 /usr/lpp/DWC/ 到 珫耍遮擂|彀o盎聤鞮胃 * national language for messages NL = US English * resource master file NL CAT = usr/lpp/DWC/v4r1m00/msg/engcat FETCH BUFFER SIZE = 32000 DEFLOC = CXASAMP USERID = uid USERPASSWORD = pwd DATASOURCE = DJX4DWC tcp/9.112.46.200/1035 MESSAGE POOL SIZE = 1000000 b. 鶔s .ini 珫戍 DATASOURCE 耶o柜霄鰗柜譇僬待W投瓬柜譇 q埔灨肄鶐耶 僬待W投澱鏺烈 Classic Connect 再齗柼肄 霿戍 Query Processor 巰投虎睦耍 鑅彀再齗戍黂鑅珫戍 QUERY PROCESSOR SERVICE INFO ENTRY耶q埔灨肄鶐養彀嵥柜譇珫 戍 TCP/IP SERVICE INFO 熡到耶o譇斖戍 USERID 瓬 USERPASSWORD |彀肄霿暖僬咿擋耶 c. 鋇 CXA_CONFIG Classic Connect 獛搨耍 擂謰q鎈烈 .ini 彀虎嵥戍到耶 d. 鶔s LIBPATH 耍醨尚閭 Classic Connect 獛搨耍 q鎈碉 .ini 彀虎嵥戍到珫耶 e. 擋詫胃媥郫灚獛搨 cxasamp ъ揅壧胃彀鞮戍.ini 詻彀戍 到珫枵 cxasamp耶 location/uid/pwd 板肄霿腺 .ini 珫戍 data source name/userid/userpassword耶 f. 肄霿僬持暖耍餪愩嵥鞮肄霿摃 DB2 僬垠C 鞮茫繐颳鶔s dsnaoini 耍 廅長 DB2 for OS/390 鑭嗀X韥獛搨扯z耶 Classic Connect 戍X韥獛搨扯z洇彀 OS/390 鋅z獛搨珫耶 42.27.7 鸉 DB2 for OS/390 洢擋獛搨 鞮澱鏺醨 APAR PQ44904 矧擋 OS/390 鋅z獛搨耍鄧堉媥袛Nz獛搨僤鬾洢擋獛 搨耶 DSNUTILS 板柜譇彀 WLM 烈 RRS 蓔祄鬾戍 DB2 for OS/390 暖酨獛耶鞮養鄧擋 擂僤鬾摃墨媥蛈瑏w霿暖酨獛祊貘詻揅壧戍 DB2 洢擋獛搨耶DB2 for OS/390 LOAD耑REORG 瓬 RUNSTATS 洢擋獛搨虪洇委式耍虪鞮擋鶔洢擋獛搨愩摃鸉耶 儵鶔洢擋獛搨戍洇委耍巷彀洢擋獛搨戍赴Bz研悚擁齗赳甇柼柜柰餒耍嫀 柜柰洇委耶 Warehouse Manager 虪 DSNUTILS 戍祊貘耍旚z彀 Warehouse Manager 纙J珫養 枵 DB2 洢擋獛搨耶 礔繐]肄 DSNUTILS 暖酨獛胃 1. ≡w壧 DB2 耍鸉 DSNTIJSG 泚鏼僯]肄碉s膣 DSNUTILS 暖酨獛耶巷俊 肄 DSNUTILS 戍肄霿嗀 PARAMETER STYLE GENERAL耶 2. 鼖擋 WLM 扯z戍暖酨獛耶 3. ]肄 RRS 瓬 WLM 蒤C 4. 鸉 DB2 虪戍削裷歃 DSNUTILS 獛搨耶(殛纙J唏澱繐耍椷鸉耶) 5. 醨 DSNUTILS W妖P DSNCLI W李@s膣耍愩殛 CLI 餪養鄧碰駒暖酨獛胃 BIND PLAN(DSNAOCLI) PKLIST(*.DSNAOCLI.*, *.DSNUTILS.*) 6. 媥 Warehouse Manager ]肄纙J虋鸉欑纙J耶噸ю悚睦欑板 APPEND耶礔 板耍屑鸉洢擋獛搨祌容耍Warehouse Manager |飁式珫戍詻嗀醳耶 媥 LOAD 洢擋獛搨彀 DB2 for OS/390 式祌繾盎 糶]鞮Q繐醨式柜譇貕戠鄎盎式耍潒醨貕戠枵駙柜譇式 耶 鞮q鎈澱鏺耍哀枵嚭闉z搨僓擁戍耍 潒枵 耶zL暖耍鞮養肄鞮繐薿s枵嵥戍式耍 澱彀纙J祌繾欘碉韥哀 嚭闉z搨耶 鷽妄愩柰胃媥 Reorg/Generic 祊貘鉈擔柜譇纙J耍 珫媥 UNLOAD 洢擋獛搨詰 REORG TABLESPACE 洢擋獛搨僓柜譇耶o譇洢擋獛搨| 擁譇鋇鐖耍 珫柜譇鰗嗀式耍駙柜譇鰗嗀養枵 LOAD 戍洢擋獛 搨嚭闉z搨耶 彀洢擋獛搨詻擁戍嚭闉z搨珫耍 INTO TABLE 式巰投板洄 戍式巰投耶鄧柰ず鞮養彀 Reorg Unload 纙J珫媥蛈 DSNUTILS 囓削蒤G 式 33. Reorg Unload 纙J戍洇委 UTILITY_ID REORGULX RESTART NO UTSTMT REORG TABLESPACE DBVW.USAINENT UNLOAD EXTERNAL UTILITY_NAME REORG TABLESPACE RECDSN DBVW.DSNURELD.RECDSN RECDEVT SYSDA RECSPACE 50 PNCHDSN DBVW.DSNURELD.PNCHDSN PNCHDEVT SYSDA PNCHSPACE 3 媥 Reorg/Generic DSNUTILS 祊貘鉈擔柜譇枵纙J耶 DSNUTILS 洢擋獛搨闉z 搨囓q鎈肄柜譇洢擋獛搨嚭闉z搨耶 暖洢擋獛搨祊貘委\洢擋獛搨闉z搨 珫鋇{巰耶 鞮養媥觙戠 FILE 鉈肄霄鰗嗀嚭闉z搨戍耍 鄧瓬 媥觙戠 TABLE 鉈肄鞮繐枵戍式巰投耶 礔繐媥 LOAD 洢擋獛搨僓媥袛 容削膃夾鋇耍 巷彀 LOAD 洇委珫矧擋柰媴囓襏胃 : 彀 UTSTMT 珫耍枵柜譇枵闉z搨耍詰枵 REORG 洢擋獛搨碉 UNLOAD EXTERNAL 醳詻鋇戍巰投耶 式 34. LOAD 纙J洇委 UTILITY_ID LOADREORG RESTART NO UTSTMT :FILE:DBVW.DSNURELD.PNCHDSN:TABLE:[DBVW].INVENTORY UTILITY_NAME LOAD RECDSN DBVW.DSNURELD.RECDSN RECDEVT SYSDA o腺虎嵥詰嵥 DB2 氡鑶豜W戍摃 DB2 for OS/390 僬姜M癸式芥嗀擋耶 嚭闉z搨貕戠養鄧板 HFS 詰絛 MVS 耶 礔茫鶔愫嗀 OS/390 柼養擋戍 DSNUTILS 烈 DB2 洢擋獛搨戍欏僝鬞耍 巷囓酀 DB2 for OS/390 Utility Guide and Reference耶 42.27.8 纋柞 鞮養鄧媥 OS/390 鋅z獛搨僔N Data Propagator 纋柞矧擋纙J椻韥耶纋柞茫繐 嗀柜譇僬拼定耑柜譇嚭定耍鄧瓬柜譇癸定耶o養鄧板嵥詰虎嵥 戍定耶 柜譇跌灥泚伸 DB2 矩僛P跛僬拼定珫洄s柱耑鶔s詰鶔戍 媴耶 潒耍殛泚鏼醨鶔柞枵柜譇鶔式耶 潒|鸉矧擋泚鏼醨鶔和擋 癸定珫耶 DB2 Warehouse Manager 養擔纋柞纙J鄧椻韥矧擋泚鏼耶媥 Warehouse Manager 肄霿繐鸉戍矧擋泚鏼ю悚瓬鸉戍繾耶鞮澱鏺醨 SASNLINK 定鋇 steplib 耶 s柱纋柞儭赴暖珫眃赳研吏 赴暖珫眃赳霄服柅柜譇 JCL 研吏聤纋柞儭耶 愩刖鞮繣攻n媥釤o譇 OS/390 鋅z獛搨僤鬾矧擋獛搨耍 屑鞮澱鏺長鞮戍 OS/390 鑶鶔殛研吏珫戍鎟瓬 鐖鬞耶礔繐鶔研吏胃 1. 鄧柜譇嗀v貙彀 /usr/lpp/DWC/ 到珫盎瓬鶔s戍 ID 熡枵耶 2. 餬 apply.jcl耍虋醨殛駙酨長 systemname.apply.jcl耍 珫 systemname 板 MVS 鑶蛈抖W投耶 蜙p耍愩刖彀 STLMVS1 柼耍擔戍劑 巰長 STLMVS1.apply.jcl耶 3. 媥豜戠哀獛搨靲膴q JCL耍鄧幏鞮霠鬧戍茫臡耶 鶔鎟鬞鄧幏鞮 戍 MVS 鑶蛈妞歭鎟鬞耍 虋鶔 STEPLIB DD 戍鐖瓬 MSGS DD耶 4. 愩刖茫繐耍鶔 EXEC 鞏柼戍獛搨巰投耶 礔茫鶔獛搨巰投戍欏僝鬞耍 巷囓 酀 DB2 峪烈囓楯銳耶巷鶔摃服躲([) 洇戍囓耍 洃愩 [USERID] 瓬 [APPLY_PARMS]耶(服躲牁顢長柂炟灁戠祅 x'AD' 瓬 x'BD'耶礔鞮戍 TSO 抑鼭ю悚彀 SPF 醳 0 珫冀]歈 3278A耍o襏養|ず歈蕶屆戠祅耍椴 板服躲耶o虋|板齶ガ耍 愩刖鞮鑭嗀鶔 x'AD' 詰 x'BD'耍詰舌摃戠 祅祌繾戍耶) 5. 鶔s VWS_TEMPLATES耍嵢盎戍研吏戍到耶 柰媴削ず赴暖珫眃赳珫戍 JCL 研吏胃 矧擋 JCL 研吏胃 //[USERID]A JOB ,MSGCLASS=H,MSGLEVEL=(1,1), // REGION=2M,TIME=1440,NOTIFY=&SYSUID //* DON'T CHANGE THE FIRST LINE OF THIS TEMPLATE. //* THE REMAINING JCL SHOULD BE MODIFIED FOR YOUR SITE. //********************************************** //* RUN APPLY/MVS ON OS/390 DB2 6.1 * //********************************************** //ASNARUN EXEC PGM=ASNAPV66,REGION=10M, // [APPLY_PARMS] //STEPLIB DD DISP=SHR,DSN=DPROPR.V6R1M0.SASNLINK // DD DISP=SHR,DSN=DSN610.SDSNLOAD //MSGS DD DSN=DPROPR.V2R1M0A.MSGS,DISP=SHR //ASNASPL DD DSN=&&ASNASPL,DISP=(NEW,DELETE,DELETE), // UNIT=SYSDA,SPACE=(CYL,(10,1)), // DCB=(RECFM=VB,BLKSIZE=6404) //SYSTERM DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSPRINT DD SYSOUT=* // 42.27.9 鋅z獛搨韄 \愫 DB2 Warehouse Manager 祅麩 (洃愩再齗耑矩齗耑鋅z獛搨瓬倌鰣u 暖珫眃赳) |醨矩柞枵矩到 (肄彀 VWS_LOGGING 珫)耶矩長 貕戠耶 鞮養雚赴暖珫眃赳鼖韥鋅z獛搨矩耶 彀齒甇珫耍鄧挽k柜柰暖耍 嫀柜柰洇委耶彀赴鷲柳歃赳癸蓔W耍醨]肄襏鶔歈鞮繐戍鷲柳歃耶 鋅z獛搨 鷲儭柳歃 0-4胃 * 柳歃 1 - 灁枵/塒礤鷲 * 柳歃 2 - 柳歃 1 閭柼鷲 * 柳歃 3 - 柳歃 2 閭柼鷲 * 柳歃 4 - 洇重w鱦鷲 ↖l戍]肄囍腺柳歃 1耍醨|低耶骷嗀浂睦礤鼖鷲耶鷲鬞|暖 酨彀 AGNTxxx.LOG 珫耍裱鬞|暖酨彀 AGNTxxx.SET 珫耶 ------------------------------------------------------------------------ 42.28 Windows NT 柼戍雚膼鬻薏灥 愩刖媥蛈稗覃敺h酨灥柜鬧 Windows NT Server 鼭齗柼戍 READ PERM DB 耍 椴 彀鼭齗柼板媥酓t嗀韄戍媷擋忪忘鼭鉈擔 DB2 膣耍 |愩w齔礤 鼖耶潒椴耍彀殛祌耍媥蛌縥P韄戍礤鼖繐臡虋|鷫再齗耍 椴板墨雚 霠柼戍灥鄏A髕耶饓嵋b韄齔祌耍 媥蛈瘐嚝i鄧表戍洇委耍廅長醳 砏潒彀灥祌珫耶潒椴耍愩刖板彀柜鬧 Windows NT Workstation 柼耍屑殛齶ガ 虋|熪擁耶 鬙讘板彀 Windows NT Server 柼醨熡到醳 \\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ Lanmanserver\Parameters\EnableOpLocks ]肄長 0耶墨殛熡到]肄耍臠∥zL媷 擋忪忘鼭雚雚糨u鏼霠酨灥再齗柼戍耍 繐臡柜肄|鷫再齗耍椴|墨雚 膼蘻灥鄏A髕耶廅殛耍詻嗀繐臡|薿sъ韄耶 殛鬙讘戍繑貘洋T板o皇|洋T詻嗀zL媷擋忪忘鼭雚再齗酨灥戍鬷 耶饓嵋殛]肄耍愩刖板zL杯再齗劑藀抖@擋忪忘鼭靲s灥戍 (⊥L 妄雚嵥戍雚膼蘼瓗)耍膣刖板砏|雚灥鄏A髕繐臡耶廅殛耍韄L齔虋鑭嗀擁 耶 : 彀詻嗀戍餼如柰耍愩刖酨灥板劑抑酨灥耍 椴唏zL媷擋忪忘鼭耍韄ъ 瓬戍韄L齔|愩w齔熪擁耶 ------------------------------------------------------------------------ 42.29 Enterprise Edition UNIX CD-ROM 戍灚擋恙 譂擋腺 UNIX 樹鬧次劑 6 瓬次劑 7 戍 DB2 Universal Database (UDB) Enterprise Edition (EE) CD-ROM耍 霄鰗柜和 90 洏戍 DB2 Connect Enterprise Edition (CEE) 灚擋次耶墨腺 DB2 Connect 閱板擔腺 DB2 UDB EE 恙珫耍 鞮茫繐彀洄揅壧 DB2 UDB EE 戍鑶豜W揅壧 DB2 CEE 恙餪媥 DB2 Connect 閱耶 愩刖鞮揅壧 柅 90 洏戍 DB2 CEE 灚擋次耍虋遮讘肄共騅v次劑耍餪澱鏺菸曤 DB2 CEE 恙 虋揅壧 DB2 CEE 騅v俄耶鞮茫繐薿s揅壧恙耶 彀 DB2 EE 詰 DB2 CEE for UNIX t枵柜岩珫虪柅揅壧騅v俄戍耶 愩刖鞮洄廈緺 EE 戍揅壧耍揅壧灚擋戍 CEE 恙耍峨Q繐學枮廇揅壧 CEE耍 鞮養 鄧芋駽柰媴耍颳 90 洏戍 CEE 灚擋次耶愩刖鞮颳 Connect EE 戍灚擋次耍 醨砏潒養鄧媥 DB2 EE 戍 DB2 Connect 閱耶 礔繐颳 DB2 Connect 次劑 7耍巷雚嵧譇樹鬧鬙揅壧柰媴戍鐖胃 * 彀 AIX耍鬙揅壧 db2_07_01.clic 鐖耶 * 彀 NUMA-Q 瓬 Solaris 鏼~蒤A鬙揅壧 db2clic71 和壧n耶 * 彀 Linux耍鬙揅壧 db2clic71-7.1.0-x RPM耶 * 彀 HP-UX耍鬙揅壧 DB2V7CONN.clic 鐖耶 礔繐颳 DB2 Connect 次劑 6耍巷雚嵧譇樹鬧鬙揅壧柰媴戍鐖胃 * 彀 AIX耍鬙揅壧 db2_06_01.clic 鐖耶 * 彀 NUMA-Q 瓬 Solaris 鏼~蒤A鬙揅壧 db2cplic61 和壧n耶 * 彀 Linux耍鬙揅壧 db2cplic61-6.1.0-x RPM耶 * 彀 HP-UX耍鬙揅壧 DB2V6CONN.clic 鐖耶 ------------------------------------------------------------------------ 42.30 DB2 Connect Enterprise Edition UNIX CD-ROM 戍灚擋恙 譂擋腺 UNIX 樹鬧次劑 6 瓬次劑 7 戍 DB2 Connect Enterprise Edition (EE) CD-ROM耍 霄鰗柜和 90 洏戍 DB2 Universal Database (UDB) Enterprise Edition (EE) 灚擋次耶虪 90 洏戍 DB2 UDB EE 灚擋次鏼長祌擋耍 DB2 Connect 戍 B鏼虋板澱繐戍耶 愩刖鞮揅壧柅 90 洏戍 DB2 UDB EE 灚擋次耍虋遮讘肄共騅v次劑耍 餪澱鏺菸曤 DB2 UDB EE 恙虋揅壧 DB2 UDB EE 騅v俄耶 鞮茫繐薿s揅壧恙耶彀 DB2 EE 詰 DB2 CEE for UNIX t枵柜岩珫虪柅揅壧騅v俄戍耶 愩刖鞮洄廈緺 Connect EE 戍揅壧耍揅壧灚擋戍 UDB EE 恙耍 峨Q繐學枮廇揅壧 CEE耍鞮養鄧 芋駽柰媴耍颳 90 洏戍 EE 灚擋次耶 愩刖鞮颳 DB2 UDB EE 戍灚擋次耍醨 洋T DB2 Connect EE 戍閱耶 礔繐颳 DB2 UDB EE 次劑 7耍巷雚嵧譇樹鬧鬙揅壧柰媴戍鐖胃 * 彀 AIX耍鬙揅壧 db2_07_01.elic 鐖耶 * 彀 NUMA-Q 瓬 Solaris 鏼~蒤A鬙揅壧 db2elic71 和壧n耶 * 彀 Linux耍鬙揅壧 db2elic71-7.1.0-x RPM耶 * 彀 HP-UX耍鬙揅壧 DB2V7ENTP.elic 鐖耶 礔繐颳 DB2 UDB EE 次劑 6耍巷雚嵧譇樹鬧鬙揅壧柰媴戍鐖胃 * 彀 AIX耍鬙揅壧 db2_06_01.elic 鐖耶 * 彀 NUMA-Q 瓬 Solaris 鏼~蒤A鬙揅壧 db2elic61 和壧n耶 * 彀 Linux耍鬙揅壧 db2elic61-6.1.0-x RPM耶 * 彀 HP-UX耍鬙揅壧 DB2V6ENTP.elic 鐖耶 ------------------------------------------------------------------------ 42.31 鵛鞥 Data Links Manager 鞮{彀養鄧鵛鞥肄定戍 DB2 Data Links Manager耶欣膣虎戍 SQL 繐臡祌Bz獛 烈洢擋獛搨柜皇 (蜙p耍樵/駻鑅)耍霄鰗柅烈洄歧呃定戍 DLM 祌繾戍q埔耶 彀鄧容耍DB2 潲妄鵛鞥洄歧呃戍 DLM耍饓媥搛|冀Q擋耶 o癚 SQL 瓬洢擋獛搨Bz獛衣閭戍オ鴉繑耶 柜氅s柱 DLM耍彀繐臡戍Bz獛珫烈擂 q埔戍矧概耍養|癚欣 SQL 繐臡戍噬韖 (蜙p耍 颳式/式繾/ 定)耶 ------------------------------------------------------------------------ 42.32 媥 SMIT 鬙揅壧 DLFM 祅麩養|颳オ鴉戍鐖 彀雚揅壧 Data Links Manager 戍 AIX 鼭齗柼鬙揅壧 DB2 (次劑 5耑6 詰 7) 祌 容耍 巷芋駽柰媴纙J胃 1. 鄧 root 戍蟴楹A媥豜U媴銻樵 /etc/vfs胃 cp -p /etc/vfs /etc/vfs.bak 2. 鬙揅壧 DB2耶 3. 鄧 root 戍蟴楹A擋纙J 1 詻鷽戍樵灥鋅 /etc/vfs胃 cp -p /etc/vfs.bak /etc/vfs ------------------------------------------------------------------------ 42.33 彀 Windows 2000 柼媥 CLP 熪擁砷 SQL1035N 愩刖揅壧 DB2 骷嗀欣媥蛈 (蜙p耍扯z舌) 浂爩嗀柞枵v戍到耍 柜媥 舌|彀覃潁媥 DB2 祺銻Bz齗搌砷 SQL1035N耶 礔繐鬙讘殛齶ガ耍睦彀詻嗀媥蛈稕爩嗀柞枵v戍到珫揅壧 DB2耶 ------------------------------------------------------------------------ 42.34 SQL 茨饎獛搨戍閭鎣閱 SQL 茨饎獛搨泚爩{彀秏\媥蛈猼囍〝膣幏肄嵥腺 "=" 戍膣幏B氡耶 閭鎣 閱戍赴膣幏ю悚赳 (彀 SQL 茨饎獛搨泚爩戍赴膣幏赳贄柼柜柰赴膣幏ю 悚赳盭餪鼖韥欑)耍 霄鰗膣幏B氡戍柰詹媴耶 養擋戍B氡嗀 "="耑"<>"耑"<"耑">"耑"<=" 瓬 ">="耶 SQL 茨饎獛搨板灨饎媥蛈 擔媽搨 SQL 闉z搨戍泚爩耶 擂養擋腺赴祺銻珫眃赳(赴庠搨赳癸)耑赴嚭珫 眃赳(赴擔蘞浀#v瓬赴擔熪搨赳)耑 暖酨獛鑅齗 (赴麰枵 SQL 暖酨獛赳F) 瓬赴暖珫眃赳(SQL Bz纙J)耶 ------------------------------------------------------------------------ 42.35 Linux 柼戍 DB2 戍 Gnome 碉 KDE 貘鬷幏 DB2 {彀虪柜樕姥逌{搨鉈擔 DB2 柼扯z獛搨蘮碉媥耍 擋鄧彀 Gnome 碉 KDE 柼扯z獛搨柼鼖韥碖`擋戍 DB2 泚爩耍 虪鄧 Intel 長嗜戍 Linux 牁鷫 獛搨媥蚼C DB2 Version 7.2 稗w]襏|揅壧o泚爩耍 遮養腺揅壧祌擋鉈擔 碉颳柜詰愫譇媥蛈犌妝柼扯z獛搨媥耶 儵s柱柜憍柼扯z獛搨媥聤柜詰愫譇媥蛈猺A巷媥豜U媴銻胃 db2icons [ ...] : 巷圳N耍礔彀 Gnome 詰 KDE 柼扯z獛搨裲鬾擁媥耍 媥蛈瑔i 茫繐韥駻s柼扯z獛搨浂表s媥耶 儵颳柜詰愫譇媥蛈犌彷@憍柼扯z獛搨媥耍巷媥豜U媴銻胃 db2rmicons [ ...] : 鞮澱鏺爩貜爦戍v貙浂擁詰颳醋媥蛈犌杞媥耶 q鎈耍愩刖鞮板柜 媥蛈犌材耍db2icons 碉 db2rmicons 養擋鉈擔詰颳鞮椻洳戍媥耍椷 鸅嗀鞮板 root 媥蛈瑏蛌O爩嗀v貙柞枵肄祌媥蛈稘_絛到戍駙柜譇媥 舌耍鞮浂爦擋o譇銻鉈擔詰颳顢柤戍媥耶 ------------------------------------------------------------------------ 42.36 彀 Windows 2000 Terminal Server 扯z研搨柰鸉 DB2 腺 DB2 UDB Version 7.1耍FixPak 3 瓬鶔囍戍次劑耍DB2 養彀 Windows 2000 Terminal Server 扯z研搨柰鸉耶彀殛祌容耍鞮潲妄彀 Windows 2000 Terminal Server 扯z研搨戍雚膼蘱儐q鏼~柰鸉 DB2耶 ------------------------------------------------------------------------ 42.37 樵烈駻鑅銻戍哎柼祗腦 Incorrect information appears when you type db2 ? backup. 儘俊戍鋇長胃 BACKUP DATABASE database-alias [USER username [USING password]] [TABLESPACE (tblspace-name [ {,tblspace-name} ... ])] [ONLINE] [INCREMENTAL [DELTA]] [USE TSM [OPEN num-sess SESSIONS]] | TO dir/dev [ {,dir/dev} ... ] | LOAD lib-name [OPEN num-sess SESSIONS]] [WITH num-buff BUFFERS] [BUFFER buffer-size] [PARALLELISM n] [WITHOUT PROMPTING] ♂z枵 db2 ? restore 耍鋇{儘俊鬞耶儘俊戍鋇長胃 RESTORE DATABASE source-database-alias { restore-options | CONTINUE | ABORT }"; restore-options:"; [USER username [USING password]] [{TABLESPACE [ONLINE] |"; TABLESPACE (tblspace-name [ {,tblspace-name} ... ]) [ONLINE] |"; HISTORY FILE [ONLINE]}] [INCREMENTAL [ABORT]]"; [{USE TSM [OPEN num-sess SESSIONS] |"; FROM dir/dev [ {,dir/dev} ... ] | LOAD shared-lib"; [OPEN num-sess SESSIONS]}] [TAKEN AT date-time] [TO target-directory]"; [INTO target-database-alias] [NEWLOGPATH directory]"; [WITH num-buff BUFFERS] [BUFFER buffer-size]"; [DLREPORT file-name] [REPLACE EXISTING] [REDIRECT] [PARALLELISM n]"; [WITHOUT ROLLING FORWARD] [WITHOUT DATALINK] [WITHOUT PROMPTING]"; ------------------------------------------------------------------------ 42.38 "Warehouse Manager" 睦長 "DB2 Warehouse Manager" 詻嗀鋇{彀恙些銝M恙麩戍 "Warehouse Manager" 睦扛 "DB2 Warehouse Manager"耶 ------------------------------------------------------------------------ 衣閭鬞 ------------------------------------------------------------------------ 衣閭鬞 ------------------------------------------------------------------------ 43.1 DB2 Universal Database 碉 DB2 Connect 哎柼儭 DB2 鬞戍蘠鬷碉奚稒s僬垠A霄服嗀殛麩鋇次齶ガ厴豯戍鬞耍 巷媥 DB2 Universal Database & DB2 Connect 哎柼儭霠胃 http://www.ibm.com/software/data/db2/udb/winos2unix/support耶 ------------------------------------------------------------------------ 43.2 DB2 Magazine 嗀 DB2 恙鑶媴戍稒s鬞耍鞮養鄧繘酀鞻旟戍 DB2 Magazine耶 哎柼次戍矩養 腺 http://www.db2mag.com 灥隳胚 彀贄柼柛嗀繘酀矩戍耶 ------------------------------------------------------------------------ 衣到 ------------------------------------------------------------------------ 衣到 A. 圳N醳 椴彀擂奄珫耍IBM 隳嗀虪劑岩珫詻戍嵧醳恙耑再髕詰閱耶 繐何D彀 鞮詻彀祌鱦板騶養擋o恙烈再髕耍巷嵢≡a戍 IBM 再髕鋅式泥欒耶劑岩彀 瓬 IBM 恙耑獛搨詰再髕耍式詰t骷媥 IBM 戍恙耑獛搨詰再髕耶骷 繐冀埋 IBM 戍麍津鱕v耍摃閱虎’杆恙耑獛搨詰再髕養鄧灥鋅 IBM 戍 恙耑獛搨詰再髕耶L耍擂唏 IBM 恙耑獛搨耑詰再髕彀B鏼柼戍烈ъ耍 d竀q媥蛈猺C 彀o劑岩詰麩珫養霄鰗緺 IBM 詻嗀祌鄾顟詰鄾顟擒巷耶 劑岩媥蛈稙ж 嗀容翷鄾顟祌摃騅v耶 鞮養鄧擋岩貘搨鄋d欒騅v耍僓巷轈胃 IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A. 礔繐泥欒嗀柫祅 (DBCS) 鬞戍蕶\v貙腰耍 巷皖翪鞮奄戍 IBM 麍津鱕 郎耍詰舌擋岩貘搨轈胃 IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106, Japan 柰媴沮蠮礔烈欑祌妄桑毉耍饓長譂擋胃 IBM 譧鄧{扛虪劑岩耍椴 虪摃腦詰敬祌奚ъ (霄服椷貙腺養 詫詰幏蕶肄擋戍奚ъ)耶礔嗀廇 鱦彀欣柼虋秏\柼翷奚ъ耍 屑欑潲耶 劑岩珫養|嗀纇N柼詰次尳柼戍_砷耶廅殛耍IBM |肄齔繘胚 虋醨繘戍 洇委枵s次珫耶嵥耍IBM 隳廈灁虋 (詰) 韥劑岩珫詻瓬戍恙瓬 (詰) 獛搨耶 劑岩腺唏 IBM 霠戍儭矧骷板長柅堉椴虪耍虋o霠鏼摃砸養耶欑 霠柼戍洇委虋唏劑 IBM 恙洇委戍柜倌鰣A擋媥釬鄑霠睦椻詮蹗弒耶 ♂z虪鬞聤 IBM 耍鞮饓騅v牉 IBM 鄧砸長譂’彷搨僓媥袑豜盞e鬞耍 椴澱鞮繑鱌摃d耶 劑獛搨祌騅v舌礔灥隳虎耍 鄧堉媥豜U媴鬞舌養直欒 IBM耶 柰媴 鬞戍板胃 (1) 汾擔擔戍獛搨烈擂獛搨 (霄服殛獛搨) 祌繾鶔黈鬞戍搨 (2) 虎洈媥豜w黈祌鬞妄耶 礔嗀摃齶ガ巷皖翪胃 IBM Canada Limited Office of the Lab Director 1150 Eglinton Ave. East North York, Ontario M3C 1H7 CANADA 柼翷戍灥隳嗀蕶屆繐麩耍彀欣餼如柰澱鏺鄱旟隳媥蚼C 劑岩詻鴶翷戍摃獛搨瓬詻嗀養擋戍騅v緺鏼板墨 IBM 詻虪耍虋赴IBM 朗 幏赳耑赴舫獛搨騅v幏赳詰祌繾摃嵥瞉幏毉祌W削耶 殛繾詻鰗祌摃耍芥板隳椻嚭戍蓔櫼U胚廅殛嵥鏼~蓔櫼U詻隳戍 膣刖耍養|嗀毠戍孤鶩C倌獿皪養板彀礤熪珫戍鑶豜W鸉耍廅殛奚ъ養 鄧雚柜戍鑶袚癚虎嵥戍膣刖耶 嗀倌鬖改皪耍板顟擋麰妄椴隳戍繣襏耍 舫膣刖養|嗀詻嵥耶劑岩戍媥蛈瑀拚鶅蕶嗀戍蒤Aъ鋇譂擋戍 耶 劑岩詻瓬祌唏 IBM 恙鬞耍娩柜墨恙戍虪睦鸆耍詰鋇次戍登腦詰擂 洢礤 扯D灥隳耶IBM 虋冀鵃灚Lo恙耍柛潲妄俊砸o唏 IBM 恙戍鸉耑 虎 委詫耑詰摃恙戍擂遭鎴板騶蘠曄潲砷耶 愩刖鞮唏 IBM 恙戍詫嗀摃 戍序齶耍巷w嵢欑恙戍虪睦鸆泥欒耶 嗀 IBM 冀僤砯V戍摃闉z耍譧鋅式 IBM 戍癸椴洄耍虋養腺冀樺登腦戍餼 如柰嗀詻韥詰冶廌耶 劑岩珫鰗嗀鎈鸆~狎韥詻擋戍瓬鬑削蒤C長柅虪蘠鬷戍祗腦耍 o削蒝] 服譇柤耑洢駑耑氟澔碉恙戍巰投耶o巰投曄翲呃耍 礔烈摃洢駑戍巰投碉搳鶐 p嵥耍貕篿誅X耶 緺鏼v騅v胃 劑岩霄鰗絛砰躨戍削蒴擋獛搨耍擋鄧祗腦嵧鏼~樹鬧柼戍獛搨]繣纇N耶鞮養 鄧腺穹熪耑媥蚼B蹸詰燽闟幏鏼~樹鬧 (擋腺鸉詻紂柞戍削蜪{搨) 祌睦擋 獛搨]繣祊貘戍睦擋獛搨瞉 戍耍鄧摃灉搨盎耑瓬燽闟o削蜪{搨耍椴潲 茫鄱旟聤 IBM耶椷o削膋蒝紉gL蘠鬷戍鵃灚耶 廅殛耍IBM |奚ъ詰to獛 搨戍⑧肄詫耑再髕柮詰閱耶 o削蜪{搨詰板摃簰擁緺鏼戍臠柜樵桃鸗詰摃倌鰣A澱鏺爩嗀柰媴戍緺鏼v 登腦胃 (c) (your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs. (c) Copyright IBM Corp. _enter the year or years_. All rights reserved. ------------------------------------------------------------------------ A.1 鸆癸 柰媴N砰 (鄧枉襶 (*) 癸) 板 IBM 洢駑彀耑擂奄詰舌戍鸆癸耶 ACF/VTAM IBM AISPO IMS AIX IMS/ESA AIX/6000 LAN DistanceMVS AIXwindows MVS/ESA AnyNet MVS/XA APPN Net.Data AS/400 OS/2 BookManager OS/390 CICS OS/400 C Set++ PowerPC C/370 QBIC DATABASE 2 QMF DataHub RACF DataJoiner RISC System/6000 DataPropagator RS/6000 DataRefresher S/370 DB2 SP DB2 Connect SQL/DS DB2 Extenders SQL/400 DB2 OLAP Server System/370 DB2 Universal Database System/390 Distributed Relational SystemView Database Architecture VisualAge DRDA VM/ESA eNetwork VSE/ESA Extended Services VTAM FFST WebExplorer First Failure Support TechnologyWIN-OS/2 柰媴N砰板擂洢駑戍鸆癸詰銳鸆癸胃 Microsoft耑Windows耑Windows NT 板Ln洢駑戍鸆癸詰銳鸆癸耶 Java 鄧瓬詻嗀烈 Java 嗀戍鸆癸烈癸耍鄧瓬 Solaris 板 Sun Microsystems, Inc. 彀耑擂奄詰舌戍鸆癸耶 Tivoli 烈 NetView 板 Tivoli Systems Inc. 彀耑擂奄詰舌戍鸆癸耶 UNIX 板 X/Open Company Limited 彀耑擂奄詰舌戍銳鸆癸耍鏺鑌欑洢駑 騅v絛養媥蚼C 擂洢駑耑恙詰再髕巰投 (鄧枉襶 (**) 癸) 養板擂洢駑戍鸆癸詰再髕 癸矩耶 ------------------------------------------------------------------------ 1 A new level is initiated each time a trigger, function, or stored procedure is invoked. 2 Unless the automatic commit is turned off, interfaces that automatically commit after each statement will return a null value when the function is invoked in separate statements. 3 This applies to both FOR EACH ROW and FOR EACH STATEMENT after insert triggers. 4 A Service Policy defines a set of quality of service options that should be applied to this messaging operation. These options include message priority and message persistence. See the MQSeries Application Messaging Interface manual for further details. 5 A character string with a subtype of BIT DATA is not allowed. 6 A common-table-expression may precede the fullselect 7 A common-table-expression may precede a fullselect. 8 There is no casting of the previous value to the source type prior to the computation.