rman und die falschen Paketversionen nach einem Oracle-Upgrade

Nachdem die Oracle Datenbank erfolgreich upgegraded wurde beschwert sich der rman pötzlich, dass die Pakete RMAN.DBMS_RCVCAT sowie RMAN.DBMS_RCVMAN in einer veralteten Version vorliegen:

rman target / catalog $(cat .MeineGeheimenPassworte.inc)

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Dec 10 11:42:41 2015

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

connected to target database: S01 (DBID=1411928928)
connected to recovery catalog database
PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.03 in RCVCAT database is not current
PL/SQL package RMAN.DBMS_RCVMAN version 11.02.00.03 in RCVCAT database is not current

RMAN>

Ein register database oder ein resync catalog laufen gleich auf Fehler:

RMAN> register database;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 12/10/2015 11:44:06
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 12/10/2015 11:44:06
RMAN-10015: error compiling PL/SQL program
RMAN-10014: PL/SQL error 0 on line 3309 column 3: Statement ignored
RMAN-10014: PL/SQL error 302 on line 3309 column 22: component 'GETPOLLEDREC' must be declared
RMAN-10014: PL/SQL error 0 on line 2345 column 6: Statement ignored
RMAN-10014: PL/SQL error 306 on line 2345 column 13: wrong number or types of arguments in call to 'BEGINRMANOUTPUTRESYNC'
RMAN-10014: PL/SQL error 0 on line 1195 column 9: Statement ignored
RMAN-10014: PL/SQL error 302 on line 1195 column 25: component 'ISROUTDUPLICATERECORD' must be declared

RMAN>
RMAN> resync catalog;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 12/10/2015 11:44:17
RMAN-10015: error compiling PL/SQL program
RMAN-10014: PL/SQL error 0 on line 3309 column 3: Statement ignored
RMAN-10014: PL/SQL error 302 on line 3309 column 22: component 'GETPOLLEDREC' must be declared
RMAN-10014: PL/SQL error 0 on line 2345 column 6: Statement ignored
RMAN-10014: PL/SQL error 306 on line 2345 column 13: wrong number or types of arguments in call to 'BEGINRMANOUTPUTRESYNC'
RMAN-10014: PL/SQL error 0 on line 1195 column 9: Statement ignored
RMAN-10014: PL/SQL error 302 on line 1195 column 25: component 'ISROUTDUPLICATERECORD' must be declared

Was hier weiter hilft ist einfach ein Upgrade des Catalogs:

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.04
DBMS_RCVMAN package upgraded to version 11.02.00.04
DBMS_RCVCAT package upgraded to version 11.02.00.04

RMAN>

Und schon haben die Pakete ein Versionsupgrade erfahren.

Bei einem anschließenden resync catalog kommt es dann aber zu einem Fehler.

RMAN> resync catalog;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 12/10/2015 11:55:14
RMAN-20020: database incarnation not set

RMAN>

Mittels list incarnation kann man sich zwar zeigen lassen welche Datenbankinkarnationen es gibt, ein einfaches unregister database gefolgt von einem register database hilft hier dann weiter:

RMAN> unregister database;

database name is "S01" and DBID is 1411928928

Do you really want to unregister the database (enter YES or NO)? Yes


database unregistered from the recovery catalog

RMAN>

About the author