RMAN Catalog Upgrade to Oracle 12.1.0.2

RMAN Catalog Upgrade to Oracle 12.1.0.2

Or

RMAN-06429: RCVCAT database is not compatible with this version of RMAN

OR

RMAN-07539: insufficient privileges to create or upgrade the catalog schema

Solution:

-- Open first terminal and creating a recovery catalog

[oracle@db1 ~]$ echo $ORACLE_SID

UPGR

[oracle@db1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 20 14:43:31 2016

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning and Automatic Storage Management options

SQL> CREATE USER rman IDENTIFIED BY tiger

TEMPORARY TABLESPACE temp

DEFAULT TABLESPACE USERS

QUOTA UNLIMITED ON USERS;

SQL> GRANT RECOVERY_CATALOG_OWNER TO rman;

[oracle@db1 ~]$ rman CATALOG rman/tiger@test_gridrep

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Dec 20 14:15:46 2016

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

connected to recovery catalog database

RMAN> CREATE CATALOG;

recovery catalog created

-- Open Second terminal to register 12c target database in 11g recovery Catalog

[oracle@db1 ~]$ echo $ORACLE_HOME

/opt/oracle/product/12.1.0.2

[oracle@db1 ~]$ echo $ORACLE_SID

TESTDB

[oracle@db1 ~]$ echo $TNS_ADMIN

/opt/oracle/product/12.1.0.2/network/admin

[oracle@db1 ~]$ cp /opt/oracle/product/11.2.0.3/network/admin/tnsnames.ora /opt/oracle/product/12.1.0.2/network/admin/

[oracle@db1 ~]$ rman target / catalog rman/tiger@test_gridrep

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Dec 20 14:36:40 2016

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

connected to target database: TESTDB (DBID=3467086113)

connected to recovery catalog database

PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.03 in RCVCAT database is too old

RMAN> register database;

PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.03 in RCVCAT database is too old

PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.03 in RCVCAT database is too old

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of register command at 12/20/2016 14:37:12

RMAN-06429: RCVCAT database is not compatible with this version of RMAN

-- Catalog version must be equal or gather than the target database, let’s upgrade catalog

RMAN> upgrade catalog;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-07539: insufficient privileges to create or upgrade the catalog schema

-- The problem is that for 12c the catalog owner requires additional privileges. The solution is to run the dbmsrmansys.sql script that comes with the 12c binaries. So you can just copy this file from 12c home to your recovery catalog database server and execute it

-- Go back to firs Window and execute dbmsrmansys.sql script

[oracle@db1 ~]$ echo $ORACLE_SID

UPGR

[oracle@db1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 20 14:43:31 2016

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning and Automatic Storage Management options

SQL> @/opt/oracle/product/12.1.0.2/rdbms/admin/dbmsrmansys.sql

SP2-0310: unable to open file "/opt/oracle/product/11.2.0.3/rdbms/admin/sqlsessstart.sql"

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Grant succeeded.

Grant succeeded.

Grant succeeded.

Grant succeeded.

Grant succeeded.

Grant succeeded.

Grant succeeded.

Grant succeeded.

SP2-0310: unable to open file "/opt/oracle/product/11.2.0.3/rdbms/admin/sqlsessend.sql"

-- Now go back to Second Terminal to try again

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 12.01.00.02

DBMS_RCVMAN package upgraded to version 12.01.00.02

DBMS_RCVCAT package upgraded to version 12.01.00.02

RMAN> register database;

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

-- You can check the catalog version using the following command

SQL> select * from rcver;

VERSION

------------------------------------

12.01.00.02

References:

Oracle Doc ID 2022782.1