Your SlideShare is downloading. ×
Duplicate database Using RMAN
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Duplicate database Using RMAN

5,851
views

Published on

Step by Step Tutorial for Duplicating a Database using RMAN within a same computer.

Step by Step Tutorial for Duplicating a Database using RMAN within a same computer.

Published in: Technology, News & Politics

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,851
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
254
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Written By: Ahmer MansoorEmail : ahmer_mansoor@hotmail.comProfile : http://www.linkedin.com/in/ahmermansoor DUPLICATE A DATABASE USING RMANConsiderations: Operating System : Windows 7 Oracle Database : 11g Target Database : ORCL Auxiliary Database : CLONE1) Create Necessary Directories C:MKDIR %ORACLE_BASE%ORADATACLONE C:MKDIR %ORACLE_BASE%FLASH_RECOVERY_AREACLONE C:MKDIR %ORACLE_BASE%ADMINCLONE <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_HOMEDATABASEINITORCL.ORA> SQL> EXIT C:>COPY %ORACLE_HOME%DATABASEINITORCL.ORA %ORACLE_HOME%DATABASEINITCLONE.ORA <Make sure the ORACLE_HOME environment variable is properly set.> C:>NOTEPAD %ORACLE_HOME%DATABASEINITCLONE.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%DATABASEPWDORCL.ORA %ORACLE_HOME%DATABASEPWDCLONE.ORA 1|Page
  • 2. Written By: Ahmer MansoorEmail : ahmer_mansoor@hotmail.comProfile : http://www.linkedin.com/in/ahmermansoor4) Create Oracle Service for CLONE C:>ORADIM –NEW –SID CLONE5) Start Clone Database Instance C:>SET ORACLE_SID=CLONE C:>SQLPLUS / AS SYSDBA SQL>STARTUP NOMOUNT PFILE=%ORACLE_HOME%DATABASEINITCLONE.ORA SQL>CREATE SPFILE FROM PFILE; SQL>SHUTDOWN IMMEDIATE; SQL>STARTUP NOMOUNT;6) Listener Configuration C:>NOTEPAD %ORACLE_HOME%NETWORKADMINTNSNAMES.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. 2|Page
  • 3. Written By: Ahmer MansoorEmail : ahmer_mansoor@hotmail.comProfile : http://www.linkedin.com/in/ahmermansoor Save Network Configuration & Exit. 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; RMAN> EXIT 3|Page