db2 load dumpfile for exception

本文记录了使用DB2进行表创建、修改及数据加载的过程。包括创建表test和test_exp,添加时间戳和CLOB类型字段,重组表结构,并从文件中加载数据到表中。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[db2inst1@onekey :~/load 7]$ db2 "create table test(id int not null primary key,name char(10))"

DB20000I  The SQL command completed successfully.

[db2inst1@onekey :~/load 8]$ db2 "create table test_exp like test"

DB20000I  The SQL command completed successfully.

[db2inst1@onekey :~/load 9]$ db2 "alter table test_exp add column ts timestamp add column msg clob(32K)"

DB20000I  The SQL command completed successfully.

[db2inst1@onekey :~/load 10]$ db2 reorg table test_exp

DB20000I  The REORG command completed successfully.

[db2inst1@onekey :~/load 12]$ cat 1.del

1,'aaa'

1,'ddd'

2,'ddd'

'aaa',2

1a',asdf'

3,'aaaaaaaaaaaaa'


db2 "load from 1.del of del modified by dumpfile="/tmp/2.dmp"  messages 1.msg replace into test for exception test_exp nonrecoverable"


[root@onekey tmp]# cat /tmp/2.dmp.load.000 

'aaa',2

1a',asdf'


[db2inst1@onekey :~ 2]$ db2 "select * from test_exp"


ID          NAME       TS                         MSG                                                                                                                                                                       

 1 'ddd'      2019-07-24-11.04.12.575140 00001I0000500001 


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26224914/viewspace-2651642/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26224914/viewspace-2651642/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值