Choose a topic
Dropping a cache groupUse the DROP CACHE GROUP statement to drop a cache group and its cache tables. Oracle Database objects used to manage the caching of Oracle Database data are automatically dropped when you use the DROP CACHE GROUP statement to drop a cache group, or an ALTER CACHE GROUP statement to set the autorefresh state to OFF for autorefresh cache groups.If you issue a DROP CACHE GROUP statement on a cache group that has an autorefresh operation in progress:The autorefresh operation stops if the LockWait connection attribute setting is greater than 0. The DROP CACHE GROUP statement preempts the autorefresh operation.The autorefresh operation continues if the LockWait connection attribute setting is 0. The DROP CACHE GROUP statement is blocked until the autorefresh operation completes or the statement fails with a lock timeout error.If cache tables are being replicated in an active standby pair and the cache tables are the only elements that are being replicated, you must drop the active standby pair using a DROP ACTIVE STANDBY PAIR statement before dropping the cache groups. If the active standby pair is a grid member, the grid member must be detached from the grid before dropping the active standby pair.Execute the following statement as the cache manager user on the cacheactive, cachestandby and rosubscriber databases to drop the active standby pair replication scheme:Command> DROP ACTIVE STANDBY PAIR;Command> exitYou must unload the data in a global cache group in all grid members before dropping the cache group. Set the GlobalProcessing optimizer flag to 1 and unload the cache group:CALL ttOptSetFlag('GlobalProcessing', 1);UNLOAD CACHE GROUP subscriber_accounts;Before you can drop a cache group, you must grant the DROP ANY TABLE privilege to the cache manager user. Execute the following statement as the instance administrator on the cachealone1, cachealone2, cacheactive and cachestandby databases to grant the DROP ANY TABLE privilege to the cache manager user. The following example shows the SQL statement issued from the cachealone1 database:% ttIsql cachealone1Command> GRANT DROP ANY TABLE TO cacheuser;Command> exitIf you are dropping an AWT cache group, use the ttRepSubscriberWait built-in procedure to make sure that all committed updates on its cache tables have been propagated to the cached Oracle Database tables before dropping the cache group.% ttIsql "DSN=cachealone1;UID=cacheuser;PWD=timesten;OraclePWD=oracle"Command> CALL ttRepSubscriberWait('_AWTREPSCHEME','TTREP','_ORACLE','sys1',-1);The replication scheme that was created for the AWT cache group to enable committed updates on its cache tables to be asynchronously propagated to the cached Oracle tables is automatically dropped when you drop the cache group.Use a DROP CACHE GROUP statement to drop the cache groups from the standalone TimesTen databases and the active and standby databases.Execute the following statement as the cache manager user on the cachealone1, cachealone2, cacheactive and cachestandby databases to drop the subscriber_accounts global cache group. The following example shows the SQL statement issued from the cachealone1 database:% ttIsql "DSN=cachealone1;UID=cacheuser;PWD=timesten;OraclePWD=oracle"Command> DROP CACHE GROUP subscriber_accounts;Note:If the cache agent is stopped immediately after dropping a cache group, or altering the cache group's autorefresh state to OFF, the Oracle Database objects used to manage the caching of Oracle Database data may not have been dropped. When the cache agent is restarted, it drops the Oracle Database objects that were created for the dropped or altered cache group.
Dropping a cache group