This document explains the full steps for how to clone an RAC instance to non-RAC using oracle 10g RMAN duplicate database command, and backup is stored on the file system.
The below are the details steps which can be used to implement this solution:
Step 1) Run Preclone script on both Dbtier and AppsTier on the SOURCE system.
Step 2) Create backup on SOURCE Databases to FILESYSTEM (è /backup)
run {
allocate channel d1 type disk;
backup format '/backup/df_t%t_s%s_p%p' database;
sql 'alter system archive log current';
backup format '/backup/al_t%t_s%s_p%p' archivelog all;
release channel d1;
}
Step 3) compress database ORACLE HOME on the source node, then move it to the
source node using GZIP utility as the following:
tar cvf – DB_Home | gzip > DB_Home.tar.gz
Step 4) Copy the tar file of the Oracle HOME which has been taken in the previous step
to the target node and extract this file.
Step 5) Copy the backup pieces which has been taken in step2 to the TARGET node, and in the
same location where the backup pieces has been taken in step 2 (è /backup)
Step 6) Run adcfgclone.pl script on the TARGET db node using the following command:
perl adcfgclone.pl dbTechStack
This will create the init parameter file, context file and environment files on the target
node.
Step 7) now on the TARGET node and as oracle user, create the directories where the
datafiles,onlinelogs and tempfiles are stored on your ASM storage:
SOURCE NODE TARGET NODE
+DATA1/prod/datafile è $ mkdir $DATA_TOP/prod/datafile
+DATA1/prod/onlinelog è $ mkdir $DATA_TOP/prod/onlinelog
+DATA1/prod/tempfile è $ mkdir $DATA_TOP/prod/tempfile
Suppose that the DATA_TOP on the target node is /u01/app/CLONE/oradata
Step 8) Change initialization parameters on the init file on the target instance:
db_file_name_convert =('+DATA1, '/u01/app/CLONE/oradata')
log_file_name_convert =('+DATA1', '/u01/app/CLONE/oradata')
Step 9) now on the target node, startup the database in nomount mode
Step 10) check that you can access the source database, by copying tnsEntries
from the SOURCE Node to the Target node tnsnames.ora file.
Step 11) on the target node, connect to the RMAN using the following command, where
PROD is your source database, and CLONE is the target database:
$ rman target sys/sys@PROD auxiliary /
RMAN>
run
{
allocate auxiliary channel ch1 type disk;
duplicate target database to CLONE;
release channel ch1;
}
Step 12) After the RMAN command completed successfully, shutdown the database,
then change the following database initialization parameters, in init parameter file:
_no_recovery_through_resetlogs=TRUE
undo_management to =MANUAL
undo_tablespace=UNDOTBS1
Now open the database with RESETLOGS option;
Step 13) Create APPS_UNDOTS1 tablespace using the following statements:
CREATE UNDO TABLESPACE APPS_UNDOTS1 DATAFILE
'/u01/app/CLONE/oradata/prod/datafile/undo01.dbf' SIZE 4000M AUTOEXTEND
ON NEXT 100M MAXSIZE 7000M
ONLINE
RETENTION NOGUARANTEE
BLOCKSIZE 8K
FLASHBACK ON;
Step 14) now edit the init parameter file, and change the following initialization
parameters
undo_management to =AUTO
undo_tablespace= APPS_UNDOTS1
and remove the added initialization arameter_no_recovery_through_resetlogs=TRUE
Drop all unused undo tablespaces
Step 15) Disable database archive on the TARGET database, and start the database in
open mode
Step 16) On the target database, run the library update script against the database
$ cd [RDBMS ORACLE_HOME]/appsutil/install/[CONTEXT NAME]
$ sqlplus "/ as sysdba" @adupdlib.sql [libext]
Where [libext] should be set to 'sl' for HP-UX, 'so' for any other UNIX platform, or 'dll' for Windows.
Step 17) Configure the target database, the database must be running and open before performing this step.
$ cd [RDBMS ORACLE_HOME]/appsutil/clone/bin
$ perl adcfgclone.pl dbconfig [Database target context file]
Where Database target context file is: [RDBMS ORACLE_HOME]/appsutil/[Target CONTEXT_NAME].xml.
Step 18) Check the database links
References:
- Cloning Oracle Application 11i /R12 with Rapid Clone - Database (9i/10g/11g) Using Hot Backup on Open Database [ID 760772.1]