Converting Single instance to RAC Using DBCA

There are different ways to convert a single instance database to RAC.

1) Manual Method
3) Using DBCA

In this post we will see step by step method to convert a single instance database to RAC Using DBCA(Database Configuration Assitant).

In this example, I already configured two node oracle asm, clusterware homes. also i already  converted the file system from non-asm to asm 
For converting filesystem to ASM click the link above.

follow steps for creating a template to convert a single instance to rac instance.

[oracle@rac1 ~]$ dbca &
 
Screen Name Response
Welcome Screen Select Single Instance database.
Operations Select Manage Templates.
Template management operation Select From an existing database(structure as well as data).
Choose the database Select Database instance: testing
Specify the name and description example: testing and description testing_database_convert_from_single_to_rac_instance_database
specify whether you want to convert
all database
related file locations to OFA,
or You want to main the file
locations in the template.
Select Maintain the file locations.  and click FINISH.
The following operations
will be performed:
create a clone template from
the source database.
click ok
Do you want to perform
another operation
Click No to EXIT

Templates for existing single instance database has been created.

Go to $ORACLE_HOME/assistants/dbca/templates and check generated backup of single instance.

  1. [oracle@rac1 templates]$ pwd
  2. /u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates
  3. [oracle@rac1 templates]$ ls -ltr
  4. total 213584
  5. -rw-r—–  1 oracle oinstall    12050 May 16  2005 New_Database.dbt
  6. -rw-r—–  1 oracle oinstall     5728 Jun 30  2005 Data_Warehouse.dbc
  7. -rw-r—–  1 oracle oinstall     5665 Jun 30  2005 Transaction_Processing.dbc
  8. -rw-r—–  1 oracle oinstall     5608 Jun 30  2005 General_Purpose.dbc
  9. -rwxr-xr-x  1 oracle oinstall  7061504 Jul  2  2005 Seed_Database.ctl
  10. -rwxr-xr-x  1 oracle oinstall 93569024 Jul  2  2005 Seed_Database.dfb
  11. -rwxr-xr-x  1 oracle oinstall   991232 Jul  2  2005 example.dmp
  12. -rwxr-xr-x  1 oracle oinstall 13017088 Jul  2  2005 example01.dfb
  13. -rw-r—–  1 oracle oinstall 96714752 Jul 27 13:47 testing.dfb
  14. -rw-r—–  1 oracle oinstall  7061504 Jul 27 13:47 testing.ctl
  15. -rw-r—–  1 oracle oinstall     5349 Jul 27 13:49 testing.dbc

Copy the pre-configured database image from rac1 machine $ORACLE_HOME/assistants/ dbca/ templates/ testing.dbf & testing.dbc    to  host rac2 environment  $ORACLE_HOME/assistants/dbca/templates/ folder

  1. [oracle@rac1 templates]$ scp testing.dfb oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/
  2. testing.dfb                                   100%   92MB   2.5MB/s   00:37
  3. [oracle@rac1 templates]$ scp testing.dbc oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/
  4. testing.dbc                                   100% 5349     5.2KB/s   00:00
  5. [oracle@rac1 templates]$ scp testing.ctl oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/
  6. testing.ctl                                   100% 6896KB   2.2MB/s   00:03
  1. [oracle@rac2 templates]$ pwd
  2. /u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates
  3. [oracle@rac2 templates]$ ls -ltr
  4. -rw-r—–  1 oracle oinstall 96714752 Jul 27 14:24 testing.dfb
  5. -rw-r—–  1 oracle oinstall     5349 Jul 27 14:26 testing.dbc
  6. -rw-r—–  1 oracle oinstall  7061504 Jul 27 14:26 testing.ctl

Start the dbca to convert the single instance to rac single database.
[oracle@rac2 templates]$ dbca &

Screen Name Response
Welcome to the Database
configuration assitant
Select Oracle Real Application Database
Select the operation select : create a database
Select the nodes on which you
want to create the cluster
database
Select select all.
Select a template from the
following list to create
the database:
Select the template: testing(template name created by you)
Select the
Global database name
and SID:
  Type name as you want, eg: raj.
Each oracle database may be managed
centrally using the Oracle Enterprise
Manager Grid Control or locally using
the Enterprise Manager Database Control.
Choose the management option that you
would like to use to manage this
database.

Select:  configure the database with enterprise manager
For security reasons, you must specify
password for the following user
accounts in the new database.
select: Use the same password for ALL accounts password: yourpassword confirm password: yourpassword
Select the Listeners
Select:Register this database with all listeners
Select the storage mechanism
Select: Automatic Storage Management(ASM)
select the disk groups to be used as
storage for the database.

Select the disk group names: eg: DATA
Specify locations for the database
files to be created.

Select:  use Oracle-Managed Files
Choose the recovery options
uncheck all
Custom Scripts
Select: No scripts to run
Oracle Database Services Details
Click: Next
Initialization Parameters
Click: Next
Database storage
Click: Next
creation options
click: Finish
  1. [oracle@rac2 templates]$ vi /etc/oratab
  2. edit the oratab file for instances raj as raj1 and raj2 on both nodes
  3. [oracle@rac2 templates]$ . oraenv
  4. ORACLE_SID = [oracle] ? raj2
  5. [oracle@rac2 templates]$ sqlplus ‘/as sysdba’
  6. SQL*Plus: Release 10.2.0.1.0 – Production on Tue Jul 27 19:37:27 2010
  7. Copyright (c) 1982, 2005, Oracle.  All rights reserved.
  8. Connected to:
  9. Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
  10. With the Partitioning, Real Application Clusters, OLAP and Data Mining options
  11. SQL> select instance_name from gv$instance;
  12. INSTANCE_NAME
  13. —————-
  14. raj2
  15. raj1

hope, this helps you.

related documents:
http://oracleinstance.blogspot.com/2009/12/convert-single-instance-to-rac-instance.html (rconfig method)
http://oracleinstance.blogspot.com/2009/12/migrate-from-database-file-system-to.html
http://oracleinstance.blogspot.com/2009/12/convert-rac-instance-to-single-instance.html

Posted by Rajeshkumar Govindarajan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s