You are on page 1of 16

Home SQL Oracle 10g Oracle 11g Data Guard Migration Cloning Unix About Me

ACTIVE DATABASE CLONING USING RMAN 10g


STEP 1: TAKE YOUR DATABASE TO MOUNT STAGE.
[oracle@station10 ~]$ export ORACLE_SID=prod
[oracle@station10 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 Production on Mon Sep 17 19:15:22 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to ideal instance:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 88082024 bytes
Database Buffers 188743680 bytes
Redo Buffers 7168000 bytes
Database mounted.
STEP 2: PUT YOUR DATABASE IN ARCHIVELOG MODE.
SQL> alter database archivelog;
Database altered.
STEP 3: NOW TAKE YOUR DATABASE TO OPEN STAGE
SQL> alter database open;
Database altered.
STEP 4: CONNECT TO YOUR TARGET DATABASE THROUGH RMAN AND PERFORM BACKUP OF YOUR DATABASE AND ARCHIVELOG FILES
[oracle@station10 ~]$ export ORACLE_SID=prod
[oracle@station10 ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 Production on Mon Sep 17 19:25:10 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: PROD (DBID=206095564)
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_prod.f'; # default
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 5;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 5 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
RMAN> backup database plus archivelog;
Starting backup at 17-SEP-12
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=129 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=128 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=127 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=126 devtype=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: sid=125 devtype=DISK
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=2 recid=1 stamp=794258771
channel ORA_DISK_1: starting piece 1 at 17-SEP-12
channel ORA_DISK_1: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_annnn_TAG20120917T192613_85gbzymp_.bkp tag=TAG2012
0917T192613 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 17-SEP-12
Starting backup at 17-SEP-12
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
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/prod/system01.dbf
channel ORA_DISK_1: starting piece 1 at 17-SEP-12
channel ORA_DISK_2: starting full datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
input datafile fno=00003 name=/u01/app/oracle/oradata/prod/sysaux01.dbf
channel ORA_DISK_2: starting piece 1 at 17-SEP-12
channel ORA_DISK_3: starting full datafile backupset
channel ORA_DISK_3: specifying datafile(s) in backupset
input datafile fno=00005 name=/u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_3: starting piece 1 at 17-SEP-12
channel ORA_DISK_4: starting full datafile backupset
channel ORA_DISK_4: specifying datafile(s) in backupset
input datafile fno=00002 name=/u01/app/oracle/oradata/prod/undotbs01.dbf
channel ORA_DISK_4: starting piece 1 at 17-SEP-12
channel ORA_DISK_5: starting full datafile backupset
channel ORA_DISK_5: specifying datafile(s) in backupset
input datafile fno=00004 name=/u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_5: starting piece 1 at 17-SEP-12
channel ORA_DISK_3: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc00tw_.bkp tag=TAG2012
0917T192615 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_3: starting full datafile backupset
channel ORA_DISK_3: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_3: starting piece 1 at 17-SEP-12
channel ORA_DISK_2: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc0230_.bkp tag=TAG2012
0917T192615 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:43
channel ORA_DISK_2: starting full datafile backupset
channel ORA_DISK_2: specifying datafile(s) in backupset
channel ORA_DISK_4: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc0n3n_.bkp tag=TAG2012
0917T192615 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:00:44
including current SPFILE in backupset
channel ORA_DISK_2: starting piece 1 at 17-SEP-12
channel ORA_DISK_5: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc15vn_.bkp tag=TAG2012
0917T192615 comment=NONE
channel ORA_DISK_5: backup set complete, elapsed time: 00:00:43
channel ORA_DISK_1: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc00cj_.bkp tag=TAG2012
0917T192615 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:53
channel ORA_DISK_2: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnsnf_TAG20120917T192615_85gc1j96_.bkp tag=TAG2012
0917T192615 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:09
channel ORA_DISK_3: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_ncnnf_TAG20120917T192615_85gc1cwm_.bkp tag=TAG2012
0917T192615 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:16
Finished backup at 17-SEP-12
Starting backup at 17-SEP-12
current log archived
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
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=3 recid=2 stamp=794258830
channel ORA_DISK_1: starting piece 1 at 17-SEP-12
channel ORA_DISK_1: finished piece 1 at 17-SEP-12
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_annnn_TAG20120917T192710_85gc1qrk_.bkp tag=TAG2012
0917T192710 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 17-SEP-12
STEP 5: CREATE A PARAMETER FILE FOR CLONE DATABASE
SQL> create pfile='$ORACLE_HOME/dbs/initclone.ora' from spfile;
File created.
STEP 6: DO THE FOLLOWING CHANGE IN CLONE PARAMETER FILE
clone.__db_cache_size=184549376
clone.__java_pool_size=4194304
clone.__large_pool_size=4194304
clone.__shared_pool_size=83886080
clone.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/clone/adump'
*.background_dump_dest='/u01/app/oracle/admin/clone/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/clone/control01.ctl','/u01/app/oracle/oradata/clone/control02.ctl','/u01/app/oracle/oradat
a/clone/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/clone/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='clone'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=cloneXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=94371840
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=283115520
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/clone/udump'
db_file_name_convert='/u01/app/oracle/oradata/prod','/u01/app/oracle/oradata/clone'
log_file_name_convert='/u01/app/oracle/oradata/prod','/u01/app/oracle/oradata/clone'
STEP 7: CREATE THE FOLLOWING DIRECTORIES FOR CONE DATABASE
[oracle@virajoracle ~]$ mkdir /u01/app/oracle/oradata/clone
[oracle@virajoracle ~]$ mkdir /u01/app/oracle/admin/clone
[oracle@virajoracle ~]$ mkdir /u01/app/oracle/admin/clone/adump
[oracle@virajoracle ~]$ mkdir /u01/app/oracle/admin/clone/bdump
[oracle@virajoracle ~]$ mkdir /u01/app/oracle/admin/clone/cdump
[oracle@virajoracle ~]$ mkdir /u01/app/oracle/admin/clone/udump
STEP 8: CREATE A PASSWORD FILE FOR CLONE DATABASE
[oracle@virajoracle ~]$ orapwd file=$ORACLE_HOME/dbs/orapwclone password=oracle entries=5
STEP 9: FIRE THE FOLLWOING COMMAND ON PRIMARY DATABASE TO SET THE SAME PASSWORD OF CLONE DATABASE
alter user sys identified by oracle;
STEP 10: COMPOSE TNSNAMES.ORA FILE WITH FOLLOWING ENTRIES
PROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = virajoracle.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = prod)
)
)
CLONE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = virajoracle.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = clone)
)
)
STEP 11: COMPOSE LISTENER.ORA FILE WITH FOLLOWING ENTRIES
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = prod)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = prod)
)
(SID_DESC =
(GLOBAL_DBNAME = clone)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = clone)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = virajoracle.com)(PORT = 1521))
)
STEP 12: START YOUR LISTENER
[oracle@virajoracle ~]$ lsnrctl stop listener
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-MAR-2013 20:18:09
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=virajoracle.com)(PORT=1521)))
The command completed successfully
[oracle@virajoracle ~]$ lsnrctl start listener
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-MAR-2013 20:18:18
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=virajoracle.com)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=virajoracle.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias listener
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 19-MAR-2013 20:18:18
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=virajoracle.com)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "clone" has 1 instance(s).
Instance "clone", status UNKNOWN, has 1 handler(s) for this service...
Service "prod" has 1 instance(s).
Instance "prod", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
STEP 13: TAKE YOUR DATABASE TO NOMOUNT STAGE AND EXIT FROM SQL PROMP
[oracle@virajoracle ~]$ export ORACLE_SID=clone
[oracle@virajoracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 19 20:06:54 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 62916852 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
SQL>
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@virajoracle ~]$
STEP 14: CONNECT TO PRIMARY DATABASE AND CLONE DATABASE BY FIRING FOLLOWING COMMAND
[oracle@station10 ~]$ export ORACLE_SID=prod
[oracle@station10 ~]$ rman target / auxiliary sys/oracle@clone
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Sep 17 20:50:06 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: PROD (DBID=206095564)
connected to auxiliary database: CLONE (not mounted)
STEP 15: FIRE THE FOLLOWING COMMAND TO CREATE THE CLONE
RMAN> duplicate target database to 'clone';
Starting Duplicate Db at 17-SEP-12
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=155 devtype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: sid=154 devtype=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: sid=153 devtype=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: sid=152 devtype=DISK
allocated channel: ORA_AUX_DISK_5
channel ORA_AUX_DISK_5: sid=151 devtype=DISK
contents of Memory Script:
{
set until scn 508640;
set newname for datafile 1 to
"/u01/app/oracle/oradata/clone/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/clone/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/clone/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/clone/users01.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/clone/example01.dbf";
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 17-SEP-12
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_DISK_3
using channel ORA_AUX_DISK_4
using channel ORA_AUX_DISK_5
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00005 to /u01/app/oracle/oradata/clone/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG2012
0917T192615_85gc00tw_.bkp
channel ORA_AUX_DISK_2: starting datafile backupset restore
channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u01/app/oracle/oradata/clone/undotbs01.dbf
channel ORA_AUX_DISK_2: reading from backup piece /u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG2012
0917T192615_85gc0n3n_.bkp
channel ORA_AUX_DISK_3: starting datafile backupset restore
channel ORA_AUX_DISK_3: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /u01/app/oracle/oradata/clone/sysaux01.dbf
channel ORA_AUX_DISK_3: reading from backup piece /u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG2012
0917T192615_85gc0230_.bkp
channel ORA_AUX_DISK_4: starting datafile backupset restore
channel ORA_AUX_DISK_4: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /u01/app/oracle/oradata/clone/users01.dbf
channel ORA_AUX_DISK_4: reading from backup piece /u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG2012
0917T192615_85gc15vn_.bkp
channel ORA_AUX_DISK_5: starting datafile backupset restore
channel ORA_AUX_DISK_5: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/clone/system01.dbf
channel ORA_AUX_DISK_5: reading from backup piece /u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG2012
0917T192615_85gc00cj_.bkp
channel ORA_AUX_DISK_4: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc15vn_.bkp tag=TAG2012
0917T192615
channel ORA_AUX_DISK_4: restore complete, elapsed time: 00:00:08
channel ORA_AUX_DISK_2: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc0n3n_.bkp tag=TAG2012
0917T192615
channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:13
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc00tw_.bkp tag=TAG2012
0917T192615
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:38
channel ORA_AUX_DISK_3: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc0230_.bkp tag=TAG2012
0917T192615
channel ORA_AUX_DISK_3: restore complete, elapsed time: 00:00:38
channel ORA_AUX_DISK_5: restored backup piece 1
piece handle=/u01/app/oracle/flash_recovery_area/PROD/backupset/2012_09_17/o1_mf_nnndf_TAG20120917T192615_85gc00cj_.bkp tag=TAG2012
0917T192615
channel ORA_AUX_DISK_5: restore complete, elapsed time: 00:00:53
Finished restore at 17-SEP-12
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
released channel: ORA_AUX_DISK_1
released channel: ORA_AUX_DISK_2
released channel: ORA_AUX_DISK_3
released channel: ORA_AUX_DISK_4
released channel: ORA_AUX_DISK_5
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=794263968 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=794263968 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=794263968 filename=/u01/app/oracle/oradata/clone/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=4 stamp=794263968 filename=/u01/app/oracle/oradata/clone/example01.dbf
contents of Memory Script:
{
set until scn 508640;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 17-SEP-12
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=151 devtype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: sid=152 devtype=DISK
allocated channel: ORA_AUX_DISK_3
channel ORA_AUX_DISK_3: sid=153 devtype=DISK
allocated channel: ORA_AUX_DISK_4
channel ORA_AUX_DISK_4: sid=154 devtype=DISK
allocated channel: ORA_AUX_DISK_5
channel ORA_AUX_DISK_5: sid=155 devtype=DISK
starting media recovery
archive log thread 1 sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/PROD/archivelog/2012_09_17/o1_mf_1_3
_85gc1phw_.arc
archive log thread 1 sequence 4 is already on disk as file /u01/app/oracle/flash_recovery_area/PROD/archivelog/2012_09_17/o1_mf_1_4
_85ghht3o_.arc
archive log filename=/u01/app/oracle/flash_recovery_area/PROD/archivelog/2012_09_17/o1_mf_1_3_85gc1phw_.arc thread=1 sequence=3
archive log filename=/u01/app/oracle/flash_recovery_area/PROD/archivelog/2012_09_17/o1_mf_1_4_85ghht3o_.arc thread=1 sequence=4
media recovery complete, elapsed time: 00:00:02
Finished recover at 17-SEP-12
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 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 92276328 bytes
Database Buffers 184549376 bytes
Redo Buffers 7168000 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONE" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/clone/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/clone/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/clone/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/clone/system01.dbf'
CHARACTER SET WE8ISO8859P1
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oracle/oradata/clone/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/undotbs01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/sysaux01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/users01.dbf";
catalog clone datafilecopy "/u01/app/oracle/oradata/clone/example01.dbf";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed temporary file 1 to /u01/app/oracle/oradata/clone/temp01.dbf in control file
cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/undotbs01.dbf recid=1 stamp=794264217
cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/sysaux01.dbf recid=2 stamp=794264217
cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/users01.dbf recid=3 stamp=794264217
cataloged datafile copy
datafile copy filename=/u01/app/oracle/oradata/clone/example01.dbf recid=4 stamp=794264217
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=794264217 filename=/u01/app/oracle/oradata/clone/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=794264217 filename=/u01/app/oracle/oradata/clone/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=794264217 filename=/u01/app/oracle/oradata/clone/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=4 stamp=794264217 filename=/u01/app/oracle/oradata/clone/example01.dbf
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 17-SEP-12
RMAN>

You might also like