Convert Single Instance DB to RAC DB using rconfig

本文档介绍了如何将Oracle单实例数据库转换为RAC数据库,适用于Oracle 12.2.0.1和18.1.1版本。首先确保已安装Oracle Grid Infrastructure和单实例数据库软件。然后编辑所需的XML配置文件,根据需要选择AdminManaged或PolicyManaged类型。使用RAC用户运行rconfig命令进行转换,并注意可能遇到的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Summary

This passage will lead you convert Single Instance DB to RAC DB.

This passage is based on Oracle 12.2.0.1 & 18.1.1.

Prerequisites

  • Oracle Grid Infrastructure installed.
  • Oracle Database software installed, configured as Single Instance Database installation. We name this installation as RAC1.
  • Another Oracle Database software installed, configured as RAC Database installation. We name this installation as RAC2.

Edit information needed

Go to $ORACLE_HOME/assistants/rconfig/sampleXMLs directory, there are 2 xml files: ConvertToRAC_AdminManaged.xml and ConvertToRAC_PolicyManaged.xml. Choose one of the files based on what type of database you want to convert to.

Copy selected xml file, copy to your own directory, edit. We name copied xml file as convert.xml.

Here’s the example of xml file, you can find out comments in line. FYI, paths in xml file MUST be absolute path and follow this pattern: /xxx/yyy/zzz without adding slash to the end.

<?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: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><!-- Fill ORACLE_HOME of RAC1. Do NOT add slash at the end of path. --></n:SourceDBHome>
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
          <n:TargetDBHome><!-- Fill ORACLE_HOME of RAC2. Do NOT add slash at the end of path. --></n:TargetDBHome>
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
              <n:SourceDBInfo SID="<!-- SID of old database, by default is orcl -->">
            <n:Credentials>
              <n:User><!-- By default is sys --></n:User>
              <n:Password><!-- Password of database. Used by SQLPlus too. --></n:Password>
              <n:Role><!-- By default is sysdba --></n:Role>
            </n:Credentials>
<!--Specify Windows Secure Oracle Home Credentials if the Oracle Home was installed with Secure User option  -->
<!--
            <n:Credentials>
              <n:User>UserDomain\SecureHomeUserName</n:User>
              <n:Password>oracle</n:Password>
              <n:Role>windows_svc</n:Role>
            </n:Credentials>
-->
          </n:SourceDBInfo>
<!--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. -->
          <n:NodeList>        
            <n:Node name="<!-- Nodes that you want to host RAC database -->"/>
            <n:Node name="<!-- Nodes that you want to host RAC database -->"/>
          </n:NodeList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
              <!--n:RacOneNode  servicename="salesrac1service"/-->
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
          <n:InstancePrefix><!-- Prefix of database instance. By default is orcl. --></n:InstancePrefix>
<!-- Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. -->
<!--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. ASM credentials are no needed for conversion. -->
          <n:SharedStorage type="ASM">
<!--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><!-- ASM DG name. Don't forget to add "+" before DG name. --></n:TargetDatabaseArea>
<!--Specify Fast 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><!-- ASM DG name. Don't forget to add "+" before DG name. --></n:TargetFlashRecoveryArea>
          </n:SharedStorage>
        </n:Convert>
    </n:ConvertToRAC>
</n:RConfig>

rconfig

Run following command using RAC user $RAC2_HOME/bin/rconifg convert.xml.

Potential errors

ErrorPotential problem
Cannot determine if cdb or notPath of SourceDBHome or TargetDBHome may be incorrect.
Cannot get SQLEnginePath specified may be incorrect, unnecessary slash was added to the end of path.

Documents

Converting to Oracle Real Application Clusters from Single-Instance Oracle Databases

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值