Two big disadvantages of the ACTIVE database duplication method are:
Negative performance impact on the source database.
High network traffic on the connection between the source and target databases.
STEP1
On TARGET database server.
change following parameters in init parameter file specific to target database
alter system set db_name=targetdb scope=spfile;
alter system set cluster_database=false scope=spfile;
alter system set db_create_file_dest='+DATA';
alter system set db_create_online_log_dest_1='+REDO';
alter system set db_create_online_log_dest_2='+REDO';
startup nomount pfile='/tmp/init.ora'
STEP2
On TARGET database server,change listener.ora make sure ORACLE_HOME is there in the file.
SID_LIST_LISTENER =
(SID_LIST =
)
(SID_DESC =
(SID_NAME = targetdb1)
(ORACLE_HOME = /apps/oracle/product/11.2.0/db_1)
(GLOBAL_DBNAME = targetdb)
)
)
and do lsnrctl status, lsnrctl reload
STEP3
Add following entries to both tnsnames.ora files on both SOURCE and TARGET
SOURCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sourceserv)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = source)
)
)
target =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = targetserv)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = target)
)
)
STEP4
Create password file on both SOURCE and TARGET
If the password file already exists on source just copy it to TARGET $ORACLE_HOME/dbs
STEP5
Test connectivity to both SOURCE and TARGET from both servers using TNS entries created in STEP3 and
make sure it works
sqlplus sys/sys@target as sysdba
sqlplus sys/sys@source as sysdba
STEP6
On Auxillary host(TARGET) start RMAN and run DUPLICATE
Here very important auxillary connection is TARGET and connection target is SOURCE
$export ORACLE_SID=HRPRD1
$rman target sys/sys@SOURCE auxiliary sys/sys@TARGET
RMAN>run{
DUPLICATE target DATABASE TO TARGET------> (the first target is the connection target and the second is db name of target database.)
FROM ACTIVE DATABASE;
}
Negative performance impact on the source database.
High network traffic on the connection between the source and target databases.
STEP1
On TARGET database server.
change following parameters in init parameter file specific to target database
alter system set db_name=targetdb scope=spfile;
alter system set cluster_database=false scope=spfile;
alter system set db_create_file_dest='+DATA';
alter system set db_create_online_log_dest_1='+REDO';
alter system set db_create_online_log_dest_2='+REDO';
startup nomount pfile='/tmp/init.ora'
STEP2
On TARGET database server,change listener.ora make sure ORACLE_HOME is there in the file.
SID_LIST_LISTENER =
(SID_LIST =
)
(SID_DESC =
(SID_NAME = targetdb1)
(ORACLE_HOME = /apps/oracle/product/11.2.0/db_1)
(GLOBAL_DBNAME = targetdb)
)
)
and do lsnrctl status, lsnrctl reload
STEP3
Add following entries to both tnsnames.ora files on both SOURCE and TARGET
SOURCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sourceserv)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = source)
)
)
target =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = targetserv)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = target)
)
)
STEP4
Create password file on both SOURCE and TARGET
If the password file already exists on source just copy it to TARGET $ORACLE_HOME/dbs
STEP5
Test connectivity to both SOURCE and TARGET from both servers using TNS entries created in STEP3 and
make sure it works
sqlplus sys/sys@target as sysdba
sqlplus sys/sys@source as sysdba
STEP6
On Auxillary host(TARGET) start RMAN and run DUPLICATE
Here very important auxillary connection is TARGET and connection target is SOURCE
$export ORACLE_SID=HRPRD1
$rman target sys/sys@SOURCE auxiliary sys/sys@TARGET
RMAN>run{
DUPLICATE target DATABASE TO TARGET------> (the first target is the connection target and the second is db name of target database.)
FROM ACTIVE DATABASE;
}
No comments:
Post a Comment