db2 load导致表空间Pending(SQL0290N)

DB2 v10.1.0.4,使用load导入数据由于表空间空间不足,使得表空间处于Pending状态,不能访问


  1. [db2inst2@kvm101 ~]$ db2 "load from t1.ixf of ixf replace into DB2CAE2.T1_BAK COPY NO without prompting"
  2. SQL3109N The utility is beginning to load data from file
  3. "/home/db2inst2/t1.ixf".

  4. SQL3500W The utility is beginning the "LOAD" phase at time "06/24/2016
  5. 16:44:34.666557".

  6. SQL3150N The H record in the PC/IXF file has product "DB2 02.00", date
  7. "20160624", and time "163927".

  8. SQL3153N The T record in the PC/IXF file has name "t0.ixf", qualifier "", and
  9. source " ".

  10. SQL3519W Begin Load Consistency Point. Input record count = "0".

  11. SQL3520W Load Consistency Point was successful.

  12. SQL0289N Unable to allocate new pages in table space "NEWTBS02".
  13. SQLSTATE=57011

  14. SQL0289N Unable to allocate new pages in table space "NEWTBS02".
  15. SQLSTATE=57011

给表空间扩容时,提示:

  1. [db2inst2@kvm101 ~]$ db2 "alter tablespace newtbs02 extend (file '/home/db2inst2/abcfile/newtbs02.file' 1000)"

  2. DB21034E The command was processed as an SQL statement because it was not a
  3. valid Command Line Processor command. During SQL processing it returned:
  4. SQL0290N Table space access is not allowed. SQLSTATE=55039

db2 load导致表空间Pending(SQL0290N)_第1张图片

 Tablespace ID                        = 5

 Name                                 = NEWTBS02

 Type                                 = Database managed space

 Contents                             = All permanent data. Large table space.

 State                                = 0x0020

   Detailed explanation:

     Backup pending


正常状态应该是0x0000


解决:

备份DB 或者备份表空间



  1. [db2inst2@kvm101 ~]$ db2 "backup db repdb01 tablespace (NEWTBS02) to /home/db2inst2/backup/ "

  2. Backup successful. The timestamp for this backup image is : 20160624165633

  1. Tablespace ID = 5
  2.  Name = NEWTBS02
  3.  Type = Database managed space
  4.  Contents = All permanent data. Large table space.
  5.  State = 0x0000
  6.    Detailed explanation:
  7.      Normal

db2 load导致表空间Pending(SQL0290N)_第2张图片

再次扩容


  1. [db2inst2@kvm101 ~]$ db2 "alter tablespace newtbs02 extend (file '/home/db2inst2/abcfile/newtbs02.file' 30000)"
  2. DB20000I The SQL command completed successfully.

load数据


  1. [db2inst2@kvm101 ~]$ db2 "load from t1.ixf of ixf replace into DB2CAE2.T1_BAK COPY NO without prompting"

  2. SQL3109N The utility is beginning to load data from file
  3. "/home/db2inst2/t1.ixf".

  4. SQL3500W The utility is beginning the "LOAD" phase at time "06/24/2016
  5. 17:53:41.294049".

  6. SQL3150N The H record in the PC/IXF file has product "DB2 02.00", date
  7. "20160624", and time "163927".

  8. SQL3153N The T record in the PC/IXF file has name "t0.ixf", qualifier "", and
  9. source " ".

  10. SQL3519W Begin Load Consistency Point. Input record count = "0".

  11. SQL3520W Load Consistency Point was successful.

  12. SQL3110N The utility has completed processing. "3999999" rows were read from
  13. the input file.

  14. SQL3519W Begin Load Consistency Point. Input record count = "3999999".

  15. SQL3520W Load Consistency Point was successful.

  16. SQL3515W The utility has finished the "LOAD" phase at time "06/24/2016
  17. 17:53:47.584004".

  18. SQL3500W The utility is beginning the "BUILD" phase at time "06/24/2016
  19. 17:53:47.585312".

  20. SQL3213I The indexing mode is "REBUILD".

  21. SQL3515W The utility has finished the "BUILD" phase at time "06/24/2016
  22. 17:53:55.765990".

  23. Number of rows read = 3999999
  24. Number of rows skipped = 0
  25. Number of rows loaded = 3999999
  26. Number of rows rejected = 0
  27. Number of rows deleted = 0
  28. Number of rows committed = 3999999

  29. [db2inst2@kvm101 ~]$ db2 "select count(*) from db2cae2.t1"

  30. 1
  31. -----------
  32.     3999999

  33.   1 record(s) selected.
完。

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

转载于:http://blog.itpub.net/29023300/viewspace-2120942/

你可能感兴趣的:(db2 load导致表空间Pending(SQL0290N))