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/29
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=36 device type=DISK
current log archived
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/12.2.0/db_1/dbs/orapworcl' auxiliary format
'/u01/app/oracle/product/12.2.0/db_1/dbs/orapworcl' ;
restore clone from service 'ORCL' spfile to
'/u01/app/oracle/product/12.2.0/db_1/dbs/spfileorcl.ora';
sql clone "alter system set spfile= ''/u01/app/oracle/product/12.2.0/db_1/dbs/spfileorcl.ora''";
}
executing Memory Script
Starting backup at 18/08/29
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=60 device type=DISK
Finished backup at 18/08/29
Starting restore at 18/08/29
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: restoring SPFILE
output file name=/u01/app/oracle/product/12.2.0/db_1/dbs/spfileorcl.ora
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 18/08/29
sql statement: alter system set spfile= ''/u01/app/oracle/product/12.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 838860800 bytes
Fixed Size 8798312 bytes
Variable Size 637538200 bytes
Database Buffers 188743680 bytes
Redo Buffers 3780608 bytes
contents of Memory Script:
{
restore clone from service 'ORCL' standby controlfile;
}
executing Memory Script
Starting restore at 18/08/29
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=35 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/orcl/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/orcl/control02.ctl
Finished restore at 18/08/29
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
"/u01/app/oracle/oradata/orcl/temp01.dbf";
set newname for tempfile 2 to
"/u01/app/oracle/oradata/orcl/pdbseed/temp012018-08-19_00-36-23-723-AM.dbf";
set newname for tempfile 3 to
"/u01/app/oracle/oradata/orcl/orclpdb/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/orcl/system01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/orcl/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/orcl/undotbs01.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/orcl/pdbseed/system01.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/orcl/pdbseed/sysaux01.dbf";
set newname for datafile 7 to
"/u01/app/oracle/oradata/orcl/users01.dbf";
set newname for datafile 8 to
"/u01/app/oracle/oradata/orcl/pdbseed/undotbs01.dbf";
set newname for datafile 9 to
"/u01/app/oracle/oradata/orcl/orclpdb/system01.dbf";
set newname for datafile 10 to
"/u01/app/oracle/oradata/orcl/orclpdb/sysaux01.dbf";
set newname for datafile 11 to
"/u01/app/oracle/oradata/orcl/orclpdb/undotbs01.dbf";
set newname for datafile 12 to
"/u01/app/oracle/oradata/orcl/orclpdb/users01.dbf";
restore
from nonsparse from service
'ORCL' clone database
;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/orcl/temp01.dbf in control file
renamed tempfile 2 to /u01/app/oracle/oradata/orcl/pdbseed/temp012018-08-19_00-36-23-723-AM.dbf in control file
renamed tempfile 3 to /u01/app/oracle/oradata/orcl/orclpdb/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
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 18/08/29
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/pdbseed/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:04
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/orcl/pdbseed/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00008 to /u01/app/oracle/oradata/orcl/pdbseed/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/orcl/orclpdb/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00010 to /u01/app/oracle/oradata/orcl/orclpdb/sysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00011 to /u01/app/oracle/oradata/orcl/orclpdb/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00012 to /u01/app/oracle/oradata/orcl/orclpdb/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 18/08/29
sql statement: alter system archive log current
current log archived
contents of Memory Script:
{
restore clone force from service 'ORCL'
archivelog from scn 1450238;
switch clone datafile all;
}
executing Memory Script
Starting restore at 18/08/29
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=5
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=6
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service ORCL
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=7
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 18/08/29
datafile 1 switched to datafile copy
input datafile copy RECID=4 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/system01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=5 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=6 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=7 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/pdbseed/system01.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=8 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/pdbseed/sysaux01.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=9 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/users01.dbf
datafile 8 switched to datafile copy
input datafile copy RECID=10 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/pdbseed/undotbs01.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=11 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/orclpdb/system01.dbf
datafile 10 switched to datafile copy
input datafile copy RECID=12 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/orclpdb/sysaux01.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=13 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/orclpdb/undotbs01.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=14 STAMP=985441715 file name=/u01/app/oracle/oradata/orcl/orclpdb/users01.dbf
contents of Memory Script:
{
set until scn 1450470;
recover
standby
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 18/08/29
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/fast_recovery_area/orcl/ORCL_STB/archivelog/2018_08_29/o1_mf_1_5_frd9f07l_.arc
archived log for thread 1 with sequence 6 is already on disk as file /u01/app/oracle/fast_recovery_area/orcl/ORCL_STB/archivelog/2018_08_29/o1_mf_1_6_frd9f1bl_.arc
archived log for thread 1 with sequence 7 is already on disk as file /u01/app/oracle/fast_recovery_area/orcl/ORCL_STB/archivelog/2018_08_29/o1_mf_1_7_frd9f2fs_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL_STB/archivelog/2018_08_29/o1_mf_1_5_frd9f07l_.arc thread=1 sequence=5
archived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL_STB/archivelog/2018_08_29/o1_mf_1_6_frd9f1bl_.arc thread=1 sequence=6
archived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL_STB/archivelog/2018_08_29/o1_mf_1_7_frd9f2fs_.arc thread=1 sequence=7
media recovery complete, elapsed time: 00:00:00
Finished recover at 18/08/29
Finished Duplicate Db at 18/08/29 |