BASIC STEPS TO FOLLOW
+++++++++++++++++++++++
Setup available
==============
Two Node RAC; Database name devdb and Instance devdb1 and devdb2 running on rac1 and rac2
Name to be changed: Databse – brij and instances brij1 and brij2
Steps:
=====
a. From the instance devdb1, Backup the control file to trace.
Alter database backup controlfile to trace;
b. Create pfile from the spfile
Create pfile=<’path/filename’> from spfile;
c. Check the online redo-log files name, path and size on each nodes.
d. Take the complete backup of the database (To be towards safer side ).
———————————————————————————————
1. ) Shutdown the database using srvctl
$ srvctl stop database -d devdb
2. ) On one of the nodes, say on rac1,
Edit the pfile ( Created earlier), and change the following parameters.
Cluster_database=False
db_name=brij
Also, change all the occurances of devdb to brij, Change the path of the Control_files..etc. (if required to)
Save the file as $ORACLE_HOME/dbs/initbrij1.ora
3. ) Startup the database to nomount state by using the pfile.
4. ) Edit the Control file script , which should look as below. Make sure the script contains online redo-logs of instance devdb1 only. Run this script from SQL prompt in nomount state.
SQL> CREATE CONTROLFILE set DATABASE “brij“ RESETLOGS NOARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ‘/u03/oradata/redo01.log’ SIZE 50M,
GROUP 2 ‘/u03/oradata/redo02.log’ SIZE 50M
DATAFILE
‘/u03/oradata/system01.dbf’,
‘/u03/oradata/undotbs01.dbf’,
‘/u03/oradata/sysaux01.dbf’,
‘/u03/oradata/users01.dbf’,
‘/u03/oradata/example01.dbf’,
‘/u03/oradata/undotbs02.dbf’
CHARACTER SET WE8ISO8859P1
;
ALTER DATABASE ADD LOGFILE THREAD 2
GROUP 3 ‘/u03/oradata/redo03.log’ SIZE 50M REUSE,
GROUP 4 ‘/u03/oradata/redo04.log’ SIZE 50M REUSE;
ALTER DATABASE ENABLE PUBLIC THREAD 2;
ALTER DATABASE OPEN RESETLOGS;
5. ) Change the init.ora parameter Cluster_database=False back to Cluster_database=True.
6.) Create spfile from pfile and place it in the shared location as it was earlier.
SQL> Create spfile=’<path>/spfilebrij.ora’ from pfile;
Shutdown immediate and start the instance with spfile
7. ) Start the second instance on on rac2 with the new spfile. (From sql prompt)
8. ) Remove the devdb instance from CRS.
srvctl remove database -d devdb
9. ) Register brij isntance with the CRS.
srvctl add database -d brij -o $ORACLE_HOME
srvctl add instance -d brij -i brij1 -n rac1
srvctl add instance -d brij -i brij2 -n rac2
10. ) Change the instance names in the tnsnames.ora and listener.ora files.