- 1 year ago
Oracle 12c - how to remove the SID from an already dropped DB
If you have dropped a database in Oracle 12c and you want to remove the associated System Identifier (SID) from the instance, you can follow these steps:
Connect to the Oracle database instance using a privileged user account with SYSDBA privileges. You can use SQL*Plus or any other preferred Oracle client tool.
sqlsqlplus / as sysdba
Check the current SID configuration by executing the following SQL command:
sqlSELECT name FROM v$database;
This will display the current SID or database name.
Set the instance in NOMOUNT state using the following SQL command:
sqlSTARTUP NOMOUNT;
Issue the
RESET DATABASE
command to remove the SID:sqlALTER SYSTEM RESET db_name SID SCOPE=SPFILE;
This command removes the SID parameter from the database initialization parameter file (SPFILE).
Shut down and start up the database for the changes to take effect:
sqlSHUTDOWN IMMEDIATE;
STARTUP;
Verify that the SID has been removed by executing the following SQL command:
sqlSELECT name FROM v$database;
The query should not return any results or display an error indicating that the database does not exist.
By following these steps, you should be able to remove the SID of a dropped Oracle 12c database from the instance configuration.