ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【Oracle】rman upgrade catalog

【Oracle】rman upgrade catalog

原创 Linux操作系统 作者:杨奇龙 时间:2012-06-14 20:16:50 0 删除 编辑
因为数据库从11.2.0.2 升级到 11.2.0.3,在使用catalog 执行rman备份的时候,报如下错误:
oracle@rac1>rman target / catalog rman/xxxxx@rman
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jun 13 22:31:07 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: RAC (DBID=12029485965)
connected to recovery catalog database
PL/SQL package RMAN_ALIBANK.DBMS_RCVCAT version 11.02.00.01 in RCVCAT database is not current
PL/SQL package RMAN_ALIBANK.DBMS_RCVMAN version 11.02.00.01 in RCVCAT database is not current
RMAN>
RMAN>
RMAN> show all;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of show command at 06/13/2012 22:31:23
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 06/13/2012 22:31:23

RMAN-10015: error compiling PL/SQL program
RMAN-10014: PL/SQL error 0 on line 1655 column 12: Statement ignored
RMAN-10014: PL/SQL error 306 on line 1655 column 12: wrong number or types of arguments in call to 'CHECKTABLESPACE'
RMAN> exit
因为catalog 数据的版本低于执行rman的数据库版本,所以报如上错误!我们要执行upgrade catalog 来更新catalog!按照官方文档的描述“
Note that UPGRADE CATALOG does not run scripts to perform. the upgrade. Instead, RMAN sends various SQL DDL statements to the recovery catalog to update the recovery catalog schema with new tables, views, columns, and so forth.
upgrade 命令本身并步执行真正的升级而是执行一下ddl 语句 修改catalog 用户下的表,字段等等!
oracle@rac1>rman target / catalog rman/xxxxx@rman
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jun 13 22:46:49 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: RAC (DBID=12029485965)
connected to recovery catalog database
PL/SQL package RMAN_ALIBANK.DBMS_RCVCAT version 11.02.00.01 in RCVCAT database is not current
PL/SQL package RMAN_ALIBANK.DBMS_RCVMAN version 11.02.00.01 in RCVCAT database is not current 
RMAN> upgrade catalog;
recovery catalog owner is RMAN
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> UPGRADE CATALOG
recovery catalog upgraded to version 11.02.00.03
DBMS_RCVMAN package upgraded to version 11.02.00.03
DBMS_RCVCAT package upgraded to version 11.02.00.03
RMAN>

执行 upgrade catalog 命令要注意:
 a) You must be connected to the catalog database, and the catalog database must be open. You do not have to be connected to the target database.
 b) You must enter the UPGRADE command twice in a row to confirm the upgrade.
 c) You will receive an error if the recovery catalog is already at a version greater than needed by the RMAN executable. RMAN permits the command to be run if the recovery catalog is already current, however, so that the packages can be re-created if necessary. RMAN displays all error messages generated during the upgrade in the message log.
参考:
11g upgrade catalog 的官方文档

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22664653/viewspace-732851/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
MySQL DBA NoSQL DEVOPS

注册时间:2009-10-07

  • 博文量
    1026
  • 访问量
    7652215