DB2 v10.1.0.4,使用load导入数据由于表空间空间不足,使得表空间处于Pending状态,不能访问
-
[db2inst2@kvm101 ~]$ db2 "load from t1.ixf of ixf replace into DB2CAE2.T1_BAK COPY NO without prompting"
-
SQL3109N The utility is beginning to load data from file
-
"/home/db2inst2/t1.ixf".
-
-
SQL3500W The utility is beginning the "LOAD" phase at time "06/24/2016
-
16:44:34.666557".
-
-
SQL3150N The H record in the PC/IXF file has product "DB2 02.00", date
-
"20160624", and time "163927".
-
-
SQL3153N The T record in the PC/IXF file has name "t0.ixf", qualifier "", and
-
source " ".
-
-
SQL3519W Begin Load Consistency Point. Input record count = "0".
-
-
SQL3520W Load Consistency Point was successful.
-
-
SQL0289N Unable to allocate new pages in table space "NEWTBS02".
-
SQLSTATE=57011
-
-
SQL0289N Unable to allocate new pages in table space "NEWTBS02".
-
SQLSTATE=57011
给表空间扩容时,提示:
-
[db2inst2@kvm101 ~]$ db2 "alter tablespace newtbs02 extend (file '/home/db2inst2/abcfile/newtbs02.file' 1000)"
-
-
DB21034E The command was processed as an SQL statement because it was not a
-
valid Command Line Processor command. During SQL processing it returned:
-
SQL0290N Table space access is not allowed. SQLSTATE=55039
Tablespace ID = 5
Name = NEWTBS02
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0020
Detailed explanation:
Backup pending
正常状态应该是0x0000
解决:
备份DB 或者备份表空间
-
[db2inst2@kvm101 ~]$ db2 "backup db repdb01 tablespace (NEWTBS02) to /home/db2inst2/backup/ "
-
-
Backup successful. The timestamp for this backup image is : 20160624165633
-
Tablespace ID = 5
-
Name = NEWTBS02
-
Type = Database managed space
-
Contents = All permanent data. Large table space.
-
State = 0x0000
-
Detailed explanation:
-
Normal
再次扩容
-
[db2inst2@kvm101 ~]$ db2 "alter tablespace newtbs02 extend (file '/home/db2inst2/abcfile/newtbs02.file' 30000)"
-
DB20000I The SQL command completed successfully.
load数据
-
[db2inst2@kvm101 ~]$ db2 "load from t1.ixf of ixf replace into DB2CAE2.T1_BAK COPY NO without prompting"
-
-
SQL3109N The utility is beginning to load data from file
-
"/home/db2inst2/t1.ixf".
-
-
SQL3500W The utility is beginning the "LOAD" phase at time "06/24/2016
-
17:53:41.294049".
-
-
SQL3150N The H record in the PC/IXF file has product "DB2 02.00", date
-
"20160624", and time "163927".
-
-
SQL3153N The T record in the PC/IXF file has name "t0.ixf", qualifier "", and
-
source " ".
-
-
SQL3519W Begin Load Consistency Point. Input record count = "0".
-
-
SQL3520W Load Consistency Point was successful.
-
-
SQL3110N The utility has completed processing. "3999999" rows were read from
-
the input file.
-
-
SQL3519W Begin Load Consistency Point. Input record count = "3999999".
-
-
SQL3520W Load Consistency Point was successful.
-
-
SQL3515W The utility has finished the "LOAD" phase at time "06/24/2016
-
17:53:47.584004".
-
-
SQL3500W The utility is beginning the "BUILD" phase at time "06/24/2016
-
17:53:47.585312".
-
-
SQL3213I The indexing mode is "REBUILD".
-
-
SQL3515W The utility has finished the "BUILD" phase at time "06/24/2016
-
17:53:55.765990".
-
-
Number of rows read = 3999999
-
Number of rows skipped = 0
-
Number of rows loaded = 3999999
-
Number of rows rejected = 0
-
Number of rows deleted = 0
-
Number of rows committed = 3999999
-
-
[db2inst2@kvm101 ~]$ db2 "select count(*) from db2cae2.t1"
-
-
1
-
-----------
-
3999999
-
-
1 record(s) selected.
完。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29023300/viewspace-2120942/
,如需转载,请注明出处,否则将追究法律责任。