db2 update 异常

报错: -错误的sql语句:update Persons SET FirstName = 'Fred' WHERE id_P = 1
com.ibm.db2.jcc.am.SqlException: Operation not allowed for reason code "7" on table "PERSONS".. SQLCODE=-668, SQLSTATE=57016, DRIVER=3.72.30

解决:

db2 "reorg table tabname";

原因:

之前可能是有表结构变动 用此命令重构一下 就ok了

The table is in the reorg pending state. This can occur after an ALTER TABLE statement containing a REORG-recommended operation.7
 Reorganize the table using the REORG TABLE command (note that INPLACE REORG TABLE is not allowed for a table that is in the reorg pending state).

posted @ 2017-11-17 11:55  NHZ-M  阅读(707)  评论(0编辑  收藏  举报