Convert Single Instance Database To RAC ::
We need to keep below points while converting Single Instance Database To RAC
1. Create redo and undo for second instance
2. Add cluster related parameters
3. Update the environment and start the database
4. Register the RAC instances with CRS
5. Create the spfile in ASM
========== 1. Create redo and undo for second instance
alter database add logfile thread 2 group 4 ('+REDO_GROUP') size 100m ;
alter database add logfile thread 2 group 5 ('+REDO_GROUP') size 100m ;
alter database add logfile thread 2 group 6 ('+REDO_GROUP') size 100m ;
alter database enable public thread 2;
-- create undo tablespace UNDOTBS2 datafile '+DG_DATA' size 500M;
========== 2. Add cluster related parameters
*.cluster_database_instances=2
*.cluster_database=true
*.remote_listener='LISTENERS_ORADB’
orcl1.instance_number=1
orcl2.instance_number=2
orcl1.thread=1
orcl2.thread=2
orcl1.undo_tablespace='UNDOTBS1'
orcl2.undo_tablespace='UNDOTBS2'
#update the actual controlfile path
*.control_files='+DG01/ORCL/controlfile/current.256.666342941','+FRA01/ORCL/controlfile/current.256.662312941'
========== 5. Create the spfile in ASM
SQL> create spfile='+DG_DATA03/orcl/PARAMETERFILE/spfile.ora' from pfile;
mv initORADB.ora initORADB1.ora
mv initORADB.ora initORADB2.ora
localhost:/opt/oracle/product/12.1.0.2/dbhome_1/dbs>cat initORCL.ora
spfile='+DG_DATA02/ORCL/PARAMETERFILE/spfile.ora'
========== 3. Update the environment and start the database
export ORACLE_SID= orcl1
export ORACLE_HOME=/home/oracle/product/12.0.1/db_1
orapwd file=$ORACLE_HOME/dbs/orapworcl1 password=sys123
========== 4. Register the RAC instances with CRS
srvctl add database -d orcl -o /opt/oracle/product/12.1.0.2/dbhome_1
srvctl add instance -d orcl -i orcl1 -n usdfw23db01cn01
srvctl add instance -d orcl -i orcl2 -n usdfw23db01cn02
srvctl modify database -d orcl -p '+DG_DATA02/orcl/PARAMETERFILE/spfile.ora' -s open
srvctl modify database -d orcl -a 'DG_DATA02,DG_DATA03,REDO_GROUP'
srvctl config database -d $DB_NAME
We need to keep below points while converting Single Instance Database To RAC
1. Create redo and undo for second instance
2. Add cluster related parameters
3. Update the environment and start the database
4. Register the RAC instances with CRS
5. Create the spfile in ASM
========== 1. Create redo and undo for second instance
alter database add logfile thread 2 group 4 ('+REDO_GROUP') size 100m ;
alter database add logfile thread 2 group 5 ('+REDO_GROUP') size 100m ;
alter database add logfile thread 2 group 6 ('+REDO_GROUP') size 100m ;
alter database enable public thread 2;
-- create undo tablespace UNDOTBS2 datafile '+DG_DATA' size 500M;
========== 2. Add cluster related parameters
*.cluster_database_instances=2
*.cluster_database=true
*.remote_listener='LISTENERS_ORADB’
orcl1.instance_number=1
orcl2.instance_number=2
orcl1.thread=1
orcl2.thread=2
orcl1.undo_tablespace='UNDOTBS1'
orcl2.undo_tablespace='UNDOTBS2'
#update the actual controlfile path
*.control_files='+DG01/ORCL/controlfile/current.256.666342941','+FRA01/ORCL/controlfile/current.256.662312941'
========== 5. Create the spfile in ASM
SQL> create spfile='+DG_DATA03/orcl/PARAMETERFILE/spfile.ora' from pfile;
mv initORADB.ora initORADB1.ora
mv initORADB.ora initORADB2.ora
localhost:/opt/oracle/product/12.1.0.2/dbhome_1/dbs>cat initORCL.ora
spfile='+DG_DATA02/ORCL/PARAMETERFILE/spfile.ora'
========== 3. Update the environment and start the database
export ORACLE_SID= orcl1
export ORACLE_HOME=/home/oracle/product/12.0.1/db_1
orapwd file=$ORACLE_HOME/dbs/orapworcl1 password=sys123
========== 4. Register the RAC instances with CRS
srvctl add database -d orcl -o /opt/oracle/product/12.1.0.2/dbhome_1
srvctl add instance -d orcl -i orcl1 -n usdfw23db01cn01
srvctl add instance -d orcl -i orcl2 -n usdfw23db01cn02
srvctl modify database -d orcl -p '+DG_DATA02/orcl/PARAMETERFILE/spfile.ora' -s open
srvctl modify database -d orcl -a 'DG_DATA02,DG_DATA03,REDO_GROUP'
srvctl config database -d $DB_NAME
No comments:
Post a Comment