RMAN> DUPLICATE TARGET DATABASE
2> FOR STANDBY
3> FROM ACTIVE DATABASE
4> DORECOVER
5> SPFILE
6> SET db_unique_name='ORCL_STB' COMMENT 'Is standby'
7> SET LOG_ARCHIVE_DEST_2='SERVICE=ORCL ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCL'
8> SET FAL_SERVER='ORCL' COMMENT 'Is primary'
9> NOFILENAMECHECK;
Starting Duplicate Db at 18/08/14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapworcl' targetfile
'/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora''";
}
executing Memory Script
Starting backup at 18/08/14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=74 device type=DISK
Finished backup at 18/08/14
sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl.ora''
contents of Memory Script:
{
sql clone "alter system set db_unique_name =
''ORCL_STB'' comment=
''Is standby'' scope=spfile";
sql clone "alter system set LOG_ARCHIVE_DEST_2 =
''SERVICE=ORCL ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCL'' comment=
'''' scope=spfile";
sql clone "alter system set FAL_SERVER =
''ORCL'' comment=
''Is primary'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set db_unique_name = ''ORCL_STB'' comment= ''Is standby'' scope=spfile
sql statement: alter system set LOG_ARCHIVE_DEST_2 = ''SERVICE=ORCL ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCL'' comment= '''' scope=spfile
sql statement: alter system set FAL_SERVER = ''ORCL'' comment= ''Is primary'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 839282688 bytes
Fixed Size 2257880 bytes
Variable Size 545262632 bytes
Database Buffers 289406976 bytes
Redo Buffers 2355200 bytes
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/oradata/orcl/control01.ctl';
restore clone controlfile to '/oradata/fast_recovery_area/orcl/control02.ctl' from
'/oradata/orcl/control01.ctl';
}
executing Memory Script
Starting backup at 18/08/14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl.f tag=TAG20180814T150532 RECID=3 STAMP=984150332
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 18/08/14
Starting restore at 18/08/14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 18/08/14
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
RMAN-05538: WARNING: implicitly using DB_FILE_NAME_CONVERT
contents of Memory Script:
{
set newname for tempfile 1 to
"/oradata/orcl/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/oradata/orcl/system01.dbf";
set newname for datafile 2 to
"/oradata/orcl/sysaux01.dbf";
set newname for datafile 3 to
"/oradata/orcl/undotbs01.dbf";
set newname for datafile 4 to
"/oradata/orcl/users01.dbf";
set newname for datafile 5 to
"/oradata/orcl/example01.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/oradata/orcl/system01.dbf" datafile
2 auxiliary format
"/oradata/orcl/sysaux01.dbf" datafile
3 auxiliary format
"/oradata/orcl/undotbs01.dbf" datafile
4 auxiliary format
"/oradata/orcl/users01.dbf" datafile
5 auxiliary format
"/oradata/orcl/example01.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /oradata/orcl/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 18/08/14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/oradata/orcl/system01.dbf
output file name=/oradata/orcl/system01.dbf tag=TAG20180814T150542
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/oradata/orcl/sysaux01.dbf
output file name=/oradata/orcl/sysaux01.dbf tag=TAG20180814T150542
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/oradata/orcl/example01.dbf
output file name=/oradata/orcl/example01.dbf tag=TAG20180814T150542
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/oradata/orcl/undotbs01.dbf
output file name=/oradata/orcl/undotbs01.dbf tag=TAG20180814T150542
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:16
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/oradata/orcl/users01.dbf
output file name=/oradata/orcl/users01.dbf tag=TAG20180814T150542
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18/08/14
sql statement: alter system archive log current
contents of Memory Script:
{
backup as copy reuse
archivelog like "/oradata/fast_recovery_area/ORCL/archivelog/2018_08_14/o1_mf_1_10_fq4wh263_.arc" auxiliary format
"/oradata/fast_recovery_area/ORCL_STB/archivelog/2018_08_14/o1_mf_1_10_%u_.arc" ;
catalog clone recovery area;
switch clone datafile all;
}
executing Memory Script
Starting backup at 18/08/14
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=10 RECID=6 STAMP=984150514
output file name=/oradata/fast_recovery_area/ORCL_STB/archivelog/2018_08_14/o1_mf_1_10_0btahsfi_.arc RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 18/08/14
searching for all files in the recovery area
List of Files Unknown to the Database
=====================================
File Name: /oradata/fast_recovery_area/ORCL_STB/archivelog/2018_08_14/o1_mf_1_10_0btahsfi_.arc
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /oradata/fast_recovery_area/ORCL_STB/archivelog/2018_08_14/o1_mf_1_10_0btahsfi_.arc
datafile 1 switched to datafile copy
input datafile copy RECID=3 STAMP=984150515 file name=/oradata/orcl/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=4 STAMP=984150515 file name=/oradata/orcl/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=5 STAMP=984150515 file name=/oradata/orcl/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=6 STAMP=984150515 file name=/oradata/orcl/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=7 STAMP=984150515 file name=/oradata/orcl/example01.dbf
contents of Memory Script:
{
set until scn 996856;
recover
standby
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 18/08/14
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 10 is already on disk as file /oradata/fast_recovery_area/ORCL_STB/archivelog/2018_08_14/o1_mf_1_10_0btahsfi_.arc
archived log file name=/oradata/fast_recovery_area/ORCL_STB/archivelog/2018_08_14/o1_mf_1_10_0btahsfi_.arc thread=1 sequence=10
media recovery complete, elapsed time: 00:00:00
Finished recover at 18/08/14
Finished Duplicate Db at 18/08/14 |