How to duplicate database for standby
This is not the first scratchpad sample of duplicating a database for standby you’ve seen, and by no means comes close to the official Oracle documentation. Its intention is simply for those that don’t use this process often and need a quick reference.
1. You need to startup nomount the standby instance with the bare minimum requirements
DB_NAME=’dbstdby’
DB_UNIQUE_NAME=’dbstdby’
DB_CREATE_FILE_DEST=’C:\Oracle\dbdata\’
2. Connect to rman (in this case with nocatalog)
rman TARGET sys/pwd@db1 AUXILIARY sys/pwd@dbstdby
3. Run your duplicate script (make any other necessary changes for your environment)
RUN {
ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE DISK;
ALLOCATE CHANNEL c2 DEVICE TYPE DISK;
DUPLICATE TARGET DATABASE
FOR STANDBY
FROM ACTIVE DATABASE
DORECOVER
SPFILE
SET db_unique_name='dbstdby'
set db_file_name_convert='C:\Oracle\dbdata\db1\DATAFILE','C:\Oracle\dbdata\dbstdby\DATAFILE'
set log_file_name_convert='C:\Oracle\dbdata\db1\ONLINELOG','C:\Oracle\dbdata\dbstdby\ONLINELOG'
set control_files='C:\Oracle\dbdata\dbstdby\stby_control01.ctl'; }
Need help? Free development help, leave a comment or contact us to see how we can help your organization with Oracle database management and support.

