Most of the customer in Middle east uses the tape or (OSB) to backup the data and doing the clone is bit of challenge.In such scenarios , we can go for active duplicate.
1.Create one directory in $HOME or anywhere on the system and put below two scripts.
$ cat DUPLICATE.sh
. /u02/db/12.1.0/DEV_ctssd.env
echo " " >> $TNS_ADMIN/tnsnames.ora
echo "PROD =" >> $TNS_ADMIN/tnsnames.ora
echo "(DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=192.20.75.30)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=PROD) (INSTANCE_NAME=PROD)))" >> $TNS_ADMIN/tnsnames.ora
rman target sys/password@prod auxiliary sys/password@DEV cmdfile=/export/home/oradev/abwasiq/rman.txt log=/export/home/oradev/abwasiq/duplicate.log << EOF
EOF
$ cat rman.txt
run {
DUPLICATE TARGET DATABASE TO "DEV" from ACTIVE DATABASE
NOFILENAMECHECK;
}
$
2.Connect to target instance and start in nomount stage.
startup nomount
3.Run the DUPLICATE.sh script which will connect to production database and clone the instance.
at -f DUPLICATE.sh now
4. Monitor the duplicate by tailing the duplicate.log
Tail -f /export/home/oradev/abwasiq/duplicate.log
No comments:
Post a Comment