PL/SQL package RMANGP.DBMS_RCVCAT version 10.02.00.00 in RCVCAT database is not current

author:skate
time:2010/06/07


 

我的环境是由一台rman catalog数据库服务器,为了管理方便,我用这太rman catalog数据库备份所有的数据库,
备份的每个数据库在rman catalog数据库上都对应一个用户(出于管理方便),今天又有一个项目上线,搭建了
一个数据库,所以照规矩再创建一个catalog 用户。

 

在rman数据库上创建catalog

 

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
TBS_RMANTICKET

6 rows selected.

 

创建catalog用户


SQL> create user rmangp identified by passwd
  2  default tablespace tbs_rmanticket;

User created.

 

给catalog目录授权


SQL> grant connect,resource,recovery_catalog_owner to rmangp;

Grant succeeded.

 

SQL> commit;

Commit complete.

 

SQL> quit

 

创建catalog目录

 

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options


[oracle@ticketb ~]$ rman catalog=rmangp/passwd

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jun 7 18:12:23 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to recovery catalog database

 

RMAN> create catalog tablespace TBS_RMANTICKET;

recovery catalog created

RMAN>


使用RMAN 同时连接到数据库和恢复目录,把目标数据库注册到catalog目录中

 

[oracle@ticket-A ~]$ rman catalog rmangp/passwd@rmandb target sys/passwd@gpdb

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Jun 7 18:26:23 2010

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: GPDB (DBID=444338880)
connected to recovery catalog database
PL/SQL package RMANGP.DBMS_RCVCAT version 10.02.00.00 in RCVCAT database is not current
PL/SQL package RMANGP.DBMS_RCVMAN version 10.02.00.00 in RCVCAT database is not current

 

从上面的提示可以看到,遇到了些麻烦,提示版本不对,那就升级catalog目录

 

RMAN> upgrade catalog;

recovery catalog owner is RMANGP
enter UPGRADE CATALOG command again to confirm catalog upgrade

 

RMAN> upgrade catalog;

recovery catalog upgraded to version 10.02.00.04
DBMS_RCVMAN package upgraded to version 10.02.00.00
DBMS_RCVCAT package upgraded to version 10.02.00.00

 

RMAN> quit


Recovery Manager complete.

 

再重新使用RMAN 同时连接到数据库和恢复目录,这回就ok了

 

[oracle@ticket-A ~]$ rman catalog rmangp/passwd@rmandb target sys/passwd@gpdb

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Jun 7 18:28:56 2010

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: GPDB (DBID=444338880)
connected to recovery catalog database

RMAN>


把目标数据库注册到catalog目录中

 

RMAN> Register database;


最后就是写备份脚本,还有常规的监控脚本,然后做好定时任务就ok了

 

 

-----end-----

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值