Error DTY-00049 (index creation failure with DB2 database)

Detailed error message:

DTY-00049: failed to create index '...': DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;DB2INST1.REVTAB_DOCTYPENAMEDTY_359

Cause:

This error can be caused by a process which deletes database indices that have been created with a certain option (e.g. index creation with option "caseInsensitive") and which immediately tries to recreate indices on the same table.

Explanation:

In this scenario the index deletion implicitly involves a drop-column operation but by design any such operation in DB2 can leave a table in a state where a table reorganization is required as a maintenance task.

Resolution steps:

The DB2 "REORG TABLE" command must be executed against the table in question (the table name in this message is the "DB2INST1.REVTAB_DOCTYPENAMEDTY_359"). This command must be executed by the database administrator and its execution may make the table in question unavailable until the command completes. Further information about the REORG TABLE command can be found in the DB2 database documentation.