Tuesday, March 2, 2010

Duplicate database from active

To duplicate an 11g database from active.

1. create the duplicate pfile, including db_file_name_convert, log_file_name_convert
2. startup nomount on the duplicate
3. add tnsnames.ora entries for target and duplicate on both servers
4. copy password file from target to duplicate
5. use rman to run the duplicate

rman target sys/password@target auxiliary sys/password@auxiliary log dup.log
DUPLICATE TARGET DATABASE
TO duplicate
FROM ACTIVE DATABASE
SKIP TABLESPACE 'MYTABLESPACE'
NOFILENAMECHECK;