Clone/Duplicate Database from Non-ASM to ASM
Source Setup Details:
Host Name: SUN1
IP: 192.168.126.2
Oracle Home: /export/home/oracle/oracle/product/db_1
DB Name: INDIAN
PORT: 1521
DB Location: /export/home/oracle/DB/database/INDIAN
Target Setup Details:
Host Name: SUN2
IP: 192.168.126.3
Oracle Home: /export/home/oracle/oracle/product/db_1
DB Name: CLONE
PORT: 1521
ASM DISK GROUP: CLN_DATA01
Step 1 Perform the backup of the ASM primary database (Datafiles, Control file for standby & Archive logs)
$ rman target /
RMAN>backup database format ‘/export/home/oracle/rman/database_%U.bkp’;
Step 2 Make the backup pieces available on the Standby server
• FTP or SCP the backup pieces to standby server. While doing FTP make sure to do it in binary mode only. OR
• NFS mount then mount the NFS on standby server with the same name as you mounted on primary database. OR
• If the backups are on tape then make sure that you make proper changes on standby server so that you can restore the backups on standby server.
Note: RMAN backup set mount point must be same.
Step 3 Create the password file for standby database with the same password as primary
$ export ORACLE_SID=CLONE Step 4 Configure Oracle net services on both the servers In standby server In Primary server Step 5 Copy primary database initINDIAN.ora to auxiliary instance and rename to initCLONE.ora Step 6 Modify initCLONE.ora file • Control_files=’+CLN_DATA01/CONTROL.ct Example: DB_FILE_NAME_CONVERT= (‘/export/home/oracle/DB/datafile/INDIAN/’, ‘+CLN_DATA01’) • For a duplicate database that is not a standby database, change the value of the DB_NAME initialization parameter. Step 7 Startup Clone Instance with Nomount option Export ORACLE_SID=CLONE Step 5 invoke RMAN $ rman target sys/anup123@indian auxiliary / Step 6 Execute bellow mention command on RMAN prompt.
$orapwd file=orapwCLONE password=
– configure listener.
– configure tnsnames for standby.
– check connectivity using tnsping.
• Set db_file_name_convert and log_file_name_convert to convert the diskgroup.
LOG_FILE_NAME_CONVERT= (‘/export/home/oracle/DB/datafile/INDIAN/’, ‘+CLN_DATA01’)
Sqlplus /nolog
Conn / as sysdba
Startup nomount
RMAN> duplicate target database to “CLONE”;
Responses