DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
DUPLICATE ORACLE DATABASE ( DIFFERENT DIRECTURE STRUCTURE ) The process of duplicating the entire database is called ‘ CLONING’. I am using same
SID for source
and clone database as ‘sham’ for duplication the oracle database from one server to another server.
Source database name
: sham
Auxiliary database name : rose Source database path
= /u01/app/oracle/oradata/sham /
Auxiliary database path = /u02/app/oracle/oradata/rose/ SOURCE SERVER
192.168.241.131
(OEL5.SERVER1.COM) (OEL5.SERVER1.COM)
SERVER1
PRODUCTION
AUXILIARY SERVER
192.168.241.132 192.168.241.132
(OEL5.SERVER2.COM) (OEL5.SERVER2.COM)
SERVER2
DEVELOPMENT
CHECK NETWORK AVAILABILITY BETWEEN TWO SERVERS SERVER 1 :
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
SERVER 2 :
CREATE DIRECTORY STRUCTURE FOR AUXILIARY DATABASE
$ mkdir -p /u02/app/oracle/oradata/ros /u02/app/oracle/oradata/rose/ e/ $ mkdir -p /u02/app/oracle/admin/rose/ /u02/app/oracle/admin/rose/adump/ adump/ $ mkdir -p /u02/app/oracle/admin/rose/ /u02/app/oracle/admin/rose/bdump/ bdump/ $ mkdir -p /u02/app/oracle/admin/rose/ /u02/app/oracle/admin/rose/cdump/ cdump/ $ mkdir -p /u02/app/oracle/admin/rose/ /u02/app/oracle/admin/rose/udump/ udump/
CONNECTING SOURCE DATABASE
SYS>select name, dbid from v$database; NAME
DBID
--------- ---------SHAM
926462179
SYS>show parameter db_domain; NAME
TYPE
VALUE
---------------------------------------------------------------------- ----------- ---------------------------------------------------------db_domain
string
server1-oel5.com server1-oel5.com
SYS>show parameter service_names service_names; ; NAME TYPE VALUE ---------------------------------------------------------------------- ----------- ------------------------------------------sham.server1-oel5.com service_names string
PARAMETER FILE BACKUP FOR AUXILIARY DATABASE
SYS>show parameter pfile; NAME ------spfile
TYPE VALUE --------- --------------------------------------------------------------------------------------------------------string /u01/app/oracle/product/10. /u01/app/oracle/product/10.2.0/db_1/dbs/s 2.0/db_1/dbs/spfilesham.ora pfilesham.ora
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
SENDING PFILE TO AUXILIARY SERVER
TNSNAMES.ORA ON TARGET SERVER
192.168.241.131
# tnsnames.ora tns names.ora Network Configuration File: /u01/app/oracle/ /u01/app/oracle/product/10.2.0/db_1 product/10.2.0/db_1/network/admin/tnsnames.ora /network/admin/tnsnames.ora # Generated by Oracle configuration tools . TO_ROSEDB = (DESCRIPTION DESCRIPTION = = (ADDRESS_LIST = (ADDRESS = (PROTOCOL (PROTOCOL=TCP)( =TCP)(HOST HOST=192.168.241.132)(PORT )(PORT=1521)) =1521)) )
FOR AUXILIARY SERVER
(CONNECT_DATA = (SERVER SERVER=DEDICATED) =DEDICATED) (SERVICE_NAME SERVICE_NAME= =rose) ) )
SHAMDB = (DESCRIPTION = (ADDRESS = (PROTOCOL (PROTOCOL = TCP)(HOST TCP)(HOST=192.168.241.131)(PORT )(PORT=1521)) =1521)) (CONNECT_DATA =
FOR TARGET SERVER
(SERVER = DEDICATED) (SERVICE_NAME = sham.server1-oel5.com) ) )
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
LISTENER.ORA ON AUXILIARY SERVER 192.168.241.132
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/netwo /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora rk/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME SID_NAME=rose) =rose) (ORACLE_HOME = /u01/app/oracle/product/1 /u01/app/oracle/product/10.2.0/db_1) 0.2.0/db_1) (GLOBAL_DBNAME GLOBAL_DBNAME=rose) =rose) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL (PROTOCOL=TCP)( =TCP)(HOST HOST=192.168.241.132)( =192.168.241.132)(PORT PORT=1521)) =1521)) ) )
CHECKING TNS CONNECTIVITY ON TARGET SEVER
[oracle@oel5 admin]$ tnsping shamdb TNS Ping Utility for Linux: Version 10.2.0.5.0 - Production on 13-NOV-2014 14:49:48 Copyright (c) 1997, 1997, 2010, Oracle.
All rights rights reserved. reserved.
Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
192.168.241.131 )(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (HOST = 192.168.241.131 (SERVICE_NAME = sham.server1-oel5.com)))OK (10 msec)
[oracle@oel5 admin] $ tnsping to_rosedb TNS Ping Utility for Linux: Version 10.2.0.5.0 - Production on 13-NOV-2014 14:49:40 Copyright (c) 1997, 1997, 2010, Oracle.
All rights rights reserved. reserved.
Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
192.168.241.132 )(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (HOST = 192.168.241.132 (SERVICE_NAME = rose.server2-oel5.com))) rose.server2-oel5.com))) OK (20 msec)
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
CONFIGURE PASSWORD FILE ON TARGET & AUXILIARY SERVER
ON TARGET SERVER
191.168.241.131
$ cd $ORACLE_HOME/dbs $ORACLE_HOME/dbs $ export ORACLE_SID=sham ORACLE_SID=sham [oracle@oel5 dbs]$ orapwd file=orapwsham password=dba entries=3 force=y ON AUXILIARY SERVER2
191.168.241.132
$ cd $ORACLE_HOME/dbs $ORACLE_HOME/dbs $ export ORACLE_SID=rose ORACLE_SID=rose [oracle@oel5 dbs]$ orapwd file=orapwrose password=dba entries=3 force=y **
Note : Database Password must be same on Target and Auxiliary server.
**
TARGET DATABASE PFILE
sham.__db_cache_size=260046848 sham.__java_pool_size=4194304 sham.__large_pool_size=4194304 sham.__shared_pool_size=100663296 sham.__streams_pool_size=0 *.audit_file_dest='/u01/app/oracle/admin/sham/adump' *.background_dump_dest='/u01/app/oracle/admin/sham/bdump' *.compatible='10.2.0.5.0' *.control_files='/u01/app/oracle/oradata/sham/control01.ctl', '/u01/app/oracle/oradata/sham/control02.ctl',' /u01/app/oracle/oradata/sham/control03.ctl' *.core_dump_dest='/u01/app/oracle/admin/sham/cdump' *.db_block_size=8192 *.db_domain='server1-oel5.com' *.db_file_multiblock_read_count=16 *.db_name='sham' *.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area' *.db_recovery_file_dest_size=4194304000 *.dispatchers='(PROTOCOL=TCP) (SERVICE=shamXDB)' *.job_queue_processes=10 *.log_archive_format='%t_%s_%r.dbf' *.open_cursors=300 *.pga_aggregate_target=123731968 *.processes=150
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
*.remote_login_passwordfile='EXCLUSIVE' *.sga_target=372244480 *.undo_management='AUTO' *.undo_tablespace='UNDOTBS1' *.user_dump_dest='/u01/app/oracle/admin/sham/udump'
AUXILIARY DATABASE PFILE *.audit_file_dest='/u02/app/oracle/admin/rose/adump' *.background_dump_dest='/u02/app/oracle/admin/rose/bdump' *.compatible='10.2.0.5.0' *.control_files='/u02/app/oracle/oradata/rose/control01.ctl', /u02/app/oracle/oradata/rose/control02.ctl', '/u02/app/oracle/oradata/rose/control03.ctl' *.core_dump_dest='/u02/app/oracle/admin/rose/cdump' *.db_block_size=8192 *.db_domain='server2-oel5.com' *.db_file_multiblock_read_count=16 *.db_name='rose' *.db_recovery_file_dest='/u02/app/oracle/flash_recovery_area' *.db_recovery_file_dest_size=4194304000 *.dispatchers='(PROTOCOL=TCP) (SERVICE=roseXDB)' *.job_queue_processes=10 *.log_archive_format='%t_%s_%r.dbf' *.open_cursors=300 *.pga_aggregate_target=123731968 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.sga_target=372244480 *.undo_management='AUTO' *.undo_tablespace='UNDOTBS1' *.user_dump_dest='/u02/app/oracle/admin/rose/udump' # Below Parameters are used for from where to where the DATAFILES & LOGFILES will be cloned.
db_file_name_convert=('/u01/app/oracle/oradata/sham/', '/u02/app/oracle/oradata/rose/’) log_file_name_convert=('/u01/app/oracle/oradata/sham/', '/u02/app/oracle/oradata/rose/') If the source database directory structure & clone database directory structure differs, then only you need to use db_file_name_convert & log_file_name_convert parameters. In my case, i am using different mount point, so need to add above two parameters in pfile for auxiliary database.
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
STARTUP AUXILIARY DATABASE AT NOMOUNT NOMOUNT STAGE & EXIT
$ export ORACLE_SID=ros ORACLE_SID=rose e $ sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 13 22:05:27 2014 Copyright (c) 1982, 1982, 2010, Oracle.
All Rights Rights Reserved. Reserved.
Connected to an idle instance.
SYS>startup nomount; ORACLE instance started.
. .. [Trimmed] SYS>exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
POINTS TO NOTE : Once I started my auxiliary instance in NOMOUNT state, i have disconnected SYS as ‘NO SESSION’ before duplicating a database. It is must and should.
$ export ORACLE_SID=sha ORACLE_SID=sham m $ rman target / Recovery Manager: Release 10.2.0.5.0 10.2.0.5.0 - Production on Thu Nov 13 22:20:17 2014 Copyright (c) 1982, 1982, 2007, Oracle.
All rights rights reserved. reserved.
connected to target database: SHAM (DBID=926462179)
RMAN>backup database plus archivelog; Starting backup at 13-NOV-14 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set . .. ...
[Trimmed] input archive log thread=1 sequence=30 recid=30 stamp=863563379 input archive log thread=1 sequence=31 recid=31 stamp=863563423 input archive log thread=1 sequence=32 recid=32 stamp=863563463 channel ORA_DISK_1: starting piece 1 at 13-NOV-14 channel ORA_DISK_1: finished piece 1 at 13-NOV-14 piece handle=/u01/app/oracle/flash handle=/u01/app/oracle/flash_recovery_area _recovery_area/SHAM/backups /SHAM/backupset/2014_11_13/ et/2014_11_13/o1_mf_annnn_TA o1_mf_annnn_TAG20141113T224 G20141113T224 423_b69sqk08_.bkp 423_b69sqk08_.bkp tag=TAG20141113T224423 tag=TAG20141113T224423 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05 Finished backup at 13-NOV-14
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
Starting backup at 13-NOV-14 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/oradata/sham/system name=/u01/app/oracle/oradata/sham/system01.dbf 01.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/sham/sysaux name=/u01/app/oracle/oradata/sham/sysaux01.dbf 01.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/sham/undotb name=/u01/app/oracle/oradata/sham/undotbs01.dbf s01.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/sham/sample name=/u01/app/oracle/oradata/sham/sample01.dbf 01.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/sham/users0 name=/u01/app/oracle/oradata/sham/users01.dbf 1.dbf channel ORA_DISK_1: starting piece 1 at 13-NOV-14 channel ORA_DISK_1: finished piece 1 at 13-NOV-14 piece handle=/u01/app/oracle/flash handle=/u01/app/oracle/flash_recovery_area _recovery_area/SHAM/backups /SHAM/backupset/2014_11_13/ et/2014_11_13/o1_mf_nnndf_TA o1_mf_nnndf_TAG20141113T224 G20141113T224 428_b69sqnnl_.bkp 428_b69sqnnl_.bkp tag=TAG20141113T224428 tag=TAG20141113T224428 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset including current control file in backupset including current SPFILE in backupset channel ORA_DISK_1: starting piece 1 at 13-NOV-14 channel ORA_DISK_1: finished piece 1 at 13-NOV-14 piece handle=/u01/app/oracle/flash handle=/u01/app/oracle/flash_recovery_area _recovery_area/SHAM/backups /SHAM/backupset/2014_11_13/ et/2014_11_13/o1_mf_ncsnf_TA o1_mf_ncsnf_TAG20141113T224 G20141113T224 428_b69srspm_.bkp 428_b69srspm_.bkp tag=TAG20141113T224428 tag=TAG20141113T224428 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03 Finished backup at 13-NOV-14
Starting backup at 13-NOV-14 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=33 recid=33 stamp=863563507 channel ORA_DISK_1: starting piece 1 at 13-NOV-14 channel ORA_DISK_1: finished piece 1 at 13-NOV-14 piece handle=/u01/app/oracle/flash handle=/u01/app/oracle/flash_recovery_area _recovery_area/SHAM/backups /SHAM/backupset/2014_11_13/o et/2014_11_13/o1_mf_annnn_TAG 1_mf_annnn_TAG20141113T224 20141113T224 507_b69srwk9_.bkp 507_b69srwk9_.bkp tag=TAG20141113T224507 tag=TAG20141113T224507 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02 Finished backup at 13-NOV-14
BACKUP DETAILS USING LIST BACKUP COMMAND
list bkp.txt
Now i copied all my backup(which was taken by rman) from target server to auxiliary server.
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
SENDING ALL BAC KUPSETS TO AUXILIARY SERVER
ON AUXILIARY SERVER (RECEIVED ALL BACKUPS)
START THE CLONING PROCESS IN TARGET SERVER Start RMAN, make ‘SHAM’ as target and ‘ROSE’ as auxiliary.
$ export ORACLE_SID=sha ORACLE_SID=sham m $ rman target / auxiliary sys/dba@to_rosedb Recovery Manager: Release 10.2.0.5.0 10.2.0.5.0 - Production on Thu Nov 13 23:40:32 2014 Copyright (c) 1982, 1982, 2007, Oracle.
All rights rights reserved. reserved.
connected to target database: SHAM (DBID=926462179) connected to auxiliary database: ROSE (not mounted)
ISSUE DUPLICATE TARGET DATABASE COMAMND
RMAN> du plicate target plicate target database to 'rose’; Starting Duplicate Db at 14-NOV-14 using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=156 devtype=DISK contents of Memory Script: { set until scn
565451;
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
set newname for datafile
1 to
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/system01.db se/system01.dbf"; f"; set newname for datafile
2 to
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/undotbs01.d se/undotbs01.dbf"; bf"; set newname for datafile
3 to
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/sysaux01.db se/sysaux01.dbf"; f"; set newname for datafile
4 to
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/users01.dbf se/users01.dbf"; "; set newname for datafile
5 to
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/sample01.db se/sample01.dbf"; f"; restore check readonly clone database ; } executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME executing command: SET NEWNAME
executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME
Starting restore at 14-NOV-14 using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore channel ORA_AUX_DISK_1: specifying specifying datafile(s) to restore from backup set restoring datafile 00001 to /u02/app/oracle/oradata/ros /u02/app/oracle/oradata/rose/system01.dbf e/system01.dbf restoring datafile 00002 to /u02/app/oracle/oradata/ros /u02/app/oracle/oradata/rose/undotbs01.db e/undotbs01.dbf f restoring datafile 00003 to /u02/app/oracle/oradata/rose /u02/app/oracle/oradata/rose/sysaux01.dbf /sysaux01.dbf restoring datafile 00004 to /u02/app/oracle/oradata/ros /u02/app/oracle/oradata/rose/users01.dbf e/users01.dbf restoring datafile 00005 to /u02/app/oracle/oradata/ros /u02/app/oracle/oradata/rose/sample01.dbf e/sample01.dbf channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recove /u01/app/oracle/flash_recovery_area/SHAM/b ry_area/SHAM/backupset/2014_ ackupset/2014_11_14/o1_mf_nn 11_14/o1_mf_nnndf_TAG2014111 ndf_TAG20141114T030028_b6b 4T030028_b6b 8qnrf_.bkp channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/flash handle=/u01/app/oracle/flash_recovery_area _recovery_area/SHAM/backups /SHAM/backupset/2014_11_14/ et/2014_11_14/o1_mf_nnndf_TA o1_mf_nnndf_TAG20141114T030 G20141114T030 028_b6b8qnrf_.bkp 028_b6b8qnrf_.bkp tag=TAG20141114T030028 tag=TAG20141114T030028 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45 Finished restore at 14-NOV-14
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ROSE" RESETLOGS ARCHIVELOG MAXLOGFILES
16
MAXLOGMEMBERS MAXDATAFILES MAXINSTANCES MAXLOGHISTORY
3 100 8 292
LOGFILE GROUP
1 ( '/u02/app/oracle/oradata/ro '/u02/app/oracle/oradata/rose/redo01.log se/redo01.log' ' ) SIZE 50 M
REUSE,
GROUP
2 ( '/u02/app/oracle/oradata/ro '/u02/app/oracle/oradata/rose/redo02.log se/redo02.log' ' ) SIZE 50 M
REUSE,
GROUP
3 ( '/u02/app/oracle/oradata/ro '/u02/app/oracle/oradata/rose/redo03.log se/redo03.log' ' ) SIZE 50 M
REUSE
DATAFILE '/u02/app/oracle/oradata/ros '/u02/app/oracle/oradata/rose/system01.dbf e/system01.dbf' ' CHARACTER SET WE8ISO8859P1 contents of Memory Script: { switch clone datafile all; } executing Memory Script
datafile 2 switched to datafile copy input datafile copy recid=1 stamp=863583686 filename=/u02/app/oracle/oradata/rose/un filename=/u02/app/oracle/oradata/rose/undotbs01.dbf dotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=863583686 filename=/u02/app/oracle/oradata/rose/s filename=/u02/app/oracle/oradata/rose/sysaux01.dbf ysaux01.dbf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=863583686 filename=/u02/app/oracle/oradata/rose/us filename=/u02/app/oracle/oradata/rose/users01.dbf ers01.dbf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=863583686 filename=/u02/app/oracle/oradata/rose/s filename=/u02/app/oracle/oradata/rose/sample01.dbf ample01.dbf contents of Memory Script: { set until scn
565451;
recover clone database delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at 14-NOV-14 using channel ORA_AUX_DISK_1 starting media recovery channel ORA_AUX_DISK_1: starting archive log restore to default destination channel ORA_AUX_DISK_1: restoring archive log archive log thread=1 sequence=38
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recove /u01/app/oracle/flash_recovery_area/SHAM/b ry_area/SHAM/backupset/2014 ackupset/2014_11_14/o1_mf_an _11_14/o1_mf_annnn_TAG2014111 nnn_TAG20141114T030121_b6b 4T030121_b6b 8sb7w_.bkp channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u01/app/oracle/flash handle=/u01/app/oracle/flash_recovery_area _recovery_area/SHAM/backups /SHAM/backupset/2014_11_14/ et/2014_11_14/o1_mf_annnn_TA o1_mf_annnn_TAG20141114T030 G20141114T030 121_b6b8sb7w_.bkp 121_b6b8sb7w_.bkp tag=TAG20141114T030121 tag=TAG20141114T030121 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02 archive log filename=/u02/app/oracle/fla filename=/u02/app/oracle/flash_recovery_ar sh_recovery_area/ROSE/archi ea/ROSE/archivelog/2014_11_ velog/2014_11_14/o1_mf_1_38_ 14/o1_mf_1_38_b6bfhk14_.arc b6bfhk14_.arc thread=1 sequence=38 channel clone_default: deleting archive log(s) archive log filename=/u02/app/oracle/fla filename=/u02/app/oracle/flash_recovery_ar sh_recovery_area/ROSE/archiv ea/ROSE/archivelog/2014_11_1 elog/2014_11_14/o1_mf_1_38_b 4/o1_mf_1_38_b6bfhk14_.arc 6bfhk14_.arc recid=1 stamp=863583689 stamp=863583689 media recovery complete, elapsed time: 00:00:01
Finished recover at 14-NOV-14
contents of Memory Script: { shutdown clone; startup clone nomount ; } executing Memory Script
database dismounted Oracle instance shut down connected to auxiliary database (not started) Oracle instance started Total System Global Area
Fixed Size
373293056 bytes
1273780 bytes
Variable Size
92274764 bytes
Database Buffers
276824064 bytes
Redo Buffers
2920448 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ROSE" RESETLOGS ARCHIVELOG MAXLOGFILES MAXLOGMEMBERS
16 3
MAXDATAFILES
100
MAXINSTANCES
8
MAXLOGHISTORY
292
LOGFILE GROUP
1 ( '/u02/app/oracle/oradata/ro '/u02/app/oracle/oradata/rose/redo01.log se/redo01.log' ' ) SIZE 50 M
REUSE,
GROUP
2 ( '/u02/app/oracle/oradata/ro '/u02/app/oracle/oradata/rose/redo02.log se/redo02.log' ' ) SIZE 50 M
REUSE,
GROUP
3 ( '/u02/app/oracle/oradata/ro '/u02/app/oracle/oradata/rose/redo03.log' se/redo03.log' ) SIZE 50 M
REUSE
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
DATAFILE '/u02/app/oracle/oradata/ros '/u02/app/oracle/oradata/rose/system01.dbf e/system01.dbf' ' CHARACTER SET WE8ISO8859P1 contents of Memory Script: { set newname for tempfile
1 to
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/temp01.dbf" se/temp01.dbf"; ; switch clone tempfile all; catalog clone clone datafilecopy datafilecopy
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/undotbs01.d se/undotbs01.dbf"; bf";
catalog clone clone datafilecopy datafilecopy
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/sysaux01.db se/sysaux01.dbf"; f";
catalog clone datafilecopy
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/users01.dbf se/users01.dbf"; ";
catalog clone clone datafilecopy datafilecopy
"/u02/app/oracle/oradata/ro "/u02/app/oracle/oradata/rose/sample01.db se/sample01.dbf"; f";
switch clone datafile all; } executing Memory Script executing command: SET NEWNAME renamed temporary file 1 to /u02/app/oracle/oradata/rose/temp01.d /u02/app/oracle/oradata/rose/temp01.dbf bf in control file
cataloged datafile copy datafile copy filename=/u02/app/oracle/ora filename=/u02/app/oracle/oradata/rose/und data/rose/undotbs01.dbf otbs01.dbf recid=1 stamp=863583701 stamp=863583701 cataloged datafile copy datafile copy filename=/u02/app/oracle/ora filename=/u02/app/oracle/oradata/rose/sys data/rose/sysaux01.dbf aux01.dbf recid=2 stamp=863583701 stamp=863583701 cataloged datafile copy datafile copy filename=/u02/app/oracle/ora filename=/u02/app/oracle/oradata/rose/user data/rose/users01.dbf s01.dbf recid=3 stamp=863583701 stamp=863583701
cataloged datafile copy datafile copy filename=/u02/app/oracle/ora filename=/u02/app/oracle/oradata/rose/sam data/rose/sample01.dbf ple01.dbf recid=4 stamp=863583702 stamp=863583702 datafile 2 switched to datafile copy input datafile copy recid=1 stamp=863583701 filename=/u02/app/oracle/oradata/rose/un filename=/u02/app/oracle/oradata/rose/undotbs01.dbf dotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=863583701 filename=/u02/app/oracle/oradata/rose/s filename=/u02/app/oracle/oradata/rose/sysaux01.dbf ysaux01.dbf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=863583701 filename=/u02/app/oracle/oradata/rose/us filename=/u02/app/oracle/oradata/rose/users01.dbf ers01.dbf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=863583702 filename=/u02/app/oracle/oradata/rose/s filename=/u02/app/oracle/oradata/rose/sample01.dbf ample01.dbf contents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 14-NOV-14
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu
DUPLICATING ORACLE DATABASE USING RMAN | ORACLE 10g
CONNECTING AUXILIARY DATABASE
$ export ORACLE_SID=ros ORACLE_SID=rose e $ sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.5.0 - Production on Fri Nov 14 17:50:27 2014 Copyright (c) 1982, 1982, 2010, Oracle.
All Rights Rights Reserved. Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS>select name, dbid, open_mode from v$database; NAME
DBID
OPEN_MODE
--------- ---------ROSE
----------
1411625233 READ WRITE
Exploring the Oracle DBA Technology by Gunasekaran , Thiyagu