DB2 Errors and How to Solve them

1.SQL0668N Operation not allowed for reason code “3” on table

“tablename”. SQLSTATE=57016

Solution:

db2 load query table tablename

 

2. SQL3501W The table space(s) in which the table resides will not be placed in

backup pending state since forward recovery is disabled for the database.

Tablestate:

Load Pending This table is pending

Solution:

Run: db2 load from 1.ixf of ixf terminate into swt_his_tran_log

 

3. SQL0668N Operation not allowed for reason code “1” on table

“tablename”. SQLSTATE=57016

Solution: db2 set integrity for tablename immediate checked

 

4. SQL0668N Operation not allowed for reason code “7” on table

“tablename”. SQLSTATE=57016

Solution.

Do the table of reorg :db2 “reorg table tablename”

 

5. db2 connect to ibank

SQL1015N The database is in an inconsistent state. SQLSTATE=55025

Solution:

db2 restart db ibank

 

6.SQL0290N Table space access is not allowed. SQLSTATE=55039

db2 list tablespaces show detail

Status is 0x0020

Solution.

Online backup tablespace operation

db2 backup database jxcx926 user db2inst1 using db2inst1 tablespace TBS_32K online to /home/db2inst1

 

7.When starting the cluster database, it reports an error that some nodes failed to start

Solution: Modify db2diag log level: db2 update dbm cfg using diaglevel 4 immediate

View the cause of the problem from the detailed log

The original is 3, after modifying it to 4, I can see the detailed information and found that it is a shared memory problem

Release the shared memory: ipclean and restart the database

 

8. db2advis execution failed

Solution.

Execute db2 -tvf EXPLAIN.DDL in /sqllib/misc directory

 

9.When there is an error code about SQLSTATE in the database error report, you want to see the specific information

You can execute db2 ?sqlstate (db2 ?55039) on the database

 

Similar Posts: