Tuesday, May 20, 2014

RMAN_CAT.DBMS_RCVCAT version 11.02.00.01 while registering in Catalog database

Version : Oracle 11.2.0.3.0
Target db :noasmdb
Catalog : testdb
Target Ip address : 10.10.1.10.
Catalog ip address : 172.27.5.212


Creating a recovery catalog in orcl database (catalog).

1.       Create tablespace in catalog database
SQL> create tablespace cats_tbs datafile 'E:\ORACLE\ORADATA\TESTDB\catalog.dbf'
size 150M autoextend on next 50M extent management local segment space managemen
t auto;

Tablespace created.


2.       Create user on catalog user and give necessary privileges

SQL> create user rman_cat identified by rman_cat default tablespace cats_tbs quo
ta unlimited on cats_tbs;

User created.


SQL> grant connect,resource,recovery_catalog_owner to rman_cat;

Grant succeeded.


3.       Test the connection
C:\Users\testsystem>rman catalog rman_cat/rman_cat@testdb

Recovery Manager: Release 11.2.0.1.0 - Production on Mon Feb 10 10:45:32 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN>

4.       Create the catalog now
C:\Users\testsystem>rman catalog rman_cat/rman_cat@testdb

Recovery Manager: Release 11.2.0.1.0 - Production on Mon Feb 10 10:45:32 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog tablespace "CATS_TBS";

recovery catalog created

RMAN>

5.       Register the database in catalog .
[oracle@vm1 admin]$ rman catalog rman_cat/rman_cat@testdb target=sys/sys@noasmdb

Recovery Manager: Release 11.2.0.3.0 - Production on Mon Feb 10 10:48:19 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NOASMDB (DBID=1704132256)
connected to recovery catalog database
PL/SQL package RMAN_CAT.DBMS_RCVCAT version 11.02.00.01 in RCVCAT database is not current
PL/SQL package RMAN_CAT.DBMS_RCVMAN version 11.02.00.01 in RCVCAT database is not current

Cause: The cause for the above error is our target database is recently upgraded to 11.2.0.3.9 and rman executable is upgraded. But this upgrade is not aware by the catalog database. 

Solution: For this, we have 2 solutions.

a.       Connect to catalog database ONLY from the target server using rman and upgrade the catalog.
[oracle@vm1 admin]$ rman catalog rman_cat/rman_cat@testdb

Recovery Manager: Release 11.2.0.3.0 - Production on Mon Feb 10 10:53:30 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database
PL/SQL package RMAN_CAT.DBMS_RCVCAT version 11.02.00.01 in RCVCAT database is not current
PL/SQL package RMAN_CAT.DBMS_RCVMAN version 11.02.00.01 in RCVCAT database is not current

RMAN> upgrade catalog;

recovery catalog owner is RMAN_CAT
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


b.      Do not use catalog database and use controlfile.

6.       Register the database

[oracle@vm1 admin]$ rman catalog rman_cat/rman_cat@testdb target=sys/sys@noasmdb

Recovery Manager: Release 11.2.0.3.0 - Production on Mon Feb 10 10:55:25 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NOASMDB (DBID=1704132256)
connected to recovery catalog database

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

7.       List the configuration in RMAN
RMAN> show all;

RMAN configuration parameters for database with db_unique_name NOASMDB are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_noasmdb.f'; # default

No comments:

Post a Comment