RTC database reindexing fails and the database is unusable
I can't use my database and I get the following error:
2012-09-11 10:21:54,092 Rebuilding the indices for the database "//demomvs.democentral.ibm.com:4462/NDCDB201:user=xxxxxxxx;password=xxxxxxxx;".
2012-09-11 10:21:55,260 CRJAZ0577E The following SQL query did not execute properly on the server:
CREATE UNIQUE INDEX JTS_AUTH.JAUTH_TKN_STT_D_DX ON JTS_AUTH.JAUTH_TOKEN(STATE_ID)
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-679, SQLSTATE=57006, SQLERRMC=JTS_AUTH.JAUTH_TKN_STT_D_DX, DRIVER=3.62.57
at com.ibm.db2.jcc.am.fd.a(fd.java:679)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
2012-09-11 10:21:55,260 CRJAZ0577E The following SQL query did not execute properly on the server:
CREATE UNIQUE INDEX JTS_AUTH.JAUTH_TKN_STT_D_DX ON JTS_AUTH.JAUTH_TOKEN(STATE_ID)
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-679, SQLSTATE=57006, SQLERRMC=JTS_AUTH.JAUTH_TKN_STT_D_DX, DRIVER=3.62.57
at com.ibm.db2.jcc.am.fd.a(fd.java:679)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
I ran the onlineVerify and it returned no issues, so its not a corruption issue, it appears that its only the index that is problematic. How do I reindex my tables so I can use the database? How can I get my database usable again?
Accepted answer
You will need to clear out the old index data before attempting the reindex. Check the problem application teamserver.properties file for the com.ibm.team.jfs.index.root.directory value. That will point to the indices that exist on the disk. Remove the folder and rerun the "repotools -reindex". Make sure that you have enough space for the indices and the permissions are correct to access and modify the indices.