rman duplicate出现以下错误
-
RMAN> duplicate target database for standby from active database dorecover nofilenamecheck;
-
-
Starting Duplicate Db at 30-JAN-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/orapworcl' ;
-
}
-
executing Memory Script
-
-
Starting backup at 30-JAN-18
-
using channel ORA_DISK_1
-
Finished backup at 30-JAN-18
-
-
contents of Memory Script:
-
{
-
backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/orcl/control01.ctl';
-
restore clone primary controlfile to '/u01/app/oracle/fast_recovery_area/orcl/control02.ctl' from
-
'/u01/app/oracle/oradata/orcl/control01.ctl';
-
}
-
executing Memory Script
-
-
Starting backup at 30-JAN-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=TAG20180130T170732 RECID=2 STAMP=966791252
-
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
-
Finished backup at 30-JAN-18
-
-
Starting restore at 30-JAN-18
-
using channel ORA_AUX_DISK_1
-
-
-
DBGSQL: TARGET> begin :fhdbi := dbms_rcvcat.getDbid; end;
-
DBGSQL: sqlcode = 6550
-
DBGSQL: B :fhdbi = 32765
-
RMAN-00571: ===========================================================
-
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
-
RMAN-00571: ===========================================================
-
RMAN-03002: failure of Duplicate Db command at 01/30/2018 17:07:35
-
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
加上nocatalog解决
mos上有相关介绍
RMAN-554 RMAN-4005 PLS-201 RMAN-4015 when Connecting to Target Database (文档 ID 97294.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 9.0.1.0 to 11.2.0.4 [Release 9.0.1 to 11.2]
Information in this document applies to any platform.
SYMPTOMS
You are attempting to connect to the target database in RMAN and
are receiving a "PLS-00201: identifier 'xxx...' must be declared"
error:
target database Password:
RMAN-00571: ===========================================================
RMAN-00569: ========== ERROR MESSAGE STACK FOLLOWS ========
RMAN-00571: ===============================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database: ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SET_CHARSET' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
RMAN-04015: error setting target database character set to US7ASCII
Also, if you log into the target database as the user SYS and issue:
SQL> select *
from dba_objects
where object_name like '%DBMS_BACKUP_RESTORE%';
you get 0 rows returned or the status is INVALID
CAUSE
The package identified in the PLS-00201 error was not successfully
created when catproc.sql was originally run on this database. As
a general rule, for any RMAN "PLS-00201: identifier 'xxx...' must
be declared" error, re-run catproc.sql.
主要是少了这个包DBMS_BACKUP_RESTORE
SOLUTION
Re-run catproc.sql. This will in turn call the dbmsbkrs.sql script
which creates the DBMS_BACKUP_RESTORE package.
NOTE : Keep inmind that running catproc.sql will invalidate all PL/SQL
and many other related objects.
Running catproc is recommended, as when the RMAN-packages are missing,
there could be others missing aswell.
If the problem has been identified as RMAN-only, than run :
SQL>@?/rdbms/admin/dbmsrman.sql
@?/rdbms/admin/prvtrmns.plb
@?/rdbms/admin/dbmsbkrs.sql
@?/rdbms/admin/prvtbkrs.plb
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24486203/viewspace-2150717/
,如需转载,请注明出处,否则将追究法律责任。