Professional Documents
Culture Documents
Duplicate Using RMAN
Duplicate Using RMAN
Recently I had a request from one of our clients to duplicate a single instance database into a two node RAC database. Both source and destination databases were 11g Rel 2 on Linux.
I could use old approach using rman backups or using 11g new feature DUPLICATE FROM ACTIVE database which doesnt need any backup from target database and I preferred to use second approach.
1. 2.
Negative performance impact that it causes on source database and this impact applies to whole duplication time. High network traffic on connection between source and target database.
If either of these negative impacts are not acceptable in your environment , you will need to switch to old backup-based approach.
Duplicate from active database is an easy task only IF you follow all steps accurately otherwise it can be a complicated task and can waste lots of your time for troubleshooting.
Following part is a simplified step-by-step instructions for DUPLICATE from ACTIVE database:
. oraenv HRPRD1
1
sqlplus / as sysdba
shutdown immediate
10
startup nomount
SID_LIST_LISTENER =
2
(SID_LIST =
(SID_DESC =
(SID_NAME = HRPRD1)
(ORACLE_HOME = /apps/oracle/product/11.2.0/db_1)
8
(GLOBAL_DBNAME = HRPRD)
9
Make sure that ORACLE_HOME in this entry points to correct home which is the home that HRPRD database runs from
3- Add following tns entries to BOTH auxiliary and target tnsnames.ora file :
1
HRDEV =
2
(DESCRIPTION =
3
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HRDEV)
)
10
11
HRPRD1 =
12
(DESCRIPTION =
13
(CONNECT_DATA =
15
16
(SERVER = DEDICATED)
17
(SERVICE_NAME = HRPRD)
For HRPRD as a new and empty database we may need to create a password file for it as follow:
. oraenv
HRPRD1
cd $ORACLE_HOME/dbs
5- Test connectivity to auxiliary and target instance from BOTH hosts using TNS
Make sure your connectivity to source database and also to your auxiliary instance works fine , otherwise duplicate from acti ve database wont work.
Try above commands on both target and auxiliary hosts prd-db-01 and dev-db-01
. oraenv
1
HRPRD1
RMAN>run{
. oraenv HRPRD1
sqlplus / as sysdba
shutdown immediate