RMAN> DUPLICATE TARGET DATABASE
2> FOR STANDBY
3> FROM ACTIVE DATABASE
4> DORECOVER
5> SPFILE
6> SET db_unique_name='orcl_stby' COMMENT 'Is standby'
7> SET FAL_SERVER='orcl' COMMENT 'Is primary'
8> NOFILENAMECHECK;
Starting Duplicate Db at 2024/02/13 14:21:26
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=182 device type=DISK
current log archived
contents of Memory Script:
{
backup as copy reuse
passwordfile auxiliary format '/u01/app/oracle/product/19c/db_1/dbs/orapworcl' ;
restore clone from service 'orcl_primary' spfile to
'/u01/app/oracle/product/19c/db_1/dbs/spfileorcl.ora';
sql clone "alter system set spfile= ''/u01/app/oracle/product/19c/db_1/dbs/spfileorcl.ora''";
}
executing Memory Script
Starting backup at 2024/02/13 14:21:27
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=291 device type=DISK
Finished backup at 2024/02/13 14:21:30
Starting restore at 2024/02/13 14:21:30
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_primary
channel ORA_AUX_DISK_1: restoring SPFILE
output file name=/u01/app/oracle/product/19c/db_1/dbs/spfileorcl.ora
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2024/02/13 14:21:33
sql statement: alter system set spfile= ''/u01/app/oracle/product/19c/db_1/dbs/spfileorcl.ora''
contents of Memory Script:
{
sql clone "alter system set db_unique_name =
''orcl_stby'' comment=
''Is standby'' 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_stby'' comment= ''Is standby'' 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 1258290744 bytes
Fixed Size 8896056 bytes
Variable Size 318767104 bytes
Database Buffers 922746880 bytes
Redo Buffers 7880704 bytes
duplicating Online logs to Oracle Managed File (OMF) location
contents of Memory Script:
{
restore clone from service 'orcl_primary' standby controlfile;
}
executing Memory Script
Starting restore at 2024/02/13 14:22:00
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 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_primary
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/oradata/ORCL/control01.ctl
output file name=/oradata/fast_recovery_area/ORCL/control02.ctl
Finished restore at 2024/02/13 14:22:04
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
RMAN-05158: WARNING: auxiliary (datafile) file name /oradata/ORCL/system01.dbf conflicts with a file used by the target database
RMAN-05158: WARNING: auxiliary (datafile) file name /oradata/ORCL/sysaux01.dbf conflicts with a file used by the target database
RMAN-05158: WARNING: auxiliary (datafile) file name /oradata/ORCL/undotbs01.dbf conflicts with a file used by the target database
RMAN-05158: WARNING: auxiliary (datafile) file name /oradata/ORCL/users01.dbf conflicts with a file used by the target database
RMAN-05158: WARNING: auxiliary (tempfile) file name /oradata/ORCL/temp01.dbf conflicts with a file used by the target database
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";
restore
from nonsparse from service
'orcl_primary' clone database
;
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
Starting restore at 2024/02/13 14:22:09
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_primary
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /oradata/ORCL/system01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcl_primary
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /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_primary
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /oradata/ORCL/undotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service orcl_primary
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /oradata/ORCL/users01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2024/02/13 14:22:48
sql statement: alter system archive log current
current log archived
contents of Memory Script:
{
restore clone force from service 'orcl_primary'
archivelog from scn 742232;
switch clone datafile all;
}
executing Memory Script
Starting restore at 2024/02/13 14:22:48
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_primary
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=14
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_primary
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=15
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2024/02/13 14:22:50
datafile 1 switched to datafile copy
input datafile copy RECID=1 STAMP=1160835769 file name=/oradata/ORCL/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=1160835769 file name=/oradata/ORCL/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=1160835769 file name=/oradata/ORCL/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=1160835769 file name=/oradata/ORCL/users01.dbf
contents of Memory Script:
{
set until scn 742523;
recover
standby
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 2024/02/13 14:22:50
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 14 is already on disk as file /oradata/fast_recovery_area/ORCL_STBY/archivelog/2024_02_13/o1_mf_1_14_lwoz57hg_.arc
archived log for thread 1 with sequence 15 is already on disk as file /oradata/fast_recovery_area/ORCL_STBY/archivelog/2024_02_13/o1_mf_1_15_lwoz58kc_.arc
archived log file name=/oradata/fast_recovery_area/ORCL_STBY/archivelog/2024_02_13/o1_mf_1_14_lwoz57hg_.arc thread=1 sequence=14
archived log file name=/oradata/fast_recovery_area/ORCL_STBY/archivelog/2024_02_13/o1_mf_1_15_lwoz58kc_.arc thread=1 sequence=15
media recovery complete, elapsed time: 00:00:01
Finished recover at 2024/02/13 14:22:53
contents of Memory Script:
{
delete clone force archivelog all;
}
executing Memory Script
released channel: ORA_DISK_1
released channel: ORA_AUX_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=291 device type=DISK
deleted archived log
archived log file name=/oradata/fast_recovery_area/ORCL_STBY/archivelog/2024_02_13/o1_mf_1_14_lwoz57hg_.arc RECID=1 STAMP=1160835767
deleted archived log
archived log file name=/oradata/fast_recovery_area/ORCL_STBY/archivelog/2024_02_13/o1_mf_1_15_lwoz58kc_.arc RECID=2 STAMP=1160835768
Deleted 2 objects
Finished Duplicate Db at 2024/02/13 14:22:59 |