4 Replies Latest reply: Feb 27, 2013 4:36 AM by rarain RSS

    convert single instance to RAC

    user11977218
      What steps is needed in order to convert single instance database to RAC ?


      Thank's

      Edited by: user11977218 on Feb 26, 2013 5:00 PM
        • 1. Re: convert single instance to RAC
          Shivananda Rao
          Hello,

          Please refer these
          http://docs.oracle.com/html/B14406_01/cvrt2rac.htm
          http://docs.oracle.com/cd/B28359_01/install.111/b28264/cvrt2rac.htm

          user11977218      
          Newbie
               
          Handle:      user11977218
          Status Level:      Newbie
          Registered:      Nov 16, 2009
          Total Posts:      31
          Total Questions:      20 (17 unresolved)
          Please consider closing your threads if you feel that they have been answered.

          Regards,
          Shivananda
          • 2. Re: convert single instance to RAC
            ShishirTekadeR
            For converting single instance DB to multiple instace (RAC set up)     
                 
            1     Perfome the full system backup of the source DB
            2     instal the oracle binaries and clusterware binaries on target m/c
            3     Add the cluster environment parameters to pfile of source m/c

            *.cluster_database = TRUE
            *.cluster_database_instances = 2
            *.undo_management=AUTO
            <SID1>.undo_tablespace=undotbs (undo tablespace which already exists)
            <SID1>.instance_name=RAC1
            <SID1>.instance_number=1
            <SID1>.thread=1
            <SID1>.local_listener=LISTENER_RAC1

            4     Open the node 1 m/c (source m/c)
            5     "run $ORACLE_HOME/rdbms/admin/catclust.sql to create
            cluster database specific views within the existing instance.
            "
            6     "Recreate control file if you defined maxinstances to be 1 when you created
            the single instance database."
            7     " Add instance specific parameters in the init<db_name>.ora for the second
            instance on the second node and set appropriate values for it:
            *** Names may need to be modified
            <SID2>.instance_name=RAC2
            <SID2>.instance_number=2
            <SID2>.local_listener=LISTENER_RAC2
            <SID2>.thread=2
            <SID2>.undo_tablespace=UNDOTBS2
            <SID2>.cluster_database = TRUE
            <SID2>.cluster_database_instances = 2
            ==> where LISTENER_RAC2 is an entry in the tnsnames.ora file like:
            LISTENER_RAC2 =
            (ADDRESS = (PROTOCOL = TCP)(HOST = <node2>)(PORT = 1521))"
            8     mount the database (from 1st instance)
            9     " alter database
            add logfile thread 2
            group 3 ('/dev/RAC/redo2_01_100.dbf') size 100M,
            group 4 ('/dev/RAC/redo2_02_100.dbf') size 100M;"
            10     alter database enable public thread 2;
            11     Create a second Undo Tablespace from the existing instance
                 "CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE
            '/dev/RAC/undotbs_02_210.dbf' SIZE 200M ;
            "
            12     Set ORACLE_SID and ORACLE_HOME environment variables on the second node.
            13     Start the second Instance.
                 startup

            *****************************************
            Best Regards,
            Shishir Tekade.
            My Blog: http://shishirtekade.blogspot.com
            • 3. Re: convert single instance to RAC
              user12288492
              Please visit the following link for a demonstration of how to use rconfig to convert a single instance database to RAC database :

              http://oracleinaction.blogspot.in/2012/12/RCONFIG.html

              Hope it helps.

              Regards
              • 4. Re: convert single instance to RAC
                rarain
                Hi,

                There are two different ways to convert single instance database to cluster database. One of method is to use RCONFIG and another method is DBCA. Use RCONFIG if database reside on the same server where CRS is running because RCONFIG convert the existing singlt instance database into Cluster database and use DBCA if database reside on different server other than where CRS is running.

                DBCA method is quite simple..Invoke the DBCA and create a database template using existing database with the option including structure as well as data. Copy the template from $ORACLE_HOME/assistants/dbca/template directory to one of cluuster node at the same location and Invoke the DBCA from that cluster node and use that template to create a new cluster database.

                For RCONFIG please use the below steps:-

                -- copy ConvertToRAC_AdminManaged.xml to another file cluster.xml
                node1$cd $ORACLE_HOME/assistants/rconfig/sampleXMLs
                node1$cp ConvertToRAC_AdminManaged.xml cluster.xml


                -- Edit cluster.xml and make following changes :


                . Specify current OracleHome of non-rac database for SourceDBHome
                . Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome
                . Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion
                . Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist.
                . Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name
                . Specify the type of storage to be used by rac database. Allowable values are CFS|ASM
                . Specify Database Area Location to be configured for rac database.
                . Specify Flash Recovery Area to be configured for rac database.


                -- Run rconfig to convert orcl from single instance database to 2 instance RAC database


                node1$rconfig cluster.xml

                -- Check the log file for rconfig while conversion is going on


                oracle@node1$ls -lrt $ORACLE_BASE/cfgtoollogs/rconfig/*.log
                tailf <log file name>


                -- check that the database has been converted successfully


                node11$srvctl status database -d orcl
                Instance orcl1 is running on node node1
                Instance orcl2 is running on node node2


                -- Note that rconfig adds password file to all the nodes but adds entry to tnsnames.ora on local node only.
                -- For all other nodes, copy the entry for the database (orcl) from tnsnames.ora on local node to tnsnames.ora on remote node(s).