Professional Documents
Culture Documents
++++++++++++++++++++++++
You Dont need to take a backup of Source database rman will do everything
RMAN> run
2> {
3> allocate auxiliary channel c1 device type disk;
4> allocate channel c2 device type disk;
5> duplicate target database to 'CLONE' from ACTIVE DATABASE;
6> }
(SID_NAME =PROD)
(ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
(GLOBAL_DBNAME =PROD)
)
)
Tnsname.ORA
++++++++++++
PROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.171.130)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PROD)
)
)
CLONE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.171.129)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CLONE)
)
)
Tnsname.ORA
++++++++++++
CLONE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.171.129)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = CLONE)(UR=A)
)
)
PROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.171.130)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PROD)
)
)
Now remember on Target Database (SERVICE_NAME = CLONE)(UR=A) u have to add this
Parameter: (UR=A)
now
422670336 bytes
Fixed Size
1336960
Variable Size
281020800
Database Buffers
134217728
Redo Buffers
6094848
allocated channel: c1
channel c1: SID=18 device type=DISK
bytes
bytes
bytes
bytes
1_26_%u_.arc" ;
catalog clone recovery area;
switch clone datafile all;
}
executing Memory Script
Starting backup at 26-JUL-13
channel c2: starting archived log copy
input archived log thread=1 sequence=26 RECID=23 STAMP=821754512
output file name=/home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/20
13_07_26/o1_mf_1_26_0goflukh_.arc RECID=0 STAMP=0
channel c2: archived log copy complete, elapsed time: 00:00:01
Finished backup at 26-JUL-13
searching for all files in the recovery area
List of Files Unknown to the Database
=====================================
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
26/o1_mf_1_26_0goflukh_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
20/o1_mf_1_2_8yolmnz5_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
20/o1_mf_1_3_8yolmqy4_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
20/o1_mf_1_1_8yolmn02_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
25/o1_mf_1_4_8z3yol4k_.arc
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
26/o1_mf_1_26_0goflukh_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
20/o1_mf_1_2_8yolmnz5_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
20/o1_mf_1_3_8yolmqy4_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
20/o1_mf_1_1_8yolmn02_.arc
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/archivelog/2013_07_
25/o1_mf_1_4_8z3yol4k_.arc
List of files in Recovery Area not managed by the database
==========================================================
File Name: /home/oracle/app/oracle/flash_recovery_area/CLONE/control02.ctl
RMAN-07526: Reason: File is not an Oracle Managed File
number of files not managed by recovery area is 1, totaling 9.28MB
datafile 1 switched to datafile copy
input datafile copy RECID=1 STAMP=821754516 file name=/home/oracle/app/oracle/or
adata/CLONE/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=821754516 file name=/home/oracle/app/oracle/or
adata/CLONE/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=821754516 file name=/home/oracle/app/oracle/or
adata/CLONE/undotbs01.dbf
422670336 bytes
Fixed Size
1336960
Variable Size
281020800
Database Buffers
134217728
Redo Buffers
6094848
allocated channel: c1
channel c1: SID=18 device type=DISK
bytes
bytes
bytes
bytes
sql statement: alter system set db_name = ''CLONE'' comment= ''Reset to origin
al value by RMAN'' scope=spfile
sql statement: alter system reset db_unique_name scope=spfile
422670336 bytes
Fixed Size
1336960 bytes
Variable Size
281020800 bytes
Database Buffers
134217728 bytes
Redo Buffers
6094848 bytes
allocated channel: c1
channel c1: SID=18 device type=DISK
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS
G
MAXLOGFILES
16
MAXLOGMEMBERS
3
MAXDATAFILES
100
MAXINSTANCES
8
MAXLOGHISTORY
292
LOGFILE
GROUP 1 ( '/home/oracle/app/oracle/oradata/CLONE/redo01.log' ) SIZE
SE,
GROUP 2 ( '/home/oracle/app/oracle/oradata/CLONE/redo02.log' ) SIZE
SE,
GROUP 3 ( '/home/oracle/app/oracle/oradata/CLONE/redo03.log' ) SIZE
SE
DATAFILE
'/home/oracle/app/oracle/oradata/CLONE/system01.dbf'
CHARACTER SET WE8MSWIN1252
ARCHIVELO
50 M REU
50 M REU
50 M REU
opened
Duplicate Db at 26-JUL-13
channel: c2
channel: c1