Deleting True Cache

You can delete True Cache with DBCA or manually.

Using DBCA to Delete True Cache

You can use DBCA to clean up the True Cache services and delete True Cache.

Cleaning Up the True Cache Services from the Primary Database

To delete True Cache, you need to clean up its corresponding services on the primary database.

Run the following command on the primary database to delete all the services that correspond to the True Cache that you’re planning to delete.

$ORACLE_HOME/bin/dbca -configureDatabase -cleanupTrueCacheInstanceService -sourceDB primary_sid_or_db_unique_name -trueCacheConnectString true_cache_easy_connect_string -serviceName primary_service_name -trueCacheServiceName true_cache_service_name -silent

Example:

$ORACLE_HOME/bin/dbca -configureDatabase -cleanupTrueCacheInstanceService -sourceDB primdb1i -trueCacheConnectString tc.example.com:1522/tcdb
1.example.com -serviceName sales -trueCacheServiceName sales_tc -silent

For descriptions of the parameters, see configureDatabase.

Deleting True Cache from the True Cache Node

Run the following command to delete True Cache from the True Cache node.

$ORACLE_HOME/bin/dbca -deleteDatabase -sourceDB true_cache_sid_or_db_unique_name -silent

Example:

$ORACLE_HOME/bin/dbca -deleteDatabase -sourceDB tcdb1 -silent

Deleting True Cache Manually

To delete True Cache manually, use the following commands.

connect / as SYSDBA;
shutdown immediate;
startup mount exclusive restrict;
drop true cache;

Note: This does not drop the primary database. It deletes the True Cache SPFILE; drops the True Cache control, standby log, and temporary files; and removes LOG_ARCHIVE_DEST entries from the primary database.

Removing a True Cache Node from the SCAN Listener Invited Node List

For Oracle RAC primary databases, if the True Cache node was added to the primary SCAN listener’s invited node list, remove it from that list after deleting the True Cache node.

Note: When a deleted True Cache node remains in the primary SCAN listener’s invited node list and its host name becomes unresolvable, the SCAN listener might fail to start. The listener log can include TNS-01198: Listener failed to initialize valid node list and NL-07001: could not resolve the provided node name.

As the grid owner, check the current list of invited nodes for the SCAN listener:

srvctl config scan_listener

Example output:

SCAN Listeners for network 1:
Registration invited nodes: tcnode1.example.com,tcnode2.example.com
Registration invited subnets:
Endpoints: TCP:1521
SCAN Listener LISTENER_SCAN1 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN2 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN3 exists
SCAN Listener is enabled.

Update the invited node list by removing the True Cache node that you deleted. Preserve any invited nodes that must remain, and specify them as a comma-separated list:

srvctl modify scan_listener -update -invitednodes remaining_invited_nodes

For example, to remove tcnode2.example.com and keep tcnode1.example.com in the invited node list:

srvctl modify scan_listener -update -invitednodes tcnode1.example.com

If no invited nodes remain, update the list to an empty string:

srvctl modify scan_listener -update -invitednodes ""