prerequisite

in my case i first created a clone of a rac database on same server using active duplicate. now i will convert this non-rac db to rac db

if you want to see the process follow this

https://dbatracker.com/2020/06/22/rman-active-duplicate-using-spfile-option-same-server/

admin managed conversion

copy sample rconfig file and make changes

oracle@ol6-112-rac1 sampleXMLs]$ pwd
/u01/app/oracle/product/11.2.0.3/db_1/assistants/rconfig/sampleXMLs
[oracle@ol6-112-rac1 sampleXMLs]$ ls
ConvertToRAC_AdminManaged.xml  ConvertToRAC_PolicyManaged.xml

[oracle@ol6-112-rac1 sampleXMLs]$ cp ConvertToRAC_AdminManaged.xml /home/oracle

after changes

[oracle@ol6-112-rac1 ~]$ cat ConvertToRAC_AdminManaged.xml
<?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>/u01/app/oracle/product/11.2.0.3/db_1</n:SourceDBHome>
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
              <n:TargetDBHome>/u01/app/oracle/product/11.2.0.3/db_1</n:TargetDBHome>
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
              <n:SourceDBInfo SID="dup5">
                <n:Credentials>
                  <n:User>sys</n:User>
                  <n:Password>oracle</n:Password>
                  <n:Role>sysdba</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="ol6-112-rac1"/>
                <n:Node name="ol6-112-rac2"/>
              </n:NodeList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
              <!--n:RacOneNode  servicename="dup5"/-->
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
              <n:InstancePrefix></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></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></n:TargetFlashRecoveryArea>
              </n:SharedStorage>
        </n:Convert>
    </n:ConvertToRAC>
</n:RConfig>

now first we will test whether all parameters are put up correctly and db is ready for conversion. so change this value

change <n:Convert verify=”YES”> to <n:Convert verify=”ONLY”> and run config

[oracle@ol6-112-rac1 ~]$ which rconfig
/u01/app/oracle/product/11.2.0.3/db_1/bin/rconfig
[oracle@ol6-112-rac1 ~]$ rconfig ConvertToRAC_AdminManaged.xml
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
    <Convert>
      <Response>
        <Result code="0" >
          Operation Succeeded
        </Result>
      </Response>
      <ReturnValue type="object">
There is no return value for this step     </ReturnValue>
    </Convert>
  </ConvertToRAC></RConfig>

so our db is ready. now change it back to <n:Convert verify=”YES”>

run rconfig

[oracle@ol6-112-rac1 ~]$ rconfig ConvertToRAC_AdminManaged.xml
Converting Database "DUP5.localdomain" to Cluster Database. Target Oracle Home: /u01/app/oracle/product/11.2.0.3/db_1. Database Role: PRIMARY.
Setting Data Files and Control Files
Adding Database Instances
Adding Redo Logs
Enabling threads for all Database Instances
Setting TEMP tablespace
Adding UNDO tablespaces
Adding Trace files
Setting Fast Recovery Area
Updating Oratab
Creating Password file(s)
Configuring Listeners
Configuring related CRS resources
Starting Cluster Database
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
    <Convert>
      <Response>
        <Result code="0" >
          Operation Succeeded
        </Result>
      </Response>
      <ReturnValue type="object">
<Oracle_Home>
         /u01/app/oracle/product/11.2.0.3/db_1
       </Oracle_Home>
       <Database type="ADMIN_MANAGED"  >
         <InstanceList>
           <Instance SID="DUP51" Node="ol6-112-rac1"  >
           </Instance>
           <Instance SID="DUP52" Node="ol6-112-rac2"  >
           </Instance>
         </InstanceList>
       </Database>     </ReturnValue>
    </Convert>
  </ConvertToRAC></RConfig>

check the status

[oracle@ol6-112-rac1 ~]$ srvctl config database -d dup5
Database unique name: DUP5
Database name: DUP5
Oracle home: /u01/app/oracle/product/11.2.0.3/db_1
Oracle user: oracle
Spfile: +DATA/DUP5/spfiledup5.ora
Domain: localdomain
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: DUP5
Database instances: DUP51,DUP52
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed

you can see spfile is moved to ASM and init file is created with this entry

[oracle@ol6-112-rac1 dbs]$ cat initDUP51.ora
SPFILE='+DATA/DUP5/spfiledup5.ora'              # line added by Agent

[oracle@ol6-112-rac2 dbs]$ cat initDUP52.ora
SPFILE='+DATA/DUP5/spfiledup5.ora'              # line added by Agent


[oracle@ol6-112-rac1 ~]$ srvctl status database -d dup5
Instance DUP51 is running on node ol6-112-rac1
Instance DUP52 is running on node ol6-112-rac2

For Policy managed conversion

check the available server pool where you want to put your database

[oracle@myrac05 smudgal]$ srvctl config srvpool
Server pool name: Free
Importance: 0, Min: 0, Max: -1
Candidate server names:
Server pool name: Generic
Importance: 0, Min: 0, Max: -1
Candidate server names:
Server pool name: BLOM01
Importance: 100, Min: 1, Max: 2
Candidate server names: myrac01,myrac02
Server pool name: BLOM02
Importance: 100, Min: 4, Max: 4
Candidate server names: myrac03,myrac04,myrac07,myrac08
Server pool name: BLOM03
Importance: 100, Min: 2, Max: 2
Candidate server names: myrac05,myrac06

i want to move the database to BLOM03 server pool.

so this should be your xml file

Note – i have removed this line as i am using an existing server pool BLOM03

<n:NewServerPool name="newpool" cardinality="2"/>
[oracle@myrac05 smudgal]$ cat ConvertToRAC_PolicyManaged.xml
<?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>/u01/oracle/product/11.2.0.3/db_1</n:SourceDBHome>
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
              <n:TargetDBHome>/u01/oracle/product/11.2.0.3/db_1</n:TargetDBHome>
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
              <n:SourceDBInfo SID="DUP5">
                <n:Credentials>
                  <n:User>sys</n:User>
                  <n:Password>oracle</n:Password>
                  <n:Role>sysdba</n:Role>
                </n:Credentials>
              </n:SourceDBInfo>
<!--Specify the list of existing or new server pools which will be used by the Policy Managed Cluster Database. -->
              <n:ServerPoolList>
                <n:ExistingServerPool name="BLOM03"/>
              </n:ServerPoolList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
              <!--n:RacOneNode  servicename="DUP5"/-->
<!--InstancePrefix is not required for Policy Managed database. If specified, it will be ignored. Instance names are generated automatically based on db_unique_name for Policy Managed dababase.-->
<!-- 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></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></n:TargetFlashRecoveryArea>
              </n:SharedStorage>
        </n:Convert>
    </n:ConvertToRAC>
</n:RConfig>

now run the config with first ONLY option and if all good then with YES option

ONLY option

[oracle@myrac05 smudgal]$ rconfig 
ConvertToRAC_PolicyManaged.xml
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
    <Convert>
      <Response>
        <Result code="0" >
          Operation Succeeded
        </Result>
      </Response>
      <ReturnValue type="object">
There is no return value for this step     </ReturnValue>
    </Convert>
  </ConvertToRAC></RConfig>

with YES

[oracle@myrac05 smudgal]$ rconfig ConvertToRAC_PolicyManaged.xml
Converting Database "DUP5" to Cluster Database. Target Oracle Home: /u01/oracle/product/11.2.0.3/db_1. Database Role: PRIMARY.
Setting Data Files and Control Files
Adding Database Instances
Adding Redo Logs
Enabling threads for all Database Instances
Setting TEMP tablespace
Adding UNDO tablespaces
Adding Trace files
Setting Fast Recovery Area
Updating Oratab
Creating Password file(s)
Configuring Listeners
Configuring related CRS resources
Starting Cluster Database

<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
    <Convert>
      <Response>
        <Result code="0" >
          Operation Succeeded
        </Result>
      </Response>
      <ReturnValue type="object">
<Oracle_Home>
         /u01/oracle/product/11.2.0.3/db_1
       </Oracle_Home>
       <Database type="POLICY_MANAGED"  >
         <ServerPoolList>
            <ServerPool>
                ODSP03
            </ServerPool>
         </ServerPoolList>
         <InstanceList>
           <Instance SID="DUP5_1" Node="myrac05"  >
           </Instance>
           <Instance SID="DUP5_2" Node="myrac06"  >
           </Instance>
         </InstanceList>
       </Database>     </ReturnValue>
    </Convert>
  </ConvertToRAC></RConfig>

check status

[oracle@myrac05 smudgal]$ srvctl config database -d DUP5
Database unique name: DUP5
Database name: DUP5
Oracle home: /u01/oracle/product/11.2.0.3/db_1
Oracle user: oracle
Spfile: +DATA/DUP5/spfileDUP5.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: BLOM03
Database instances:
Disk Groups: REDO,DATA
Mount point paths:
Services:
Type: RAC
Database is policy managed
[oracle@myrac05 smudgal]$



[oracle@myrac05 smudgal]$ srvctl status database -d DUP5
Instance DUP5_1 is running on node myrac05
Instance DUP5_2 is running on node myrac06