Start of change

-20366   TABLE WITH DBID=database-id AND OBID=object-id CANNOT BE TRUNCATED BECAUSE UNCOMMITTED UPDATES EXIST ON THE TABLE WITH 'IMMEDIATE' OPTION SPECIFIED IN THE STATEMENT

Explanation

A TRUNCATE statement was issued with the IMMEDIATE option, but the statement could not be processed.

database-id
The database ID.
object-id
The table object ID (OBID) of the object with the truncation error.

A TRUNCATE statement with the IMMEDIATE option cannot be processed if either of the following are true:

  • Any table in the same table space as the target table has uncommitted CREATE, ALTER or DROP changes.
  • Any table in the same table space as the target table has uncommitted data changes.

System action

The statement cannot be processed.

User response

Issue a COMMIT statement, and then issue the TRUNCATE statement with the IMMEDIATE option.

SQLSTATE

57007

End of change