-
RMAN> duplicate target database for standby from active database;
-
-
Starting Duplicate Db at 15-JUN-18
-
using channel ORA_AUX_DISK_1
-
-
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/orapworcls' ;
-
}
-
executing Memory Script
-
-
Starting backup at 15-JUN-18
-
using channel ORA_DISK_1
-
Finished backup at 15-JUN-18
-
-
contents of Memory Script:
-
{
-
backup as copy current controlfile for standby auxiliary format '/oradata/control01.ctl';
-
restore clone controlfile to '/u01/app/oracle/fast_recovery_area/orcls/control02.ctl' from
-
'/oradata/control01.ctl';
-
}
-
executing Memory Script
-
-
Starting backup at 15-JUN-18
-
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=TAG20180619T202436 RECID=3 STAMP=979244676
-
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
-
Finished backup at 15-JUN-18
-
-
Starting restore at 15-JUN-18
-
using channel ORA_AUX_DISK_1
-
-
-
DBGSQL: TARGET> begin :fhdbi := dbms_rcvcat.getDbid; end;
-
DBGSQL: sqlcode = 6550
-
DBGSQL: B :fhdbi = 32767
-
RMAN-00571: ===========================================================
-
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
-
RMAN-00571: ===========================================================
-
RMAN-03002: failure of Duplicate Db command at 06/15/2018 00:58:58
-
RMAN-05501: aborting duplication of target database
-
RMAN-03015: error occurred in stored script Memory Script
-
ORA-06550: line 1, column 17:
-
PLS-00201: identifier 'DBMS_RCVCAT.GETDBID' must be declared
-
ORA-06550: line 1, column 7:
- PL/SQL: Statement ignored
解释是使用非catalog,在rman 连接时,加上nocatalog关键字,如下:
-
[oracle@node2 dbs]$ rman target sys/oracle@orcl auxiliary sys/oracle@orcls nocatalog
-
-
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 15 01:03:44 2018
-
-
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
-
-
connected to target database: ORCL (DBID=1506854844)
-
using target database control file instead of recovery catalog
- connected to auxiliary database: ORCL (not mounted)
-
RMAN> duplicate target database for standby from active database nofilenamecheck;
-
-
Starting Duplicate Db at 15-JUN-18
-
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/orapworcls' ;
-
}
-
executing Memory Script
-
-
Starting backup at 15-JUN-18
-
allocated channel: ORA_DISK_1
-
channel ORA_DISK_1: SID=36 device type=DISK
-
Finished backup at 15-JUN-18
-
-
contents of Memory Script:
-
{
-
backup as copy current controlfile for standby auxiliary format '/oradata/control01.ctl';
-
restore clone controlfile to '/u01/app/oracle/fast_recovery_area/orcls/control02.ctl' from
-
'/oradata/control01.ctl';
-
}
-
executing Memory Script
-
-
Starting backup at 15-JUN-18
-
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=TAG20180619T202939 RECID=5 STAMP=979244979
-
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
-
Finished backup at 15-JUN-18
-
-
Starting restore at 15-JUN-18
-
using channel ORA_AUX_DISK_1
-
-
channel ORA_AUX_DISK_1: copied control file copy
-
Finished restore at 15-JUN-18
-
-
contents of Memory Script:
-
{
-
sql clone 'alter database mount standby database';
-
}
-
executing Memory Script
-
-
sql statement: alter database mount standby database
-
-
contents of Memory Script:
-
{
-
set newname for clone tempfile 1 to new;
-
switch clone tempfile all;
-
set newname for clone datafile 1 to new;
-
set newname for clone datafile 2 to new;
-
set newname for clone datafile 3 to new;
-
set newname for clone datafile 4 to new;
-
backup as copy reuse
-
datafile 1 auxiliary format new
-
datafile 2 auxiliary format new
-
datafile 3 auxiliary format new
-
datafile 4 auxiliary format new
-
;
-
sql 'alter system archive log current';
-
}
-
executing Memory Script
-
-
executing command: SET NEWNAME
-
-
renamed tempfile 1 to /oradata/ORCLS/datafile/o1_mf_temp_%u_.tmp in control file
-
-
executing command: SET NEWNAME
-
-
executing command: SET NEWNAME
-
-
executing command: SET NEWNAME
-
-
executing command: SET NEWNAME
-
-
Starting backup at 15-JUN-18
-
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/ORCLS/datafile/o1_mf_system_06t5s5tr_.dbf tag=TAG20180619T202947
-
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
-
channel ORA_DISK_1: starting datafile copy
-
input datafile file number=00002 name=/oradata/orcl/sysaux01.dbf
-
output file name=/oradata/ORCLS/datafile/o1_mf_sysaux_07t5s5uu_.dbf tag=TAG20180619T202947
-
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
-
channel ORA_DISK_1: starting datafile copy
-
input datafile file number=00003 name=/oradata/orcl/undotbs01.dbf
-
output file name=/oradata/ORCLS/datafile/o1_mf_undotbs1_08t5s5vn_.dbf tag=TAG20180619T202947
-
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
-
channel ORA_DISK_1: starting datafile copy
-
input datafile file number=00004 name=/oradata/orcl/users01.dbf
-
output file name=/oradata/ORCLS/datafile/o1_mf_users_09t5s5vq_.dbf tag=TAG20180619T202947
-
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
-
Finished backup at 15-JUN-18
-
-
sql statement: alter system archive log current
-
-
contents of Memory Script:
-
{
-
switch clone datafile all;
-
}
-
executing Memory Script
-
-
datafile 1 switched to datafile copy
-
input datafile copy RECID=5 STAMP=978829512 file name=/oradata/ORCLS/datafile/o1_mf_system_06t5s5tr_.dbf
-
datafile 2 switched to datafile copy
-
input datafile copy RECID=6 STAMP=978829512 file name=/oradata/ORCLS/datafile/o1_mf_sysaux_07t5s5uu_.dbf
-
datafile 3 switched to datafile copy
-
input datafile copy RECID=7 STAMP=978829512 file name=/oradata/ORCLS/datafile/o1_mf_undotbs1_08t5s5vn_.dbf
-
datafile 4 switched to datafile copy
-
input datafile copy RECID=8 STAMP=978829512 file name=/oradata/ORCLS/datafile/o1_mf_users_09t5s5vq_.dbf
-
Finished Duplicate Db at 15-JUN-18
-
- RMAN>