Problem
You may get error an like below when doing an insert or update operation on a DB2 for iSeries table SQL7008N REXX variable "" contains inconsistent data. SQLSTATE=55019
在DB2 for iSeries表执行插入或更新操作时,可能会出现类似以下的错误。SQL7008N REXX variable "" contains inconsistent data. SQLSTATE=55019
Cause
The DB2 for iSeries table does not have journaling enabled.
DB2 for iSeries表未启用日志功能。
Resolving The Problem
To resolve this issue, do one of the following:
- Enable journaling for the DB2 for iSeries table. You may contact your DB2 for iSeries DBA.
- If you are getting this error from your application, specify application specific Isolation level property with value NO COMMIT.
- For CLI/ODBC applications:
Update TXNIsolation CLI keyword with value 32 in your db2cli.cfg.
'db2 update cli cfg for section <dsn> using TXNIsolation 32'.
Restart the application. - For .NET applications:
Update IsolationLevel to 'chaos' in your connection string. Or if you are using db2dsdriver.cfg, you can specify it in db2dsdriver.cfg. - For JDBC applications:
DB2 JDBC Driver does not support Isolation level NONE or NO COMMIT. You may need to use option (1) or (3) in this case.
- For CLI/ODBC applications:
- Alter your SQL statement to include 'WITH NONE' or 'WITH NC' at the end for example:
insert into <tableName> values ('a', 'b') with NC
insert into <tableName> values ('a', 'b') with NONE