DB2因表空間不夠產生load表失敗

2021-05-24 01:29:42 字數 1276 閱讀 4949

今天下午恢復表的時候發現出現錯誤:

sql3520w  load consistency point was successful.

sql3110n  the utility has completed processing.  "185345" rows were read from

the input file.

sql3519w  begin load consistency point. input record count = "185345".

sql3520w  load consistency point was successful.

sql3515w  the utility has finished the "load" phase at time "01/06/2011

08:46:53.986782".

sql3500w  the utility is beginning the "build" phase at time "01/06/2011

08:46:53.987138".

sql3213i  the indexing mode is "rebuild".

sql0289n  unable to allocate new pages in table space "***x". 

sqlstate=57011

sql0289n  unable to allocate new pages in table space "***x". 

sqlstate=57011

因為load表的時候先是刪除表的索引,然後往表裡面放資料,最後從新建立索引,因為索引所在的表空間快用完了,所以建立索引的時候出現unable to allocate new pages in table space的錯誤。這個時候這個表處於load pending狀態,所以首先需要解除load pending狀態。可以用命令db2 load query table ***x檢視其load處於的狀態,然後用db2 "load from empty.txt  of del terminate into ***x nonrecoverable"解除load pending狀態。

解除load pending狀態後需要知道表的索引所在的表空間,這個可以用db2look來檢視ddl, 具體命令

db2look -d $db -t $table  -a -e -x  -o ./outfile

然後用db2 alter tablespace $tablespace extend (all $numberofpages)

最後重新load表即可

db2 表空間,codepage相關

create large tablespace indexspace1 managed by database using file index extentsize 32 prefetchsize 32 overhead 10.50 transferrate 0.14 codepage 安裝120...

DB2緩衝池 表空間

在db2中建立表空間得指向該錶空間所屬緩衝池,否則表空間指向預設緩衝池 1.緩衝池 1.1 建立緩衝池 語法 create bufferpool size pagesize 例項 create bufferpool oliver buffer immediate size 250 pagesize ...

DB2緩衝池 表空間

在db2中建立表空間得指向該錶空間所屬緩衝池,否則表空間指向預設緩衝池 1.緩衝池 1.1 建立緩衝池 語法 create bufferpool size pagesize 例項 create bufferpool oliver buffer immediate size 250 pagesize ...