CCM diagnostics shows CRJAZ2055W indices missing error
CCM diagnostic shows that some database indices are missing.
CRJAZ2055W Some indices were missing from the database, and missing indices can negatively impact application performance. To add the missing indices, you should stop your server and execute the -rebuildIndices command in repotools.
After running repotools-ccm -rebuildIndices successfully, CCM diagnostic still shows that some database indices are missing.
The database I am using is DB2.
The database I am using is DB2.
Accepted answer
Below is the most probable cause of the odd behaviour.
The db2 ALTER TABLE ADD CONSTRAINT operation, if run on a database with no indices, creates an index called a primary key unique index. This index represents to primary key.
If the user creates an index on the same set of columns as the primary key prior to ALTER TABLE ADD, then the index will be adopted as the primary key unique index.
After the ALTER TABLE command was run, a unique index would be upgraded to a primary key index.
If the user runs the diagnostic tool, the diagnostic tool expects the primary key to be called CHANGE_EVENT_PK6 PRIMARY KEY.
CHANGE_EVENT_PK6 PRIMARY KEY does not exist, so the diagnostic tool complains.
The diagnostic tool is not smart enough to know that the ALTER TABLE command reused an existing index.
Running the following command is not creating an unique index on ITEM_ID but does not report any error.
ALTER TABLE REPOSITORY.CHANGE_EVENT ADD CONSTRAINT CHANGE_EVENT_PK6
PRIMARY KEY (ITEM_ID)
It's not that this index doesn't exist. It's just that it now existed in another form, which is unexpected by the diagnostic tool.