How to change dbname using NID utility
Step 1 : Stop the database
srvctl status database -d ABC
srvctl stop database -d ABC
Step 2 : Start the database in mount state in one node
sqlplus / as sysdba
startup mount pfile='/tmp/initabc10DEC20.ora'
Step 3 : Navigate to $ORACLE_HONE/bin and execute nid
utility
cd $ORACLE_HOME/bin
nid target=sys/******* DBNAME=ABCD ß New DBNAME must be mentioned here
To change only the database name, specify the SETNAME
parameter:
nid target=sys/******* DBNAME=ABCD SETNAME=YES
Step 4 : Pfile Modifications
Edit pfile='/tmp/initabc10DEC20.ora'
DB Name = ABCD
Compatible
Cluster_database=true
Step 5 : Start DB in mount state and create spfile using
modified pfile
STARTUP MOUNT pfile='/tmp/initabc10DEC20.ora'
create SPFILE='+ABCDB_VG/spfileabc.ora' from
pfile='/tmp/initabc10DEC20.ora'
Step 6 : Open DB with resetlogs option
Note : If you don’t have database in archivelog mode you
can ignore this step
ALTER DATABASE OPEN RESETLOGS;
Step 7 : Create password file
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID
password=password entries=5
Step 8 : Bring down database and start it using spfile
SHUTDOWN IMMEDIATE
srvctl start database -d ABC
Change cluster_database parameter to true and bring back
database with cluster
No comments:
Post a Comment