Converting single Instance to RAC instance Using DBCA

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

1) Manual Method

2) Using rconfig

3) Using DBCA

4) Using grid control

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

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.

[oracle@rac1 templates]$ pwd

/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates

[oracle@rac1 templates]$ ls -ltr

total 213584

-rw-r—–  1 oracle oinstall    12050 May 16  2005 New_Database.dbt

-rw-r—–  1 oracle oinstall     5728 Jun 30  2005 Data_Warehouse.dbc

-rw-r—–  1 oracle oinstall     5665 Jun 30  2005 Transaction_Processing.dbc

-rw-r—–  1 oracle oinstall     5608 Jun 30  2005 General_Purpose.dbc

-rwxr-xr-x  1 oracle oinstall  7061504 Jul  2  2005 Seed_Database.ctl

-rwxr-xr-x  1 oracle oinstall 93569024 Jul  2  2005 Seed_Database.dfb

-rwxr-xr-x  1 oracle oinstall   991232 Jul  2  2005 example.dmp

-rwxr-xr-x  1 oracle oinstall 13017088 Jul  2  2005 example01.dfb

-rw-r—–  1 oracle oinstall 96714752 Jul 27 13:47 testing.dfb

-rw-r—–  1 oracle oinstall  7061504 Jul 27 13:47 testing.ctl

-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

[oracle@rac1 templates]$ scp testing.dfb oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/testing.dfb                                   100%   92MB   2.5MB/s   00:37

[oracle@rac1 templates]$ scp testing.dbc oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/testing.dbc                                   100% 5349     5.2KB/s   00:00

[oracle@rac1 templates]$ scp testing.ctl oracle@rac2:/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates/testing.ctl                                   100% 6896KB   2.2MB/s   00:03

[oracle@rac2 templates]$ pwd

/u01/app/oracle/product/10.2.0/db_1/assistants/dbca/templates

[oracle@rac2 templates]$ ls -ltr

-rw-r—–  1 oracle oinstall 96714752 Jul 27 14:24 testing.dfb

-rw-r—–  1 oracle oinstall     5349 Jul 27 14:26 testing.dbc

-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

[oracle@rac2 templates]$ vi /etc/oratab

edit the oratab file for instances raj as raj1 and raj2 on both nodes

[oracle@rac2 templates]$  oraenv

ORACLE_SID = [oracle] ? raj2

[oracle@rac2 templates]$ sqlplus ‘/as sysdba’

SQL*Plus: Release 10.2.0.1.0 – Production on Tue Jul 27 19:37:27 2010

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

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> select instance_name from gv$instance;

INSTANCE_NAME

—————-

raj2

raj1

Advertisements
Leave a comment

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

%d bloggers like this: