db2 load 自增測試
[db2inst1@db2 ~]$ db2 "create table admin.xpf (id int generated always as identity (start with 1 increment by 1 no cache nocycle),name varchar(20),address varchar(20),phonenum char(11))"
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 "insert into admin.xpf(name,address,phonenum) values ('xpf','hbyx','18618196076')"
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 set current schema admin
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
1 record(s) selected.
[db2inst1@db2 ~]$ db2 "insert into xpf values(9,'linda','usa','13131231234')"
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0798N A value cannot be specified for column "ID" which is defined as
GENERATED ALWAYS. SQLSTATE=428C9
[db2inst1@db2 ~]$ db2 "insert into xpf(name,address,phonenum) values('linda','usa','13131231234')"
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
2 record(s) selected.
[db2inst1@db2 ~]$ cat 1.del
10,'james','lakes','110'
90,'katte','aus','119'
[db2inst1@db2 ~]$ db2 "load from 1.del of del modified by identityoverride insert into admin.xpf"
SQL3551W The table contains at least one GENERATED ALWAYS column that the
utility will override.
SQL3109N The utility is beginning to load data from file
"/db2home/db2inst1/1.del".
SQL3500W The utility is beginning the "LOAD" phase at time "12/27/2016
22:32:09.928256".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3110N The utility has completed processing. "2" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "2".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "12/27/2016
22:32:10.052981".
Number of rows read = 2
Number of rows skipped = 0
Number of rows loaded = 2
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 2
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
10 'james' 'lakes' '110'
90 'katte' 'aus' '119'
4 record(s) selected.
[db2inst1@db2 ~]$ db2 "load from 1.del of del modified by identitymissing insert into admin.xpf"
SQL3109N The utility is beginning to load data from file
"/db2home/db2inst1/1.del".
SQL3500W The utility is beginning the "LOAD" phase at time "12/27/2016
22:32:27.512231".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3110N The utility has completed processing. "2" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "2".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "12/27/2016
22:32:27.755237".
Number of rows read = 2
Number of rows skipped = 0
Number of rows loaded = 2
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 2
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
10 'james' 'lakes' '110'
90 'katte' 'aus' '119'
3 10 'james' 'lakes'
4 90 'katte' 'aus'
6 record(s) selected.
[db2inst1@db2 ~]$ db2 "load from 1.del of del modified by identityignore insert into admin.xpf"
SQL3109N The utility is beginning to load data from file
"/db2home/db2inst1/1.del".
SQL3500W The utility is beginning the "LOAD" phase at time "12/27/2016
22:33:47.293690".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3110N The utility has completed processing. "2" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "2".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "12/27/2016
22:33:47.399742".
Number of rows read = 2
Number of rows skipped = 0
Number of rows loaded = 2
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 2
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
10 'james' 'lakes' '110'
90 'katte' 'aus' '119'
3 10 'james' 'lakes'
4 90 'katte' 'aus'
5 'james' 'lakes' '110'
6 'katte' 'aus' '119'
8 record(s) selected.
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 "insert into admin.xpf(name,address,phonenum) values ('xpf','hbyx','18618196076')"
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 set current schema admin
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
1 record(s) selected.
[db2inst1@db2 ~]$ db2 "insert into xpf values(9,'linda','usa','13131231234')"
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0798N A value cannot be specified for column "ID" which is defined as
GENERATED ALWAYS. SQLSTATE=428C9
[db2inst1@db2 ~]$ db2 "insert into xpf(name,address,phonenum) values('linda','usa','13131231234')"
DB20000I The SQL command completed successfully.
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
2 record(s) selected.
[db2inst1@db2 ~]$ cat 1.del
10,'james','lakes','110'
90,'katte','aus','119'
[db2inst1@db2 ~]$ db2 "load from 1.del of del modified by identityoverride insert into admin.xpf"
SQL3551W The table contains at least one GENERATED ALWAYS column that the
utility will override.
SQL3109N The utility is beginning to load data from file
"/db2home/db2inst1/1.del".
SQL3500W The utility is beginning the "LOAD" phase at time "12/27/2016
22:32:09.928256".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3110N The utility has completed processing. "2" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "2".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "12/27/2016
22:32:10.052981".
Number of rows read = 2
Number of rows skipped = 0
Number of rows loaded = 2
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 2
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
10 'james' 'lakes' '110'
90 'katte' 'aus' '119'
4 record(s) selected.
[db2inst1@db2 ~]$ db2 "load from 1.del of del modified by identitymissing insert into admin.xpf"
SQL3109N The utility is beginning to load data from file
"/db2home/db2inst1/1.del".
SQL3500W The utility is beginning the "LOAD" phase at time "12/27/2016
22:32:27.512231".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3110N The utility has completed processing. "2" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "2".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "12/27/2016
22:32:27.755237".
Number of rows read = 2
Number of rows skipped = 0
Number of rows loaded = 2
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 2
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
10 'james' 'lakes' '110'
90 'katte' 'aus' '119'
3 10 'james' 'lakes'
4 90 'katte' 'aus'
6 record(s) selected.
[db2inst1@db2 ~]$ db2 "load from 1.del of del modified by identityignore insert into admin.xpf"
SQL3109N The utility is beginning to load data from file
"/db2home/db2inst1/1.del".
SQL3500W The utility is beginning the "LOAD" phase at time "12/27/2016
22:33:47.293690".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3110N The utility has completed processing. "2" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "2".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "12/27/2016
22:33:47.399742".
Number of rows read = 2
Number of rows skipped = 0
Number of rows loaded = 2
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 2
[db2inst1@db2 ~]$ db2 "select * from xpf"
ID NAME ADDRESS PHONENUM
----------- -------------------- -------------------- -----------
1 xpf hbyx 18618196076
2 linda usa 13131231234
10 'james' 'lakes' '110'
90 'katte' 'aus' '119'
3 10 'james' 'lakes'
4 90 'katte' 'aus'
5 'james' 'lakes' '110'
6 'katte' 'aus' '119'
8 record(s) selected.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26224914/viewspace-2131454/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- db2 load 自增 generated always as identityDB2IDE
- 測試mysql--load dataMySql
- db2 export loadDB2Export
- 惠普增強的自動化測試方案特性
- db2 load dumpfile for exceptionDB2Exception
- DB2 LOAD相關DB2
- 理解Load Average做好壓力測試
- oracle load banlance 配置與測試方法Oracle
- Oracle RAC Load Balance , Fail Over測試OracleAI
- db2 構造測試資料DB2
- DB2備份恢復測試DB2
- DB2 Load造成tablespace pendingDB2
- 自動化測試系列 —— UI自動化測試UI
- 軟體測試:自動化測試
- 【自動化測試入門】自動化測試思維
- 功能測試、自動化測試、效能測試的區別
- 手工測試和自動化測試 BattleBAT
- 自動化測試系列(三)|UI測試UI
- 小程式自動化測試--測試3
- Junit測試Android自動化測試Android
- 如何學習自動化測試?從手工測試到自動化測試的過程…
- 自動化測試如何管理測試資料
- 軟體測試框架——自動化測試框架框架
- 功能測試之存量資料新與增資料測試
- DB2巧用欄位自動增長主鍵的方法DFDB2
- 測試您的DB2資料庫:用JMeter測量效能DB2資料庫JMeter
- Goldengate for DB2 8.2的介質為DB2 9.7做init loadGoDB2
- 自動化裝置測試與自動化測試的區別
- 自動化測試理解
- 自動化測試思路
- airTest自動化測試AI
- 介面自動化測試
- API自動化測試API
- 自動化測試框架框架
- 自動化元件測試元件
- Docker與自動化測試及其測試實踐Docker
- 軟體測試理論(2)自動化測試
- 在SQL Server上測試事務日誌的自動增長(三)QOSQLServer