Example scripts for duplicate

edit tnsnames.ora on the remote host where binaries were cloned and network assistant configured listener is configured. 


Connecting to the databases

CONNECT TARGET SYS/sysdba@srcdb;    # source database 
CONNECT AUXILIARY SYS/sysdba@dupdb; # duplicate database instance
CONNECT CATALOG rman/rman@catdb;    # recovery catalog database

DUPLICATE DATABASE prod DBID 123456789 TO dupdb 
UNTIL TIME "TO_DATE('12/14/2020', 'MM/DD/YYYY')" 
## TO RESTORE POINT TESTDB12142020   --- you can also set to a restore point to which databases backup is taken and restored to duplicate database.
PASSWORD FILE  ### asking here also to copy the password file.
BACKUP LOCATION '/prod_backups' ;  ## backup location also can be set 

Related Posts: