Introduction to Nid Utility:
NID is an utility which is used to change the database internal name and dbname of a database. The utility is placed in the $ORACLE_HOME/bin directory. Prior to the nid utility we need to manually create a database and give it a new database name by recreating a control file.
Here I am going to change the db name from standby to Canada.
Overview steps:
Step:1 Mount the database with old db name(standby)
Step:2 Run the nid utility (syntax: nid sys/password@CURRENT_DBNAME DBNAME=NEW_DBNAME)
Step:3 Once you run the nid utility the name will be changed to new db name.(standby to Canada)
Step:4 Then you have to change the db_name in the parameter file.
Step:5 change the spfile to a new db name.
Step:6 Now open the database with reset logs option.
Step:1 mount the database with old db name.
Step:2 Run the nid utility
Syntax: nid sys/password@CURRENT_DBNAME DBNAME=NEW_DBNAME
Step:3 change the db_name in the parameter file.
Step:4 Rename the spfile to a new db name.
cp spfileSTANDBY.ora spfileCANADA.ora
Step:5 Open the database with resetlogs option.
Step:6 Register the database information to the listener using the command “alter system register;”