Sei sulla pagina 1di 6

C.

4 Converting Databases to Oracle RAC Using RCONFIG


You can use the command line utility rconfig to convert a single-instance database to Oracle
RAC. To use this feature, complete the following steps:

Note:

If the single-instance database is using ASM storage, then use rconfig to convert the database in
the following order:

1. Convert the single-instance ASM configuration to clustered ASM, substituting the file
ConverttoClusteredASM.xml as the input XML file for rconfig. The
ConverttoClusteredASM.xml file is located in the path
$ORACLE_HOME/assistants/rconfig/SampleXMLs.
2. Convert the single-instance database using the following procedure.

If the single-instance database is already using clustered ASM, then proceed directly to
conversion of the single-instance database.

See Also:

Oracle Database Upgrade Guide for information about upgrading existing Oracle Database
installations

1. As the oracle user, navigate to the directory


$ORACLE_HOME/assistants/rconfig/sampleXMLs, and open the file
ConvertToRAC.xml using a text editor, such as vi.
2. Review the ConvertToRAC.xml file, and modify the parameters as required for your
system. The XML sample file contains comment lines that provide instructions for how
to configure the file.

Caution:

Set the convert option Convert verify="ONLY" to perform a test conversion to ensure
that a conversion can be completed successfully.

When you have completed making changes, save the file with the syntax filename.xml.
Make a note of the name you select.

3. Navigate to the directory $ORACLE_HOME/bin, and use the following syntax to run the
command rconfig:
4. rconfig input.xml

where input.xml is the name of the XML input file you configured in step 2.
For example, if you create an input XML file called convert.xml, then enter the
following command

$ ./rconfig convert.xml

Note:

The Convert verify option in the ConvertToRAC.xml file has three options:

• Convert verify="YES": rconfig performs checks to ensure that the prerequisites for
single-instance to Oracle RAC conversion have been met before it starts conversion
• Convert verify="NO": rconfig does not perform prerequisite checks, and starts
conversion
• Convert verify="ONLY" rconfig only performs prerequisite checks; it does not start
conversion after completing prerequisite checks

If performing the conversion fails, then use the following procedure to recover and reattempt the
conversion.:

1. Attempt to delete the database using the DBCA delete database option.
2. Restore the source database.
3. Review the conversion log, and fix any problems it reports that may have caused the
conversion failure. The rconfig log files are under the rconfig directory in
$ORACLE_BASE/cfgtoollogs.
4. Reattempt the conversion.

C.5 Example of an rconfig XML Input File for


ConvertToRAC
The following is an example of an XML ConvertToRAC input file for the rconfig utility. In the
example, the XML input file is for converting a single-instance database with ASM to an Oracle
RAC database with ASM in the same Oracle home.

<?xml version="1.0" encoding="UTF-8"?>


<n:RConfig xmlns:n="http://www.oracle.com/rconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/rconfig">
<n:ConvertToRAC>
<!-- Verify does a precheck to ensure all pre-requisites are met, before the
conversion is attempted. Allowable values are: YES|NO|ONLY -->
<n:Convert verify="YES">
<!--Specify current OracleHome of non-rac database for SourceDBHome -->
<n:SourceDBHome>C:/oracle/rac11home</n:SourceDBHome>
<!--Specify OracleHome where the rac database should be configured. It can be
same as SourceDBHome -->
<n:TargetDBHome>C:/oracle/rac11home</n:TargetDBHome>
<!--Specify SID of non-rac database and credential. User with sysdba role is
required to perform conversion -->
<n:SourceDBInfo SID="sidb">
<n:Credentials>
<n:User>sys</n:User>
<n:Password>oracle</n:Password>
<n:Role>sysdba</n:Role>
</n:Credentials>
</n:SourceDBInfo>
<!--ASMInfo element is required only if the current non-rac database uses ASM
Storage -->
<n:ASMInfo SID="+ASM1">
<n:Credentials>
<n:User>sys</n:User>
<n:Password>welcome</n:Password>
<n:Role>sysdba</n:Role>
</n:Credentials>
</n:ASMInfo>
<!--Specify the list of nodes that should have rac instances running.
LocalNode should be the first node in this nodelist. -->
<n:NodeList>
<n:Node name="node1"/>
<n:Node name="node2"/>
</n:NodeList>
<!--Specify prefix for rac instances. It can be same as the instance name for
non-rac database or different. The instance number will be attached to this
prefix. -->
<n:InstancePrefix>sales</n:InstancePrefix>
<!--Specify port for the listener to be configured for rac database.If
port="", alistener existing on localhost will be used for rac database.The
listener will be extended to all nodes in the nodelist -->
<n:Listener port="1521"/>
<!--Specify the type of storage to be used by rac database. Allowable values
are CFS|ASM. The non-rac database should have same storage type. -->
<n:SharedStorage type="CFS">
<!--Specify Database Area Location to be configured for rac database.If this
field is left empty, current storage will be used for rac database. For CFS,
this field will have directory path. -->
<n:TargetDatabaseArea>M:\oradata</n:TargetDatabaseArea>
<!--Specify Flash Recovery Area to be configured for rac database. If this
field is left empty, current recovery area of non-rac database will be
configured for rac database. If current database is not using recovery Area,
the resulting rac database will not have a recovery area. -->
<n:TargetFlashRecoveryArea>M:\flash_sidb</n:TargetFlashRecove
ryArea>
</n:SharedStorage>
</n:Convert>
</n:ConvertToRAC>
</n:RConfig>

