db2 load IXF 文件到多分区数据库中一直是我头痛的一件事!最近问过好几个人,得到如下的一个例子,现在帖上!
LOAD_ONLY_VERIFY_PART, can be used as a work around to load IXF data in the partitioned database environment. The IXF file to be loaded must be available to each partition, either by NFS mounting, or by physically copying the file to every partition to be loaded. By specifying the loading mode LOAD_ONLY_VERIFY_PART, each partition will pick out only those records that belong to that partition.还有,如果数据比较大,你不想copy,直接给个symbolic link:
(taoewang@bugdbug) /home/taoewang/temp $ rm staff.ixf.001
(taoewang@bugdbug) /home/taoewang/temp $ rm staff.ixf.000
(taoewang@bugdbug) /home/taoewang/temp $ ln -s staff.ixf staff.ixf.001
(taoewang@bugdbug) /home/taoewang/temp $ ln -s staff.ixf staff.ixf.000
(taoewang@bugdbug) /home/taoewang/temp $ ls -la
total 32
drwxr-sr-x 5 taoewang build 256 May 30 12:08 .
drwxr-sr-x 9 taoewang build 4096 May 28 23:03 ..
drwxr-sr-x 2 taoewang build 256 May 09 13:27 sms1
drwxr-sr-x 2 taoewang build 256 May 09 13:27 sms2
drwxr-sr-x 2 taoewang build 256 May 09 13:27 sms3
-rw-r----- 1 taoewang build 9763 May 30 10:49 staff.ixf
lrwxrwxrwx 1 taoewang build 9 May 30 12:08 staff.ixf.000 -> staff.ixf
lrwxrwxrwx 1 taoewang build 9 May 30 12:08 staff.ixf.001 -> staff.ixf
(taoewang@bugdbug) /home/taoewang/temp $ db2 "load from staff.ixf of ixf replace into t1 partitioned db config mode load_only_verify_part part_file_location /home/taoewang/temp"
SQL3107W There is at least one warning message in the message file.
Agent Type Node SQL Code Result
______________________________________________________________________________
LOAD 000 +00003107 Success.
______________________________________________________________________________
LOAD 001 +00003107 Success.
______________________________________________________________________________
RESULTS: 2 of 2 LOADs completed successfully.
______________________________________________________________________________
Summary of LOAD Agents:
Number of rows read = 70
Number of rows skipped = 0
Number of rows loaded = 35
Number of rows rejected = 35
Number of rows deleted = 0
Number of rows committed = 70
(taoewang@bugdbug) /home/taoewang/temp $
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/694276/viewspace-324591/ ,如需转载,请注明出处,否则将追究法律责任。