Sunday 1 September 2019

RMAN Duplicate database without connection to source/target


Source DB
connect target /
run {
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
backup database format '/u02/oracle/backup/database_%d_%u_%s';
sql 'alter system archive log current';
backup archivelog all format '/u02/oracle/backup/arch_%d_%u_%s';
backup current controlfile format '/u02/oracle/backup/Control_%d_%u_%s';
release channel t1;
release channel t2;
release channel t3;
}

-- Copy the password file from Source DB server to destination DB Server
-- Change parameters in the destination pfile
*.dispatchers='(PROTOCOL=TCP) (SERVICE=TESTARCXDB)'
*.log_file_name_convert='/u02/oracle/oradata/TEST','/u02/oracle/oradata/TESTARC'
*.db_file_name_convert='/u02/oracle/oradata/TEST','/u02/oracle/oradata/TESTARC'
*.db_name='TESTARC'

Destination DB Server
connect auxiliary /
run {
allocate auxiliary channel t1 type disk;
allocate auxiliary channel t2 type disk;
allocate auxiliary channel t3 type disk;
duplicate target database to TESTARC backup location '/u02/oracle/backup';
}




No comments:

Post a Comment

Number of Visitors