Db2

表db2DPF環境のロード保留中のリリース状態



Table Db2 Dpf Environment Under Load Pending Release State



DPF環境では、一部のパーティションステータスで複数のパーティションにまたがるテーブルは正常であり、もう1つは、この状況を処理するために保留中のロードをパーティション化する方法です。

例:



root@xxxxx:~$ db2 'select count(*) from t1' 1 ----------- SQL0668N Operation not allowed for reason code '3' on table 'DPF105.T1'. SQLSTATE=57016 root@xxxxx:~$ db2_all 'db2 connect to sample && db2 load query table t1' | grep -i Tablestate -A 1 Tablestate: Load Pending -- Tablestate: Normal -- Tablestate: Load Pending -- Tablestate: Normal -- Tablestate: Load Pending root@xxxxx:~$ db2 'load from /dev/null of del terminate into t1' Agent Type Node SQL Code Result ______________________________________________________________________________ LOAD 000 +00000000 Success. ______________________________________________________________________________ LOAD 001 -00027902 Init error. Table unchanged. ______________________________________________________________________________ LOAD 002 +00000000 Success. ______________________________________________________________________________ LOAD 003 -00027902 Init error. Table unchanged. ______________________________________________________________________________ LOAD 004 +00000000 Success. ______________________________________________________________________________ RESULTS: 3 of 5 LOADs completed successfully. ______________________________________________________________________________ Summary of LOAD Agents: Number of rows read = 0 Number of rows skipped = 0 Number of rows loaded = 0 Number of rows rejected = 0 Number of rows deleted = 0 Number of rows committed = 0 SQL27902N LOAD RESTART/TERMINATE is not allowed on a table that is not in LOAD PENDING state.

上記の例から、テーブルt1でパーティション1と3は正常であり、0,2,4パーティションはロード保留中であり、指定されたロードxxxを使用しようとすると、解放されていないときに解放された状態になります。

解決策は、問題のパーティションに対してのみ発行されたコマンドにxxxterminateをロードすることです。

root@xxxxx:~$ db2 'load from /dev/null of del terminate into t1 partitioned db config output_nodes (0,2,4)' Agent Type Node SQL Code Result ______________________________________________________________________________ LOAD 000 +00000000 Success. ______________________________________________________________________________ LOAD 002 +00000000 Success. ______________________________________________________________________________ LOAD 004 +00000000 Success. ______________________________________________________________________________ RESULTS: 3 of 3 LOADs completed successfully. ______________________________________________________________________________ Summary of LOAD Agents: Number of rows read = 0 Number of rows skipped = 0 Number of rows loaded = 0 Number of rows rejected = 0 Number of rows deleted = 0 Number of rows committed = 0 root@xxxxx:~$ db2 'select count(*) from t1' 1 ----------- 50000000 1 record(s) selected.