convert 11gr2 database to rac using rconfig

Upload: frank-melendez

Post on 03-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    1/10

    AuthorA.Kishorehttp:/www.appsdba.info

    Convert 11gR2 non-RAC database to RAC database using rconfig

    Ive installed the new 11gR2 clustered ORACLE_HOME at

    /d01/oracle/app/oracle/product/11.2.0/dbhome_1 on both the nodes linux1 and linux2

    New Oracle 11gR2 RAC Home - /d01/oracle/app/oracle/product/11.2.0/dbhome_1SourceDBHome - /d01/oracle/RACDB/db/tech_st/11.2.0ORACLE_SIDRACDB

    1. As the oracle user, navigate to the directory $ORACLE_HOME/assistants/rconfig/sampleXMLs,and open the sample file ConvertToRAC.xml using a text editor such as vi. This XML sample filecontains comment lines that provide instructions on how to edit the file to suit your site's specificneeds.

    Connect to new home . ./oracle.env [oracle@linux1 ~]$ cat oracle.envexport ORACLE_HOME=/d01/oracle/app/oracle/product/11.2.0/dbhome_1

    export LD_LIBRARY_PATH=$ORACLE_HOME/lib,$ORACLE_HOME/ctx/libexport ORACLE_SID=RACDBexport PATH=$PATH:$ORACLE_HOME/binexportTNS_ADMIN=/d01/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/RACDB1_linux1

    cd /d01/oracle/app/oracle/product/11.2.0/dbhome_1/assistants/rconfig/sampleXMLscp ConvertToRAC_AdminManaged.xml ConvertToRAC_AdminManaged.xml_org

    2. Copy the sample ConvertToRAC_AdminManaged.xml, and modify the parameters as required foryour system. Make a note of the name of your copy of the XML file.

    3. To test the settings specified, it is advisable to execute rconfig using convert verify="ONLY"before carrying out the actual conversion. This will perform a test run to validate parameters andflag any incorrect settings or issues that need to be resolved before the final conversion takesplace.

    Note: Specify 'SourceDBHome' variable in ConvertToRAC_AdminManaged.xml as Non- RACoracle home (e.g. $OLD_ORACLE_HOME path). If you wish to specify asNEW_ORACLE_HOME then start the database from new oracle home using:

    I have started from NEW_ORACLE_HOME

    http://zakkiahmed.wordpress.com/2010/08/04/convert-11gr2-non-rac-database-to-rac-database-using-rconfig/http://zakkiahmed.wordpress.com/2010/08/04/convert-11gr2-non-rac-database-to-rac-database-using-rconfig/http://zakkiahmed.wordpress.com/2010/08/04/convert-11gr2-non-rac-database-to-rac-database-using-rconfig/
  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    2/10

    AuthorA.Kishorehttp:/www.appsdba.info

    4. Move the spfile to the shared location, in this case the Single Instance Database was hosted on filesystem, in this process we will move the datafiles from file system storage to ASM.

    -- From New Home

    -- copy the initRACDB.ora from Source DB Home

    Create the spfile from pfile using the command:sqlplus /as sysdba

    So create spfile in the shared disk location

    create spfile='+DATA/spfile/spfileracdb.ora' from pfile;

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    3/10

    AuthorA.Kishorehttp:/www.appsdba.info

    You can check if the file is created through asmcmdcat grid.envexport ORACLE_HOME=/d01/oracle/app/11.2.0/gridexport PATH=$PATH:$ORACLE_HOME/bin

    . ./grid.env

    . ./oracle.env

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    4/10

    AuthorA.Kishorehttp:/www.appsdba.info

    5.Take a backup of existing $ORACLE_HOME/dbs/init.ora and create a new$ORACLE_HOME/dbs/init.ora with following parameter:

    spfile='/spfile.ora'

    spfile= +DATA/spfile/spfileracdb.ora

    6. Start up the instance from the NEW ORACLE_HOME

    7. Now lets test if rconfig is ready for conversion, navigate to $ORACLE_HOME/assistants/rconfig/sampleXMLs and issue the following command

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    5/10

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    6/10

    AuthorA.Kishorehttp:/www.appsdba.info

    9. Perform the conversionrconfig ConvertToRAC_AdminManaged.xml

    The conversion will take some time to complete. The progress can be monitored from the logs located at$ORACLE_BASE/cfgtoollogs/rconfig

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    7/10

    AuthorA.Kishorehttp:/www.appsdba.info

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    8/10

    AuthorA.Kishorehttp:/www.appsdba.info

    Post-RAC Migration Steps

    Back out archivelog mode changes implemented by Rconfig (conditional). Rconfig will put the database

    into archive log mode. If you do not want the database to be in archive log mode, you can disable it usingthe following steps:

    Shut down the instances all on database nodes.

    Set cluster_database=false in the $ORACLE_HOME/dbs/init.ora file from any one node.

    Start up the instance using "Startup mount" option.

    Disable the archive logging using Alter database noarchivelog;

    Shut down the database.

    Set cluster_database=true in the $ORACLE_HOME/dbs/ini.ora file.

    Start up all the instances.

    Check the archive log setting using the command "archive log list".

    Remove the Listener configuration generated by Rconfig using NetCA (Conditional)

    If the existing single instance Net Listener was not reused during the Rconfig conversion, or is namedsomething other than LISTENER_, remove the Listener configuration generated by Rconfigusing NetCA, then verify that the listener was removed from CRS by issuing the crs_stat command from asession set to the CRS_ORACLE_HOME location.

    Shut down the Listeners

    Using the command "srvctl stop listener -n ", shut down the listeners with the nameLISTENER_. These were created in Step 3.3 using srvctl login as the owner of theCRS_ORACLE_HOME.

    This post talks about the Conversion of 11gR2 non-RAC database to RAC database using rconfig.

    Oracle provides 3 methods to convert non-RAC single instance database to RAC databases:

    1. DBCA2. rconfig3. Enterprise Manager

    All the 3 have their own benefits and can be used to suit ones needs. My recent work involved the

    conversion of non-RAC single instance database to RAC database using rconfig, although Ive tested allthe 3 methods but concluded on rconfig.

  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    9/10

    AuthorA.Kishorehttp:/www.appsdba.info

    Listener Configuration in 11gR2

    Listener configuration can often be confusing when converting an Oracle E-Business Suitedatabase to use Oracle RAC.

    There are two types of listener in 11gR2 Clusterware: the Scan listener and general databaselisteners. The Scan listener provides a single named access point for clients, and replaces the useof Virtual IP addresses (VIP) in client connection requests (tnsnames.ora aliases). However,

    connection requests can still be routed via the VIP name, as both access methods are fullysupported.

    Note: At present, AutoConfig does not support Scan listeners. This will be addressed in afuture version of AutoConfig.

    To start or stop a listener from srvctl, three configuration components are required:

    An Oracle Home from which to run lsncrtl The listener.ora file under the TNS_ADMIN network directory The listener name (defined in listener.ora) to start and stop

    The Oracle Home can either be the Infrastructure home or a database home. The TNS_ADMINdirectory can be any accessible directory. The listener name must be unique within thelistener.ora file. SeeOracle Real Application Clusters Administration and Deployment Guide 11gRelease 2 (11.2)

    There are three issues to be considered:

    Listener configuration in 11gR2 Clusterware. Listener requirements for converting to Oracle RAC Listener requirements for AutoConfig

    3.3.1 Listener Configuration in 11gR2 Clusterware

    In 11gR2, listeners are configured at the cluster level, and all nodes inherit the port andenvironment settings. This means that the TNS_ADMIN directory path will be the same on allnodes. So to create a new listener, listener_ebs, on port 1522, running from the databaseORACLE_HOME and with a user defined TNS_ADMIN directory, you would execute commands

    based on the following:

    srvctl add listener -l listener_ebs -o -p 1522

    srvctl setenv listener -l listener_ebs -T TNS_ADMIN= $TNS_ADMIN

    When the listener starts, it will run from the database ORACLE_HOME. srvctl manages thelistener.ora file across all nodes.

    3.3.2 Listener requirements for converting to Oracle RAC

    Tools such as rconfig impose additional restrictions on the choice of listener. The listener must

    be the default listener, and it must run from the Grid Infrastructure home. So the example in3.3.1 above would need to be changed to:

    http://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htmhttp://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htmhttp://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htmhttp://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htmhttp://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htmhttp://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htmhttp://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htmhttp://download.oracle.com/docs/cd/E11882_01/rac.112/e10718/toc.htm
  • 7/28/2019 Convert 11gR2 Database To RAC using Rconfig

    10/10

    AuthorA.Kishorehttp:/www.appsdba.info

    srvctl add listener -p 1531

    After conversion, you can reconfigure the listener as required.

    -- I did not create any of the above

    3.1.1.3 Listener requirements for AutoConfig

    The current version of AutoConfig creates listener names of the form listener_,i.e. different listener names on each node in the cluster. This issue is being tracked via bug8312164, and a future version of AutoConfig the listener name will be a user-defined contextvariable.

    Using Oracle 11g Release 2 Real Application Clusters with Oracle E-Business Suite Release 12 (Doc ID 823587.1)

    https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=823587.1&h=Yhttps://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=823587.1&h=Yhttps://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=823587.1&h=Y