Monday 1 July 2013

11g R2 RAC: CONVERT NON RAC DATABASE TO RAC DATABASE USING RCONFIG


for RAC basics click on below URL

http://learnappsdbaskills.blogspot.in/2013/06/rac-basics.html




Oracle supports the following methods to convert a single-instance database to an RAC database as long as the RAC and the standalone environments are running on the same operating system and using the same oracle release:


• DBCA


• Oracle E

nterprise Manager (grid control)


• RCONFIG


• Manual method


In this post, I will focus on and demonstrate this using the rconfig command-line tool.


During the conversion, rconfig performs the following steps automatically:


• Migrating the database to ASM, if specified


• Creating RAC database instances on all specified nodes in the cluster


• Configuring the Listener and NetService entries


• Registering services with CRS


• Starting up the instances and listener on all nodes


In Oracle 11g R2., a single-instance database can either be converted to an administrator-managed cluster database or a policy-managed cluster database.


When you navigate through the $ORACLE_HOME/assistants/rconfig/sampleXMLS, you will find two sample XML input files.


- ConvertToRAC_AdminManaged.xml


- ConvertToRAC_PolicyManaged.xml


While converting a single-instance database, with filesystem storage, to an RAC database with Automatic Storage Management (ASM), rconfig invokes RMAN internally to back up the database to proceed with converting non-ASM to ASM. Therefore, configuring parallel options to use multiple RMAN channels in the


RMAN on the local node may make backup run faster, which eventually reduces the conversion duration. For example, you may configure the following in the RMAN settings of orcl database on the local node.


RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 6;


CURRENT SCENARIO:


- 3 node RAC setup


- Names of nodes : Host01, Host02, Host03


- Name of single instance database with filesystem storage : orcl


- Source Oracle home : /u01/app/oracle/product/11.2.0/dbhome_1


- Target Oracle home : /u01/app/oracle/product/11.2.0/dbhome_1


OBJECTIVE


- convert orcl to a Admin managed RAC database running on two nodes host01 and host02.


- change storage to ASM with


. Datafiles on +DATA diskgroup


. Flash recovery area on +FRA diskgroup


IMPLEMENTATION:


– copy ConvertToRAC_AdminManaged.xml to another file my.xml


host01$cd $ORACLE_HOME/assistants/rconfig/sampleXMLs


host01$cp ConvertToRAC_AdminManaged.xml my.xml


– Edit my.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


host01$rconfig my.xml


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


oracle@host01$ls -lrt $ORACLE_BASE/cfgtoollogs/rconfig/*.log


tailf


– check that the database has been converted successfully


host01$srvctl status database -d orcl


Instance orcl1 is running on node host01


Instance orcl2 is running on node host02


– Note that rconfig adds password file to all the nodes but entry to tnsnames.ora needs to be modified (to reflect scan name instead of host-ip) on the local node and added to rest of the nodes.


– For all other nodes, copy the entry for the database (orcl) from tnsnames.ora on local node to tnsnames.ora on remote node(s).


– Following is the entry I modified on the local node and copied to rest of the nodes :


ORCL =


(DESCRIPTION =


(ADDRESS = (PROTOCOL = TCP)(HOST = cluster01-scan.cluster01.example.com)(PORT = 1521))


(CONNECT_DATA =


(SERVER = DEDICATED)


(SERVICE_NAME = orcl)


)


)


– check that database can be connected remotely from remote node.


host02$sqlplus system/oracle@orcl


– check that datafiles have converted to ASM


SQL>select name from v$datafile;


NAME


——————————————————————————–


+DATA/orcl/datafile/system.326.794838279


+DATA/orcl/datafile/sysaux.325.794838349


+DATA/orcl/datafile/undotbs1.305.794838405


+DATA/orcl/datafile/users.342.794838413


+DATA/orcl/datafile/undotbs2.348.794838


———————————————————————————————————–

No comments: