Method 1(RCONFIG):-
-----------------------------
1. Copy database / archive /controlfile backup from standalone to rac server 1)
----RAC SERVER 1:-
2. Create parameter file
vi initTEST.ora
*.audit_file_dest='/u01/app/oracle/admin/TEST/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='TEST'
*.diagnostic_dest='/u01/app/oracle'
*.remote_login_passwordfile='exclusive'
*.undo_tablespace='UNDOTBS01'
*.db_file_name_convert='/u01/prod','+DATA'
*.log_file_name_convert='/u01/prod','+DATA'
*.cluster_database=false
*.control_files='+DATA/TEST/CONTROLFILE/current.260.936693527'
SQL> create spfile='+DATA/spfileTEST.ora' from pfile;
[oracle@rac1pub dbs]$ cat initTEST.ora
spfile='+DATA/spfileTEST.ora'
[oracle@rac1pub dbs]$ export ORACLE_SID=TEST
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 238034944 bytes
Fixed Size 2252016 bytes
Variable Size 180355856 bytes
Database Buffers 50331648 bytes
Redo Buffers 5095424 bytes
[oracle@rac1pub rman]$ rman auxiliary /
RMAN> duplicate target database to TEST backup location '/u01/rman/' nofilenamecheck;
RCONFIG:-CONVERT TEST TO RAC DATABASE
[oracle@rac1pub sampleXMLs]$ pwd
/u01/app/oracle/product/11203/dbhome_1/assistants/rconfig/sampleXMLs
[oracle@rac1pub sampleXMLs]$ cp -rf ConvertToRAC_AdminManaged.xml /u01/app/oracle/
[oracle@rac1pub oracle]$ mv ConvertToRAC_AdminManaged.xml rconfig.xml
[oracle@rac1pub oracle]$ cat rconfig.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="ONLY"> ###CHANGE from YES TO ONLY####
<!--Specify current OracleHome of non-rac database for SourceDBHome -->
<n:SourceDBHome>/u01/app/oracle/product/11203/dbhome_1</n:SourceDBHome> ##CHANGE O_H
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
<n:TargetDBHome>/u01/app/oracle/product/11203/dbhome_1</n:TargetDBHome> ##CHANGE O_H
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
<n:SourceDBInfo SID="TEST"> ###SID NAME
<n:Credentials>
<n:User>sys</n:User>
<n:Password>manager</n:Password> ###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="rac1pub"/> ###NODE NAME
<n:Node name="rac2pub"/> ### NODE NAME
</n:NodeList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
<!--n:RacOneNode servicename="TEST"/--> ###SERVICE NAME####
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
<n:InstancePrefix>TEST</n:InstancePrefix> ####INSTANCE NAME###
<!-- 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>+DATA</n:TargetDatabaseArea> ###DISKGROUP NAME###
<!--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>+FRA</n:TargetFlashRecoveryArea> ##FRA DISKGROUP NAME###
</n:SharedStorage>
</n:Convert>
</n:ConvertToRAC>
</n:RConfig>
[oracle@rac1pub oracle]$ rconfig rconfig.xml
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
<Convert>
<Response>
<Result code="0" >
Operation Succeeded #####IMP####
</Result>
</Response>
<ReturnValue type="object">
There is no return value for this step </ReturnValue>
</Convert>
</ConvertToRAC></RConfig>
$vi rconfig.xml
!-- 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"> ###CHANGE from ONLY TO YES####
[oracle@rac1pub oracle]$ rconfig rconfig.xml
Converting Database "TEST" to Cluster Database. Target Oracle Home: /u01/app/oracle/product/11203/dbhome_1. Database Role: PRIMARY.
Setting Data Files and Control Files
-----------------------------
1. Copy database / archive /controlfile backup from standalone to rac server 1)
----RAC SERVER 1:-
2. Create parameter file
vi initTEST.ora
*.audit_file_dest='/u01/app/oracle/admin/TEST/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='TEST'
*.diagnostic_dest='/u01/app/oracle'
*.remote_login_passwordfile='exclusive'
*.undo_tablespace='UNDOTBS01'
*.db_file_name_convert='/u01/prod','+DATA'
*.log_file_name_convert='/u01/prod','+DATA'
*.cluster_database=false
*.control_files='+DATA/TEST/CONTROLFILE/current.260.936693527'
SQL> create spfile='+DATA/spfileTEST.ora' from pfile;
[oracle@rac1pub dbs]$ cat initTEST.ora
spfile='+DATA/spfileTEST.ora'
[oracle@rac1pub dbs]$ export ORACLE_SID=TEST
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 238034944 bytes
Fixed Size 2252016 bytes
Variable Size 180355856 bytes
Database Buffers 50331648 bytes
Redo Buffers 5095424 bytes
[oracle@rac1pub rman]$ rman auxiliary /
RMAN> duplicate target database to TEST backup location '/u01/rman/' nofilenamecheck;
RCONFIG:-CONVERT TEST TO RAC DATABASE
[oracle@rac1pub sampleXMLs]$ pwd
/u01/app/oracle/product/11203/dbhome_1/assistants/rconfig/sampleXMLs
[oracle@rac1pub sampleXMLs]$ cp -rf ConvertToRAC_AdminManaged.xml /u01/app/oracle/
[oracle@rac1pub oracle]$ mv ConvertToRAC_AdminManaged.xml rconfig.xml
[oracle@rac1pub oracle]$ cat rconfig.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="ONLY"> ###CHANGE from YES TO ONLY####
<!--Specify current OracleHome of non-rac database for SourceDBHome -->
<n:SourceDBHome>/u01/app/oracle/product/11203/dbhome_1</n:SourceDBHome> ##CHANGE O_H
<!--Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome -->
<n:TargetDBHome>/u01/app/oracle/product/11203/dbhome_1</n:TargetDBHome> ##CHANGE O_H
<!--Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion -->
<n:SourceDBInfo SID="TEST"> ###SID NAME
<n:Credentials>
<n:User>sys</n:User>
<n:Password>manager</n:Password> ###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="rac1pub"/> ###NODE NAME
<n:Node name="rac2pub"/> ### NODE NAME
</n:NodeList>
<!--Specify RacOneNode along with servicename to convert database to RACOne Node -->
<!--n:RacOneNode servicename="TEST"/--> ###SERVICE NAME####
<!--Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.-->
<n:InstancePrefix>TEST</n:InstancePrefix> ####INSTANCE NAME###
<!-- 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>+DATA</n:TargetDatabaseArea> ###DISKGROUP NAME###
<!--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>+FRA</n:TargetFlashRecoveryArea> ##FRA DISKGROUP NAME###
</n:SharedStorage>
</n:Convert>
</n:ConvertToRAC>
</n:RConfig>
[oracle@rac1pub oracle]$ rconfig rconfig.xml
<?xml version="1.0" ?>
<RConfig version="1.1" >
<ConvertToRAC>
<Convert>
<Response>
<Result code="0" >
Operation Succeeded #####IMP####
</Result>
</Response>
<ReturnValue type="object">
There is no return value for this step </ReturnValue>
</Convert>
</ConvertToRAC></RConfig>
$vi rconfig.xml
!-- 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"> ###CHANGE from ONLY TO YES####
[oracle@rac1pub oracle]$ rconfig rconfig.xml
Converting Database "TEST" to Cluster Database. Target Oracle Home: /u01/app/oracle/product/11203/dbhome_1. Database Role: PRIMARY.
Setting Data Files and Control Files
No comments:
Post a Comment