Clean Up Metadata for Multiple TimesTen Databases with the Same Name
If you have had to recover a TimesTen database in a grid after a
catastrophic failure, the original database may not have completed a full metadata cleanup
(that would occur when you execute a ttGridAdmin dbDestroy
command).
Thus, you may receive the following error when you try to clean up using the
scaleoutCacheCleanup.sql
script:
Metadata found for more than one database with database name
database_name and grid name grid_name
This states that you have multiple cache entries in the Oracle database for more than one TimesTen database with the same database and grid names.
To clean up the cache entries for one of the TimesTen databases (of the same name), perform the following:
-
Discover the GUID for the TimesTen database that needs to have its cache entries cleaned up using the
cacheInfo.sql
script. In the following example, the GUID is provided in theAutorefresh Objects Information
section after the grid name:F2537B21-D31D-4027-ADA2-04E131E7887E
.% cd timesten_home/install/oraclescripts % sqlplus cacheadmin/orapwd SQL> @cacheInfo.sql … *************Autorefresh Objects Information *************** Grid name: grid1 (F2537B21-D31D-4027-ADA2-04E131E7887E) Timesten database name: database1 Cache table name: ORATT.READTAB Has after insert trigger: YES Change log table name: tt_07_96977_L Number of rows in change log table: 4 Maximum logseq on the change log table: 1 Timesten has autorefreshed updates upto logseq: 1 Number of updates waiting to be autorefreshed: 0 Number of updates that has not been marked with a valid logseq: 0 …
-
Use the
cacheCleanup.sql
script supplying the GUID as the host name.% cd timesten_home/install/oraclescripts % sqlplus cacheadmin/orapwd SQL> @cacheCleanUp "F2537B21-D31D-4027-ADA2-04E131E7887E" “database1” *****************************OUTPUT************************************** Performing cleanup for object_id: 69959 which belongs to table : CUSTOMER Executing: delete from tt_07_agent_status where host = F2537B21-D31D-4027-ADA2-04E131E7887E and datastore = database1 and object_id = 69959 Executing: drop table tt_07_69959_L Executing: drop trigger tt_07_69959_T Executing: delete from tt_07_user_count where object_id = object_id1 Performing cleanup for object_id: 69966 which belongs to table : ORDERS Executing: delete from tt_07_agent_status where host = F2537B21-D31D-4027-ADA2-04E131E7887E and datastore = database1 and object_id = 69966 Executing: drop table tt_07_69966_L Executing: drop trigger tt_07_69966_T Executing: delete from tt_07_user_count where object_id = object_id1 **********************************************************************