C.6 Converting Single-Instance ASM to Oracle RAC Using


RCONFIG
You can use the command line utility rconfig to convert Automatic Storage Management
(ASM) configured for a single-instance database to ASM configured fro Oracle RAC. To use
this feature, complete the following steps:
See Also:

Oracle Database Upgrade Guide for information about upgrading existing ASM installations

1. As the oracle user, navigate to the directory


$ORACLE_HOME/assistants/rconfig/sampleXMLs, and open the file
ConvertToASM.xml using a text editor, such as vi.
2. Review the ConvertToASM.xml file, and modify the parameters as required for your
system. The XML sample file contains comment lines that provide instructions for how
to configure the file.

Caution:

Set the convert option Convert verify="ONLY" to perform a test conversion to ensure
that a conversion can be completed successfully.

When you have completed making changes, save the file with the syntax filename.xml.
Make a note of the name you select.

3. Navigate to the directory $ORACLE_HOME/bin, and use the following syntax to run the
command rconfig:
4. rconfig input.xml

where input.xml is the name of the XML input file you configured in step 2.

For example, if you create an input XML file called convert.xml, then enter the
following command

$ ./rconfig convert.xml

Note:

The Convert verify option in the ConvertToRAC.xml file has three options:

• Convert verify="YES": rconfig performs checks to ensure that the prerequisites for
single-instance to Oracle RAC conversion have been met before it starts conversion
• Convert verify="NO": rconfig does not perform prerequisite checks, and starts
conversion
• Convert verify="ONLY" rconfig only performs prerequisite checks; it does not start
conversion after completing prerequisite checks

If performing the conversion fails, then use the following procedure to recover and reattempt the
conversion.:

1. Attempt to delete the ASM instance using the DBCA delete ASM option.
2. Restore the source ASM instance.
3. Review the conversion log, and fix any problems it reports that may have caused the
conversion failure. The rconfig log files are under the rconfig directory in
$ORACLE_BASE/cfgtoollogs.
4. Reattempt the conversion.

C.7 Example of an rconfig XML Input File for


ConvertToASM
The following is an example of an XML ConvertToRAC input file for the rconfig utility. This
file is available for use in the following path:

$ORACLE_HOME/assistants/rconfig/sampleXMLs

In this example, the XML input file is for converting a single-instance database with ASM to an
Oracle RAC database with ASM in the same Oracle home.

<?xml version="1.0" encoding="UTF-8"?>


<n:RConfig xmlns:n="http://www.oracle.com/rconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/rconfig/rconfig.xsd">

<n:ConvertToClusteredASM>
<!-- Verify does a precheck to ensure all pre-requisites are
met, before the conversion is attempted. Allowable values are: YES|NO|ONLY -->
<n:ConvertASM verify="YES">
<!--Specify current OracleHome of single instance ASM for
SourceASMHome -->
<n:SourceASMHome>/oracle/product/11.1.0/db_1</n:SourceASMHome>
<!--Specify OracleHome where the clustered ASM should be
configured. It can be same as SourceASMHome -->
<n:TargetASMHome>/oracle/product/11.1.0/db_1</n:TargetASMHome>
<!--Specify single instance ASM credentials -->
<n:ASMInfo SID="+ASM">
<n:Credentials>
<n:User>sys</n:User>
<n:Password>welcome</n:Password>
<n:Role>sysdba</n:Role>
</n:Credentials>
</n:ASMInfo>
<!--Specify the list of nodes that should have clustered ASM
instances running. LocalNode should be the first node in this nodelist. -->
<n:NodeList>
<n:Node name="node1"/>
<n:Node name="node2"/>
</n:NodeList>
<!--Specify port for the listener to be configured for
clustered ASM. If port="", listener existing on localhost will be used for
clustered ASM. The listener will be extended to all nodes in the nodelist -->
<n:Listener port=""/>
<!--Specify comma-seperated path of ASM diskstring to
discover diskgroups that will be mounted on clustered ASM instances. If this
path is not accessible from a node in the nodelist, the diskgroup will not be
mounted on that node. -->
<n:ASMDiskString>/dev/raw1/*,/dev/raw2/*</n:ASMDiskString>
</n:ConvertASM>
</n:ConvertToClusteredASM>
</n:RConfig>

C.8 Post-Conversion Steps


After completing the conversion, note the following recommendations for Oracle RAC
environments, as described in the Oracle RAC documentation:

• Follow the recommendations for using load balancing and transparent application
failover, as described in Oracle Real Application Clusters Administration and
Deployment Guide
• Use locally managed tablespaces instead of dictionary managed tablespaces to reduce
contention and manage sequences in Oracle RAC as described in Oracle Real Application
Clusters Administration and Deployment Guide
• Follow the guidelines for using automatic segment space management as described in
Oracle Real Application Clusters Administration and Deployment Guide

The buffer cache and shared pool capacity requirements in Oracle RAC are slightly greater than
the requirements for single-instance Oracle databases. Therefore, you should increase the size of
the buffer cache by about 10%, and the size of the shared pool by about 15%.

Potrebbero piacerti anche