Forgot your password?    
+ Reply to Thread
Results 1 to 4 of 4

Thread: Convert Single Instance ( Non-RAC ) Database to RAC

  1. #1
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427

    Convert Single Instance ( Non-RAC ) Database to RAC

    Here we are convering a Non-RAC Single Instance on a node where Cluster Services are Running to a RAC Instance.

    Perform the following procedures to convert this type of single-instance database to a RAC database: =======================================
    1. Change the directory to the lib subdirectory in the rdbms directory under the Oracle home.

    2. Relink the oracle binary by executing the following commands , to convert the Oracle Home to RAC-Enabled:

    (Database should be down , to relink 'oracle' executable with rac_on)

    make -f ins_rdbms.mk rac_on

    make -f ins_rdbms.mk ioracle

    Manual Database Conversion Procedure
    =======================================
    1. Create the OFA directory structure on all of the nodes that you have added.

    2. copy the database datafiles, control files, redo logs, and server parameter file to their ASM Disk Groups (when using ASM) / corresponding raw devices (whan using raw devices )/ Cluster File systems (OCFS2/third party Cluster file systems) using the respective command.
    For ASM , the steps are outlined in : Migrate-Convert-Database-from-Non-ASM-to-ASM-Using-RMAN

    3. Re-create the control files by executing the CREATE CONTROLFILE SQL statement with the REUSE keyword and specify MAXINSTANCES and MAXLOGFILES, and so on, as needed for your RAC configuration. The MAXINSTANCES recommended default is 32.

    4. Shut down the database instance.

    5. If your single-instance database was using an SPFILE parameter file, then create a temporary PFILE from the SPFILE using the following SQL statement:

    CREATE PFILE='pfile_name' from spfile='spfile_name'

    6. Set the CLUSTER_DATABASE parameter to TRUE, set the
    INSTANCE_NUMBER parameter to a unique value for each instance, using a sid.parameter=value syntax.

    7. Start up the database instance using the PFILE created in step 5.

    8. If your single-instance database was using automatic undo management, then create an undo tablespace for each additional instance using the CREATE UNDO TABLESPACE SQL statement.

    9. Create redo threads that have at least two redo logs for each additional instance. If you are using raw devices, then ensure that the redo log files are on raw devices. Enable the new redo threads by using an ALTER DATABASE SQL statement. Then shutdown the database instance.

    10. Copy the Oracle password file from the initial node, or from the node from which you are working, to the corresponding location on the additional nodes on which the cluster database will have an instance. Make sure that you replace the ORACLE_SID name in each password file appropriately for each additional instance.

    11. Add REMOTE_LISTENER=LISTENERS_DB_NAME and sid.LOCAL_LISTENER=LISTENER_SID parameters to the PFILE.

    12. Configure the net service entries for the database and instances and address entries for the LOCAL_LISTENER for each instance and REMOTE_LISTENER in the tnsnames.ora file and copy it to all nodes.

    13. Create the SPFILE from the PFILE. If you are not using a cluster file system, then ensure that the SPFILE is on a raw device.

    14. Add the configuration for the RAC database and its instance-to-node mapping using SRVCTL.

    15. Start the RAC database using SRVCTL.
    After starting the database with SRVCTL, your conversion process is complete and, for example, you can execute the following SQL statement to see the statuses of all the instances in your RAC database:
    select * from v$active_instances

  2. #2
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427
    (In this case it was observerd that MAXINSTANCES was 8 and MAXLOGFILES was 16.
    Hence the Control file did not require re-creation)

    Shutdown the Database that needs to be converted to RAC

    rac1-> cd $ORACLE_HOME/rdbms/lib

    rac1-> make -f ins_rdbms.mk rac_on

    rac1-> make -f ins_rdbms.mk ioracle

    rac1-> cd $ORACLE_HOME/dbs

    rac1-> sqlplus

    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 27 18:50:11 2011

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Enter user-name: / as sysdba
    Connected to an idle instance.

    SQL> create pfile='initstagedb.ora' from spfile='spfilestagedb.ora';

    File created.

    SQL> exit

    rac1-> cp initstagedb.ora initstagedb1.ora

    rac1-> vi initstagedb1.ora

    *.cluster_database=true
    stagedb1.instance_number=1

    rac1-> sqlplus

    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 27 18:54:24 2011

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Enter user-name: / as sysdba
    Connected to an idle instance.

    SQL> !pwd
    /u01/app/oracle/product/10.2.0/db_2/dbs

    SQL> startup pfile=./initstagedb1.ora
    ORACLE instance started.
    ...
    Database opened.


    Add redo log groups for thread 1 and 2 ..

    SQL> alter database add logfile thread 1 group 1 ('+DATA');

    Database altered.

    SQL> alter database add logfile thread 2 group 7 ('+DATA');

    Database altered.

    Create Undo Tablespace for Instance 1 .The same needs to be done also for Instance 2

    SQL> create undo tablespace undotbs_1 datafile '+DATA' size 2000M;

    Tablespace created.

    SQL> alter system set undo_tablespace='UNDOTBS_1' ;

    System altered.

    SQL> drop tablespace undotbs1 including contents and datafiles;

    Tablespace dropped.
    SQL> exit

    rac1-> pwd
    /u01/app/oracle/product/10.2.0/db_2/dbs


    rac1-> pwd
    /u01/app/oracle/product/10.2.0/db_2/dbs


    rac1-> vi initstagedb1.ora
    and
    stagedb.undo_tablespace='UNDOTBS_1'

    rac1-> export ORACLE_SID=stagedb1
    rac1-> sqlplus

    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 27 19:12:10 2011

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Enter user-name: / as sysdba


    SQL> create spfile='spfilestagedb1.ora' from pfile='initstagedb1.ora';

    File created.

    SQL> exit

    rac1-> srvctl add database -d stagedb -o /u01/app/oracle/product/10.2.0/db_2

    rac1-> crs_stat -t
    Name Type Target State Host
    ------------------------------------------------------------
    ora.stagedb.db application OFFLINE OFFLINE
    ora.devdb.db application ONLINE ONLINE rac2
    ora....b1.inst application ONLINE OFFLINE
    ora....b2.inst application ONLINE ONLINE rac2
    ora....SM1.asm application ONLINE ONLINE rac1
    ora....C1.lsnr application ONLINE ONLINE rac1
    ora.rac1.gsd application ONLINE ONLINE rac1
    ora.rac1.ons application ONLINE ONLINE rac1
    ora.rac1.vip application ONLINE ONLINE rac1
    ora....SM2.asm application ONLINE ONLINE rac2
    ora....C2.lsnr application ONLINE ONLINE rac2
    ora.rac2.gsd application ONLINE ONLINE rac2
    ora.rac2.ons application ONLINE ONLINE rac2
    ora.rac2.vip application ONLINE ONLINE rac2
    rac1->

    rac1-> sqlplus

    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 27 19:18:03 2011

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Enter user-name: / as sysdba

    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options

    SQL> shut immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.

    SQL> exit

    rac1-> srvctl add instance -d stagedb -i stagedb1 -n rac1
    rac1-> srvctl start database -d stagedb

    rac1-> crs_stat -t
    Name Type Target State Host
    ------------------------------------------------------------
    ora.stagedb.db application ONLINE ONLINE rac1
    ora....ak.inst application ONLINE ONLINE rac1
    ora.devdb.db application ONLINE ONLINE rac2
    ora....b1.inst application ONLINE OFFLINE
    ora....b2.inst application ONLINE ONLINE rac2
    ora....SM1.asm application ONLINE ONLINE rac1
    ora....C1.lsnr application ONLINE ONLINE rac1
    ora.rac1.gsd application ONLINE ONLINE rac1
    ora.rac1.ons application ONLINE ONLINE rac1
    ora.rac1.vip application ONLINE ONLINE rac1
    ora....SM2.asm application ONLINE ONLINE rac2
    ora....C2.lsnr application ONLINE ONLINE rac2
    ora.rac2.gsd application ONLINE ONLINE rac2
    ora.rac2.ons application ONLINE ONLINE rac2
    ora.rac2.vip application ONLINE ONLINE rac2

  3. #3
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427
    With Oracle Database 10g Release 2, $ORACLE_HOME/bin/rconfig tool can be used to convert Single instance database to RAC. This tool takes in a xml input file and convert the Single Instance database whose information is provided in the xml. You can run this tool in "verify only" mode prior to performing actual conversion. This is documented in the RAC admin book and a sample xml can be found $ORACLE_HOME/assistants/rconfig/sampleXMLs/ConvertToRAC.xml. This tool only supports databases using a clustered file system or ASM. You cannot use it with raw devices. Grid Control 10g Release 2 provides a easy to use wizard to perform this function.

    Note: Please be aware that you may hit bug 4456047 (shutdown immediate hangs) as you convert the database. The bug is updated with workaround and the w/a should is release noted as well.

  4. #4
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427
    The thread for a particular instance can be specified by the THREAD parameter.

    If You encounter this error while startup of an Instance :

    ORA-01618: redo thread 2 is not enabled - cannot mount


    On the Instance which is running enable the thread :

    SQL> alter database enable thread 2;

    Database altered.

+ Reply to Thread

Similar Threads

  1. Oracle Database Single Instance To RAC Conversion Using RCONFIG.
    By ajaychandi in forum RAC Installation, ASM Install , ASM Administration
    Replies: 0
    Last Post: 04-26-2012, 12:52 PM
  2. Create single instance standby database for RAC Database
    By devesh_ocp in forum DataGuard Setup and Management
    Replies: 0
    Last Post: 04-26-2012, 11:27 AM
  3. Single Instance Conversion To RAC Using DBCA Part 2.
    By ajaychandi in forum RAC Installation, ASM Install , ASM Administration
    Replies: 0
    Last Post: 04-18-2012, 06:12 PM
  4. Single Instance Conversion To RAC Using DBCA Part 1.
    By ajaychandi in forum RAC Installation, ASM Install , ASM Administration
    Replies: 0
    Last Post: 04-18-2012, 06:07 PM
  5. Migrate / Convert Oracle Database from Non-ASM to ASM Using RMAN
    By Hemant in forum RAC Installation, ASM Install , ASM Administration
    Replies: 1
    Last Post: 11-27-2011, 06:32 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics