Oracle database’s ORACLE_SID can be renamed using a couple of methods. The first method, which is a tradition method, is to create a new control file using the reuse database flag and give it a new incarnation. Once this is done we can change the values in the external files (sqlnet.ora, tnsnames.ora, init.ora (spfile)) and open the database. From Oracle 9i and beyond Oracle database can be renamed using the dbnewid (or) nid utility. In this post, we will go through the steps to rename the database using the nid utility.
- Backup the database (Always a good practice before any changes are made).
- Start the database in mount state (do not open it).
- Invoke the dbnewid utility
nid TARGET=sys/password@<CURRENT_ORACLE_SID> DBNAME=<NEW_ORACLE_SID>