设为首页 加入收藏

TOP

DB2 import与load的区别(二)
2014-11-24 02:00:52 来源: 作者: 【 】 浏览:8
Tags:DB2 import load 区别
-------------------
1 a [import test]
1 record(s) selected.
首先删掉导入的记录,只保留ID=1的记录。
db2 => ! cat test.txt
db2 (cont.) => @
1,"aa"
2,"bb"
3,"cc"
4,"dd"
5,"ee"
6,"ff"
db2 => load from test.txt of del insert into test @
SQL3501W The table space(s) in which the table resides will not be placed in backup pending state since forward recovery is disabled for the database.
SQL3109N The utility is beginning to load data from file "/home/huateng/test.txt".
SQL3500W The utility is beginning the "LOAD" phase at time "2012-03-29 06:41:44.784072".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3110N The utility has completed processing. "6" rows were read from the input file.
SQL3519W Begin Load Consistency Point. Input record count = "6".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "2012-03-29 06:41:44.808464".
SQL3500W The utility is beginning the "BUILD" phase at time "2012-03-29 06:41:44.809206".
SQL3213I The indexing mode is "REBUILD".
SQL3515W The utility has finished the "BUILD" phase at time "2012-03-29 06:41:44.914248". www.2cto.com
SQL3500W The utility is beginning the "DELETE" phase at time "2012-03-29 06:41:44.952664".
SQL3509W The utility has deleted "1" rows from the table.
SQL3515W The utility has finished the "DELETE" phase at time "2012-03-29 06:41:44.979506".
Number of rows read = 6
Number of rows skipped = 0
Number of rows loaded = 6
Number of rows rejected = 0
Number of rows deleted = 1
Number of rows committed = 6
db2 => select * from test @
ID NAME
----------- --------------------
1 a [import test]
2 bb
3 cc
4 dd
5 ee
6 ff
6 record(s) selected.
很明显导入结果没有触发触发器操作,而且并没有拒绝任何行,相反的是有一条记录被删除了,这是因为Load会把所有的满足条件记录导入到表中,在 load的DELETE阶段将会删掉重复的记录行。
作者 TOMSYAN
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle 10g归档日志满了的解决办法 下一篇RPG多文件读取转换为SQL多表查询

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: