Get all History end in error

  • KM01571012
  • 14-May-2015
  • 14-May-2015

Summary

When trying to get all history of a CI, an error box is thrown

Question

When trying to get all history of a CI, an error box is thrown and we get a lot of errors in the logs a similar error to this:

 

2015-04-29 15:59:33,659 [qtp1801435522-4069054] (AbstractCommonOperation.java:156) ERROR -  !!! Operation hist query: get data changes() ID: 782147734 FAILED (running time: 1458 ms[ms])
com.mercury.topaz.cmdb.server.manage.dal.CmdbDalException: [ErrorCode [-2147483648] undefined error code]
Can't execute prepared statement [ SELECT ID,CMDB_ID,END1_ID,END2_ID,START_TIME,CHANGE_TYPE,CHANGER_INFO,CHANGER_DATASTORE FROM HDM_141210AGGREGATION_1 WHERE 1=1  AND START_TIME >=?  AND START_TIME <=?  AND HDM_141210AGGREGATION_1.END1_ID IN (?) AND HDM_141210AGGREGATION_1.CHANGE_TYPE IN (?, ?, ?, ?); Values: 0,1430315971790,<16 bytes>,'ADD_LINK','ADD_LINK_UPGRADE','REMOVE_LINK','REMOVE_LINK_UPGRADE'], due to exception: java.sql.SQLSyntaxErrorException: [mercury][SQLServer JDBC Driver][SQLServer]Invalid object name 'HDM_141210AGGREGATION_1'.

Caused by: java.sql.SQLSyntaxErrorException: [mercury][SQLServer JDBC Driver][SQLServer]Invalid object name 'HDM_141210AGGREGATION_1'.

Answer

 

When trying to get all history of a CI, an error box is thrown and we get a lot of errors in the logs a similar error to this:

 

2015-04-29 15:59:33,659 [qtp1801435522-4069054] (AbstractCommonOperation.java:156) ERROR -  !!! Operation hist query: get data changes() ID: 782147734 FAILED (running time: 1458 ms[ms])
com.mercury.topaz.cmdb.server.manage.dal.CmdbDalException: [ErrorCode [-2147483648] undefined error code]
Can't execute prepared statement [ SELECT ID,CMDB_ID,END1_ID,END2_ID,START_TIME,CHANGE_TYPE,CHANGER_INFO,CHANGER_DATASTORE FROM HDM_141210AGGREGATION_1 WHERE 1=1  AND START_TIME >=?  AND START_TIME <=?  AND HDM_141210AGGREGATION_1.END1_ID IN (?) AND HDM_141210AGGREGATION_1.CHANGE_TYPE IN (?, ?, ?, ?); Values: 0,1430315971790,<16 bytes>,'ADD_LINK','ADD_LINK_UPGRADE','REMOVE_LINK','REMOVE_LINK_UPGRADE'], due to exception: java.sql.SQLSyntaxErrorException: [mercury][SQLServer JDBC Driver][SQLServer]Invalid object name 'HDM_141210AGGREGATION_1'.

Caused by: java.sql.SQLSyntaxErrorException: [mercury][SQLServer JDBC Driver][SQLServer]Invalid object name 'HDM_141210AGGREGATION_1'.

 

This means the table is not there anymore and the URM resource was deleted but we still see this error. There is a caching mecanism that still keeps this resource in memory. In order to solve the issue you will need to restart the server. This only happens when you choose to see All History.