Translate

Monday, 22 October 2012

11G RAC Conversion from Standalone Database

Converting a Single Instance Database to RAC Manually
Tested in 11.2.0.3

Note: First we can try this to setup in two node instances
Step 1) Create a new pfile from single instance and the add following parameters (/tmp/initmyrac1.ora)
            *.cluster_database = TRUE
            *.cluster_database_instances = 2
            #*.undo_management=AUTO
            *)myrac1.undo_tablespace=UNDOTBS1
           *)myrac1.instance_name=myrac1
            *)myrac1.instance_number=1
            *)myrac1.thread=1
           *)myrac1.local_listener=listener_MYRAC1
            *)myrac2.instance_name=myrac2
   *)myrac2.instance_number=2
   *)myrac2.local_listener=listener_MYRAC2
   *)myrac2.thread=2
   *)myrac2.undo_tablespace=UNDOTBS2

*) Remove the db_create_online_log_dest
Step 2) cross check the controlfile location in the above pfile (/tmp/initmyrac1.ora), for the OMF Controlfile naming conversion.
Step 3) Creating the Spfile from pfile (/tmp/initmyrac1.ora)
             CREATE SPFILE='+DATA01/MYRAC/spfileMYRAC.ora' from pfile='/tmp/initmyrac1.ora';
==> more $ORACLE_HOME/dbs/initMYRAC1.ora
 SPFILE='+DATA01/MYRAC/spfileMYRAC.ora'
(like this copy the file in 2nd node and rename like initmyrac2.ora)
Step 4) Creating new password file for myrac1 instance under $ORACLE_HOME/dbs
              ORAPWMYRAC1
Step 5) Start database in mount stage
    Export ORACLE_SID=MYRAC1
    SQL> startup mount pfile=initmyrac1.ora
Step 6) Add second thread to database which will be for instance 2
   SQL> alter database add logfile thread 2
                      group 4 ('+DATA01') size 50M,
                      group 5 ('+DATA01') size 50M,
                      group 6 ('+DATA01') size 50M;
   set line 200
   col member for a55
   set pages 100
   select s.GROUP#,p.THREAD#,s.MEMBER from v$logfile s, v$log p where s.GROUP# = p.GROUP#;

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> alter database enable public thread 2;

Database altered.

Step 7) Create undo tablespace for instance 2
SQL> CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE '+DATA01' size 25M;

Step 8) Run $ORACLE_HOME/rdbms/admin/catclust.sql to create cluster database specific views within the existing instance 1
SQL> @?/rdbms/admin/catclust.sql

Step 9) Add the database and instance in cluster

==> srvctl add database -d myrac -o /mynode/oracle/product/db/10.2.0.2 -p '+DATA01/myrac/spfilemyrac.ora'
==> srvctl add instance -d myrac -i myrac1 -n NODE1
==> srvctl add instance -d myrac -i myrac2 -n NODE2
==> srvctl add instance -d myrac -i myrac3 -n NODE3
==> . .profile_crs
==> cd $ORACLE_HOME/bin
==> ./crs_stat -p ora.myrac.myrac1.inst | grep REQ
REQUIRED_RESOURCES=ora.NODE1.vip
==> srvctl modify instance -d myrac -i myrac1 -s +ASM1
==> ./crs_stat -p ora.myrac.myrac1.inst | grep REQ
REQUIRED_RESOURCES=ora.NODE1.vip ora.NODE1.ASM1.asm
==> srvctl modify instance -d myrac -i myrac2 -s +ASM2
==> srvctl modify instance -d myrac -i myrac3 -s +ASM3

==> for CHECKING Purpose
==>  srvctl stop database myrac
==>  srvctl start database myrac (it should come up with all the instances)

 
==> srvctl config database -d myrac

Step 10) change the ldap entry
Step 12) Add the local & remote listener
alter system set remote_listener='SCAN-IP.domain.org:1120' scope=both;
Step 13) check the tnsping



1 comment:

  1. Can u pls mention which steps should be done in node 1 and which steps should be done in node 2

    ReplyDelete