I have about 200 tables in a DB2 V8.1.4 LUW application schema. There
is a third party java appllication that accesses this schema. It
started failing and relevant entries in db2diag.log have this:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/AIX64] SQL1476N
The current transaction was rolled back because of error "-952".
SQLSTATE=40506
which caused by
SQL1476N The current transaction was rolled back because of
error "<sqlcode>".
Explanation:
The transaction was rolled back because:
1. An implicit or explicit CLOSE CURSOR failed, or
2. A table was being created with the NOT LOGGED INITIALLY
option, or NOT LOGGED INITIALLY was activated for an existing
table. During the same unit of work, either an error
occurred, or a ROLLBACK TO SAVEPOINT statement was issued.
This unit of work is rolled back, with the following
effects:
- any table that was created in this unit of work is dropped
- any NOT LOGGED INITIALLY tables that were activated in the
transaction are marked inaccessible, and can only be
dropped.
- the "<sqlcode>" will be 0 if a ROLLBACK TO SAVEPOINT was
issued in the transaction.
3. A rollback to savepoint failed.
The "<sqlcode>" reported is the SQLCODE of the original error.
User Response:
Correct the problem as indicated by the error "<sqlcode>", then
run the transaction again. Remove any ROLLBACK TO SAVEPOINT
statement that is used in the same transaction in which a NOT
LOGGED INITIALLY table is created or activated.
sqlcode : -1476
sqlstate : 40506
I checked the status of all the schema table is normal.
Is there any way to identify which schema table, that has been
activated as not logged initially, was taken offline due to a
transaction failure and now just must dropped/restored?
thanks,
-Eugene