db2 load terminate报错:SQL2437N The data movement command failed ...

问题描述:

在使用load terminate解除一张处于load pending状态的表时,报错 SQL2437N The data movement command failed because the utility was unable to resolve how implicitly hidden columns should be processed. No data was moved.

使用load query查看表状态,发现处于load pending. 之前 load 失败的原因是日志满
db2inst1@NODE01:> db2 load query table schema1.test_t1
SQL3418W  The NOCHARDEL file type modifier should not be specified if the data
was exported using DB2. It is provided to support vendor data files that do
not have character delimiters.

SQL3109N  The utility is beginning to load data from file
"/tmpdata/test_t1.txt".

<略>

SQL3213I  The indexing mode is "INCREMENTAL".

SQL0964C  The transaction log for the database is full.  SQLSTATE=57011

SQL3532I  The Load utility is currently in the "BUILD" phase.

SQL3533I  The Load utility is currently building index "0" of "0".


Number of rows read         = 8548240
Number of rows skipped      = 0
Number of rows loaded       = 8548240
Number of rows rejected     = 0
Number of rows deleted      = 0
Number of rows committed    = 8548240
Number of warnings          = 0

Tablestate:
  Load Pending


正常处理的方法是发出一个简单的 load terminate 命令, 但这次不好用:
db2inst1@NODE01:> db2 load from /dev/null of del terminate into schema1.test_t1
SQL2437N  The data movement command failed because the utility was unable to
resolve how implicitly hidden columns should be processed. No data was moved.


看报错貌似是因为不知道怎么处理隐藏列,这说明原来的load命令中有处理隐藏列的参数,经沟通,原来的load命令如下

db2 -vx "LOAD FROM test_t1.txt OF DEL MODIFIED BY anyorder COLDEL0x1b NOCHARDEL implicitlyhiddenmissing NOROWWARNINGS INSERT INTO schema1.test_t1 NONRECOVERABLE data buffer 393216  disk_parallelism 32 INDEXING MODE AUTOSELECT"


于是修改了load terminate命令,修改后如下:

db2inst1@NODE01:> db2 load from /dev/null of del MODIFIED BY anyorder COLDEL0x1b NOCHARDEL implicitlyhiddenmissing NOROWWARNINGS terminate into schema1.test_t1

问题解决

你可能感兴趣的:(DB2)