Written By: Ahmer Mansoor Email : ahmer_mansoor@hotmail.com Profile : http://www.linkedin.

com/in/ahmermansoor

DUPLICATE A DATABASE USING RMAN
Considerations: Operating System : Windows 7 Target Database : ORCL 1) Create Necessary Directories C:\MKDIR %ORACLE_BASE%\ORADATA\CLONE C:\MKDIR %ORACLE_BASE%\FLASH_RECOVERY_AREA\CLONE C:\MKDIR %ORACLE_BASE%\ADMIN\CLONE <Make sure the ORACLE_BASE environment variable is properly set.> 2) Create SPFILE for CLONE. C:\>SET ORACLE_SID=ORCL C:\>SQLPLUS / AS SYSDBA SQL>STARTUP SQL>CREATE PFILE FROM SPFILE; <Creates ORACLE_HOME\DATABASE\INITORCL.ORA> SQL> EXIT C:\>COPY %ORACLE_HOME%\DATABASE\INITORCL.ORA %ORACLE_HOME%\DATABASE\INITCLONE.ORA <Make sure the ORACLE_HOME environment variable is properly set.> C:\>NOTEPAD %ORACLE_HOME%\DATABASE\INITCLONE.ORA Find & replace all occurances of orcl with clone. Add Following Two Parameters o *.db_file_name_convert='orcl','clone' o *.log_file_name_convert='orcl','clone' Save and Close File. 3) Create Password File for CLONE C:\>COPY %ORACLE_HOME%\DATABASE\PWDORCL.ORA %ORACLE_HOME%\DATABASE\PWDCLONE.ORA 1|Page Oracle Database : 11g Auxiliary Database : CLONE

com/in/ahmermansoor 4) Create Oracle Service for CLONE C:\>ORADIM –NEW –SID CLONE 5) Start Clone Database Instance C:\>SET ORACLE_SID=CLONE C:\>SQLPLUS / AS SYSDBA SQL>STARTUP NOMOUNT PFILE=%ORACLE_HOME%\DATABASE\INITCLONE. 6) Listener Configuration C:\>NOTEPAD %ORACLE_HOME%\NETWORK\ADMIN\TNSNAMES.ORA Add following lines: CLONE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = clONE) ) ) Use Oracle Net Manager to statically register the Instances with LISTENER.Written By: Ahmer Mansoor Email : ahmer_mansoor@hotmail.linkedin.com Profile : http://www. SQL>SHUTDOWN IMMEDIATE. 2|Page . SQL>STARTUP NOMOUNT.ORA SQL>CREATE SPFILE FROM PFILE.

Written By: Ahmer Mansoor Email : ahmer_mansoor@hotmail. RMAN> EXIT 3|Page .com Profile : http://www.com/in/ahmermansoor Save Network Configuration & Exit.linkedin. C:\LSNRCTL STOP C:\LSNRCTL START C:\TNSPING CLONE <TO CHECK THE STATUS OF CLONE SERVICE> 7) Use RMAN for Database Duplication C:\>RMAN TARGET sys/oracle@ORCL AUXILIARY sys/oracle@CLONE RMAN> DUPLICATE TARGET DATABASE TO ‘CLONE’ FROM ACTIVE DATABASE.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.