一、搭建DG使用RMAN同步数据到备库时报错
-
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
查询网络资料https://blog.csdn.net/tianlesoftware/article/details/9358939后
解释是使用非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)
使用后正常完成同步,如下:
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31427447/viewspace-2156955/
,如需转载,请注明出处,否则将追究法律责任。