[原]配置RMAN恢复目录应注意兼容性
近日打算对灾备的Oracle备份进行优化,其中一项就是引入恢复目录(Recover Catalog)进行管理,但是在测试过程中遇到了一个问题,记录如下:
创建恢复目录所需要的表空间、相应的用户并赋予相应的权限:
create tablespace rman datafile '/u02/oradata/mydb/rman01.dbf' size 50M autoextend on logging segment space management auto extent management local; create user rman identified by rman default tablespace rman; alter user rman quota unlimited on rman; grant connect to rman; grant resource to rman; grant create any view to rman; grant recovery_catalog_owner to rman; revoke unlimited tablespace from rman;
在注册target为Oracle 11g(11.2.0.2)的数据库时出现了错误。
[oracle@test01 admin]$ rman target / catalog rman/rman@catalog Recovery Manager: Release 11.2.0.2.0 - Production on Tue Jan 18 10:29:33 2011 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1263384177) connected to recovery catalog database RMAN> create catalog ; recovery catalog created RMAN> register database ; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of register command on default channel at 01/18/2011 10:36:40 RMAN-10015: error compiling PL/SQL program RMAN-10033: error during compilation of job step 1: ORA-04023: Object RMAN.DBMS_RCVCAT could not be validated or authorized
经查证是RMAN的各组件之间的兼容性所导致的问题,下表转自:http://download.oracle.com/docs/cd/E11882_01/backup.112/e10643/compat003.htm#i634479
Table B-2 RMAN Compatibility Table
Target/Auxiliary Database | RMAN client | Recovery Catalog Database | Recovery Catalog Schema |
---|---|---|---|
8.0.6 |
8.0.6 |
>=8.1.7 |
>=8.0.6 |
8.1.7 |
8.0.6.1 |
>=8.1.7 |
>=8.1.7 |
8.1.7 |
8.1.7 |
>=8.1.7 |
>=RMAN client |
8.1.7.4 |
8.1.7.4 |
>=8.1.7 |
8.1.7.4 |
8.1.7.4 |
8.1.7.4 |
>=8.1.7 |
>= 9.0.1.4 |
9.0.1 |
9.0.1 |
>=8.1.7 |
>= RMAN client |
9.2.0 |
>=9.0.1.3 and <= target database executable |
>=8.1.7 |
>= RMAN client |
10.1.0 |
>=9.0.1.3 and <= target database executable |
>=9.0.1 |
>= RMAN client |
10.2.0 |
>=9.0.1.3 and <= target database executable |
>=9.0.1 |
>= RMAN client |
11.1.0 |
>=9.0.1.3 and <= target database executable |
>=10.2.0.3 |
>= RMAN client |
11.2.0 |
>=9.0.1.3 and <= target database executable |
>=10.2.0.3 |
>= RMAN client |
作为catalog的数据库版本是10.2.0.1,这就是问题所在。