点击(此处)折叠或打开
- 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
点击(此处)折叠或打开
- [oracle@hygzdb01-2-252 dbs]$ rman target sys/oracle@orcl auxiliary sys/oracle@orclst1 nocatalog
- Recovery Manager: Release 11.2.0.4.0 - Production on Tue Jan 30 17:09:12 2018
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1494309735)
- 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 dorecover nofilenamecheck;
- Starting Duplicate Db at 30-JAN-18
- allocated channel: ORA_AUX_DISK_1
- channel ORA_AUX_DISK_1: SID=126 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/orapworcl' ;
- }
- executing Memory Script
- Starting backup at 30-JAN-18
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=872 device type=DISK
- 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=TAG20180130T170920 RECID=3 STAMP=966791361
- 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
- channel ORA_AUX_DISK_1: copied control file copy
- Finished restore at 30-JAN-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 tempfile 1 to
- "/u01/app/oracle/oradata/orcl/temp01.dbf";
- switch clone tempfile all;
- set newname for datafile 1 to
- "/u01/app/oracle/oradata/orcl/system01.dbf";
- set newname for datafile 2 to
- "/u01/app/oracle/oradata/orcl/sysaux01.dbf";
- set newname for datafile 3 to
- "/u01/app/oracle/oradata/orcl/undotbs01.dbf";
- set newname for datafile 4 to
- "/u01/app/oracle/oradata/orcl/users01.dbf";
- set newname for datafile 5 to
- "/u01/app/oracle/oradata/orcl/tbs_hygz01.dbf";
- set newname for datafile 6 to
- "/u01/app/oracle/oradata/orcl/tbs_hygz02.dbf";
- set newname for datafile 7 to
- "/u01/app/oracle/oradata/orcl/tbs_hygz03.dbf";
- set newname for datafile 8 to
- "/u01/app/oracle/oradata/orcl/tbs_hygz04.dbf";
- backup as copy reuse
- datafile 1 auxiliary format
- "/u01/app/oracle/oradata/orcl/system01.dbf" datafile
- 2 auxiliary format
- "/u01/app/oracle/oradata/orcl/sysaux01.dbf" datafile
- 3 auxiliary format
- "/u01/app/oracle/oradata/orcl/undotbs01.dbf" datafile
- 4 auxiliary format
- "/u01/app/oracle/oradata/orcl/users01.dbf" datafile
- 5 auxiliary format
- "/u01/app/oracle/oradata/orcl/tbs_hygz01.dbf" datafile
- 6 auxiliary format
- "/u01/app/oracle/oradata/orcl/tbs_hygz02.dbf" datafile
- 7 auxiliary format
- "/u01/app/oracle/oradata/orcl/tbs_hygz03.dbf" datafile
- 8 auxiliary format
- "/u01/app/oracle/oradata/orcl/tbs_hygz04.dbf" ;
- sql 'alter system archive log current';
- }
- executing Memory Script
- executing command: SET NEWNAME
- renamed tempfile 1 to /u01/app/oracle/oradata/orcl/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
- Starting backup at 30-JAN-18
- using channel ORA_DISK_1
- channel ORA_DISK_1: starting datafile copy
- input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
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-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:
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 :
@?/rdbms/admin/prvtrmns.plb
@?/rdbms/admin/dbmsbkrs.sql
@?/rdbms/admin/prvtbkrs.plb
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24486203/viewspace-2150717/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24486203/viewspace-2150717/