Ao tentar executar um backup de um banco recentemente atualizado para 18C, recebi a seguinte mensagem:
PL/SQL package OWNER.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old
PL/SQL package OWNER.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of crosscheck command at 08/19/2020 11:09:25
RMAN-12010: automatic channel allocation initialization failed
RMAN-06429: RCVCAT database is not compatible with this version of RMAN
Encontrei o Oracle note “RMAN-06429: RCVCAT database is not compatible with this version of RMAN (Doc ID 2022782.1)“.

Nesta nota, é indicado a necessidade de se realizar um “UPGRADE CATALOG”. O detalhe é que o meu banco de catálogo está na versão 10.2.0.4, e durante o processo de atualização, um novo erro é reportado:
[user@hostname folder]$ rman target / catalog OWNER/*****@CAT10G
Recovery Manager: Release 18.0.0.0.0 - Production on Wed Aug 19 11:33:01 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTE (DBID=3671898123)
connected to recovery catalog database
PL/SQL package OWNER.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old
RMAN> register database;
PL/SQL package OWNER.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old
PL/SQL package OWNER.DBMS_RCVCAT version 11.02.00.04 in RCVCAT database is too old
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 08/19/2020 11:33:12
RMAN-06429: RCVCAT database is not compatible with this version of RMAN
RMAN> upgrade catalog;
recovery catalog owner is OWNER
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalog;
error creating dbms_rcvvpc package body
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06443: error upgrading recovery catalog
RMAN>
Por desconfiar se a minha versão de catálogo ainda é compatível com o meu target database, recorro à nota “RMAN Compatibility Matrix (Doc ID 73431.1)” e percebo que ainda estou dentro da matriz de compatibilidade.

Como no erro é mencionado que a package “dbms_rcvvpc” ficou com algum problema, tento recompilá-la manualmente e checo em detalhes o seu erro:
SQL> alter PACKAGE OWNER.DBMS_RCVVPC compile body;
Warning: Package Body altered with compilation errors.
SQL> show errors;
Errors for PACKAGE BODY OWNER.DBMS_RCVVPC:
LINE/COL ERROR
-------- -----------------------------------------------------------------
112/12 PLS-00801: internal error [*** ASSERT at file pdw4.c, line 5926;
Illegal defun (141) for name expression;
DBMS_RCVVPC__OW_NER__B__5447795[112, 12]]
SQL>
A partir deste erro mais detalhado, consigo chegar na nota “Bug 7322183 – PLS-00801: internal error ASSERT at file pdw4.c, line 5926, Illegal defun for name expression (Doc ID 7322183.8)” que reporta a existência de um bug nas versões 10.2.0.3 e 10.2.0.4 no banco de catálogo, na tentativa de fazer o upgrade, quando o target database está na versão 12.2 (porém, em chamado aberto, também confirmei que se aplicar para bancos 18C, que era o meu caso).


Nesta etapa, não existe muito o que se fazer. A única solução seria subir a versão do banco de catálogo de 10.2.0.4 para 10.2.0.5, ou migrar este owner específico para algum outros banco com versão mais recente, utilizando o recurso “IMPORT CATALOG”. Felizmente, eu possuía outro banco de catálogo com versão 12.2. Então eu fiz a criação de uma nova tablespace e owner no banco novo:
CREATE TABLESPACE TABLESPACE_TESTE DATAFILE
'+DISK_GROUP' SIZE 33M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
CREATE USER OWNER
IDENTIFIED BY *****
DEFAULT TABLESPACE TABLESPACE_TESTE
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- 3 Roles for OWNER
GRANT RECOVERY_CATALOG_OWNER TO OWNER;
GRANT CONNECT TO OWNER;
GRANT RESOURCE TO OWNER;
ALTER USER OWNER DEFAULT ROLE ALL;
-- 1 System Privilege for OWNER
GRANT UNLIMITED TABLESPACE TO OWNER;
-- 1 Tablespace Quota for OWNER
ALTER USER OWNER QUOTA UNLIMITED ON TABLESPACE_TESTE;
Tentando importar o catálogo:
[user@hostname~]$ rman target / catalog OWNER/***@CAT12C
Recovery Manager: Release 18.0.0.0.0 - Production on Wed Aug 26 09:22:54 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTE (DBID=3671898123)
connected to recovery catalog database
RMAN> IMPORT CATALOG OWNER/*****@CAT10G
2> ;
Starting import catalog at 26-AUG-20
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of import catalog command at 08/26/2020 09:23:44
RMAN-06428: recovery catalog is not installed
RMAN>
RMAN> create catalog;
recovery catalog created
RMAN> IMPORT CATALOG OWNER/*****@CAT10G;
Starting import catalog at 26-AUG-20
connected to source recovery catalog database
recovery catalog is partially upgraded to 18.05.00.00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of import catalog command at 08/26/2020 09:27:36
RMAN-06429: IMPCAT database is not compatible with this version of RMAN
RMAN>
O erro acima acontece pois um pré-requisito do import catalog não foi realizado. Link AQUI.

Ou seja, para importar o catálogo para outro banco, ele já precisa ter sofrido o “upgrade catalog”. Porém eu não conseguia fazer o upgrade por conta do bug. Desse modo, com respaldo do fornecedor, precisei fazer um export do owner de catálogo 10G e importá-lo no banco 12C, mesmo ele possuindo alguns objetos inválidos por conta do upgrade mal sucedido. Segue abaixo a importação do mesmo para abreviar o processo:
[user@hostname_novo EXP]$ impdp parfile=imp.par
Import: Release 12.2.0.1.0 - Production on Thu Aug 20 08:42:21 2020
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
Warning: possible data loss in character set conversions
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** parfile=imp.par
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"OWNER" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "OWNER"."BDF" 1.835 MB 15356 rows
. . imported "OWNER"."BP" 1.543 MB 7485 rows
. . imported "OWNER"."ROUT" 640.4 KB 7111 rows
. . imported "OWNER"."BRL" 709.0 KB 8864 rows
. . imported "OWNER"."BS" 625.4 KB 7485 rows
. . imported "OWNER"."RLH" 504.6 KB 8974 rows
. . imported "OWNER"."RSR" 109.4 KB 691 rows
. . imported "OWNER"."CFS" 107.2 KB 156 rows
. . imported "OWNER"."AL" 36.96 KB 123 rows
. . imported "OWNER"."BCF" 54.84 KB 616 rows
. . imported "OWNER"."BSF" 62.14 KB 1091 rows
. . imported "OWNER"."CKP" 8.242 KB 9 rows
. . imported "OWNER"."CONF" 6.976 KB 3 rows
. . imported "OWNER"."CONFIG" 5.257 KB 1 rows
. . imported "OWNER"."DB" 6.203 KB 2 rows
. . imported "OWNER"."DBINC" 7.242 KB 4 rows
. . imported "OWNER"."DF" 19.71 KB 49 rows
. . imported "OWNER"."NODE" 18.68 KB 2 rows
. . imported "OWNER"."OFFR" 9.648 KB 34 rows
. . imported "OWNER"."ORL" 8.843 KB 26 rows
. . imported "OWNER"."PDB" 7.812 KB 2 rows
. . imported "OWNER"."PDBINC" 7.5 KB 2 rows
. . imported "OWNER"."PDB_DBINC" 6.242 KB 4 rows
. . imported "OWNER"."RCVER" 4.953 KB 1 rows
. . imported "OWNER"."RT" 7.210 KB 4 rows
. . imported "OWNER"."SITE_DFATT" 8.664 KB 49 rows
. . imported "OWNER"."SITE_TFATT" 8.046 KB 8 rows
. . imported "OWNER"."TF" 8.781 KB 8 rows
. . imported "OWNER"."TS" 11.87 KB 55 rows
. . imported "OWNER"."TSATT" 8.867 KB 55 rows
. . imported "OWNER"."BCB" 0 KB 0 rows
. . imported "OWNER"."BCR" 0 KB 0 rows
. . imported "OWNER"."CCB" 0 KB 0 rows
. . imported "OWNER"."CCF" 0 KB 0 rows
. . imported "OWNER"."CDF" 0 KB 0 rows
. . imported "OWNER"."DELETED_OBJECT" 0 KB 0 rows
. . imported "OWNER"."DO_SEQ" 0 KB 0 rows
. . imported "OWNER"."FB" 0 KB 0 rows
. . imported "OWNER"."GRSP" 0 KB 0 rows
. . imported "OWNER"."NRSP" 0 KB 0 rows
. . imported "OWNER"."ORSEVENT" 0 KB 0 rows
. . imported "OWNER"."RCFILE" 0 KB 0 rows
. . imported "OWNER"."RR" 0 KB 0 rows
. . imported "OWNER"."RRCACHE" 0 KB 0 rows
. . imported "OWNER"."SBT_TEMPLATE_DB" 0 KB 0 rows
. . imported "OWNER"."SCR" 0 KB 0 rows
. . imported "OWNER"."SCRL" 0 KB 0 rows
. . imported "OWNER"."SERVER" 0 KB 0 rows
. . imported "OWNER"."TEMPRES" 0 KB 0 rows
. . imported "OWNER"."VPC_DATABASES" 0 KB 0 rows
. . imported "OWNER"."VPC_USERS" 0 KB 0 rows
. . imported "OWNER"."WATERMARKS" 0 KB 0 rows
. . imported "OWNER"."XAL" 0 KB 0 rows
. . imported "OWNER"."XCF" 0 KB 0 rows
. . imported "OWNER"."XDF" 0 KB 0 rows
. . imported "OWNER"."XMLSTORE" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/PACKAGE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
Processing object type SCHEMA_EXPORT/FUNCTION/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TYPE/TYPE_BODY
ORA-39082: Object type TYPE_BODY:"OWNER"."RC_LBRECSETIMPL_T" created with compilation warnings
ORA-39082: Object type TYPE_BODY:"OWNER"."RC_LBRECSETIMPL_T" created with compilation warnings
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
ORA-39082: Object type VIEW:"OWNER"."RC_RMAN_BACKUP_SUBJOB_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_RMAN_BACKUP_JOB_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_SET_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_PIECE_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_COPY_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_PROXY_COPY_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_PROXY_ARCHIVELOG_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_DATAFILE_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_CONTROLFILE_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_ARCHIVELOG_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_SPFILE_DETAILS" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_SET_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_DATAFILE_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_CONTROLFILE_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_ARCHIVELOG_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_SPFILE_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_BACKUP_COPY_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_PROXY_COPY_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_PROXY_ARCHIVELOG_SUMMARY" created with compilation warnings
ORA-39082: Object type VIEW:"OWNER"."RC_UNUSABLE_BACKUPFILE_DETAILS" created with compilation warnings
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 23 error(s) at Thu Aug 20 08:43:51 2020 elapsed 0 00:01:25
[user@hostname_novo EXP]$
Uma vez importado no novo banco de catálogo 12C, posso proceder com o upgrade catalog:
[user@hostname ~]$ rman target / catalog OWNER/****@CAT12C
Recovery Manager: Release 18.0.0.0.0 - Production on Thu Aug 20 08:44:35 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTE (DBID=3671898123)
connected to recovery catalog database
recovery catalog is partially upgraded to 18.05.00.00
RMAN> upgrade catalog;
Oracle error from recovery catalog database: ORA-06550: line 1, column 41:
PLS-00201: identifier 'DBMS_RCVMAN.GETPACKAGEVERSION' must be declared
ORA-06550: line 1, column 34:
PL/SQL: Statement ignored
recovery catalog owner is OWNER
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalog;
recovery catalog is partially upgraded to 18.05.00.00
recovery catalog upgraded to version 18.05.00.00.00
DBMS_RCVMAN package upgraded to version 18.05.00.00
DBMS_RCVCAT package upgraded to version 18.05.00.00.
RMAN>
Realizando o register do database e validando se o comando report schema lista todos os arquivos do banco:
[user@hostname folder]$ rman target / catalog OWNER/****@CAT12C
Recovery Manager: Release 18.0.0.0.0 - Production on Thu Aug 20 08:48:14 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTE (DBID=3671898123)
connected to recovery catalog database
RMAN> report schema;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 08/20/2020 08:48:23
RMAN-06004: Oracle error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> report schema;
Report of database schema for database with db_unique_name TESTE
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 960 SYSTEM YES +DISK_TESTE/TESTE/DATAFILE/system.256.100521234
2 5790 SYSAUX NO +DISK_TESTE/TESTE/DATAFILE/sysaux.257.100546742
3 544 UNDOTBS1 YES +DISK_TESTE/TESTE/DATAFILE/undotbs1.257.10052747473
4 1568 UNDOTBS2 YES +DISK_TESTE/TESTE/DATAFILE/undotbs2.259.100247447
5 5 USERS NO +DISK_TESTE/TESTE/DATAFILE/users.258.102572474
6 1050 OWNER_MDS NO +DISK_TESTE/TESTE/DATAFILE/owner_mds.261.10027554754
7 60 OWNER_IAU NO +DISK_TESTE/TESTE/DATAFILE/owner_iau.262.10063673467
8 130 OWNER_IAS_UMS NO +DISK_TESTE/TESTE/DATAFILE/owner_ias_ums.263.100644564
9 60 OWNER_WLS NO +DISK_TESTE/TESTE/DATAFILE/owner_wls.264.10063467467
10 10 OWNER_STB NO +DISK_TESTE/TESTE/DATAFILE/owner_stb.265.100675344574
11 100 OWNER_ESS NO +DISK_TESTE/TESTE/DATAFILE/owner_ess.266.1006247257
12 120 OWNER_IAS_OPSS NO +DISK_TESTE/TESTE/DATAFILE/owner_ias_opss.267.100257247247
13 5250 OWNER_SSS NO +DISK_TESTE/TESTE/DATAFILE/owner_sss.268.100257247547
14 240 OWNER_APP NO +DISK_TESTE/TESTE/DATAFILE/owner_app.259.10053257457574
15 20 OWNER_AUDIT NO +DISK_TESTE/TESTE/DATAFILE/owner_audit.260.10257247247
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 1024 TEMP 10240 +DISK_TESTE/TESTE/TEMPFILE/temp.258.100457435747
2 100 OWNER_IAS_TEMP 32767 +DISK_TESTE/TESTE/TEMPFILE/owner_ias_temp.261.1275457275427
RMAN>
A partir disso, é possível ver que não há mais objetos inválidos no owner do catálogo do rman do banco 12C, por conta do upgrade bem sucedido. Além disso, os backups são realizado com sucesso.
...
channel CANAL1: backup set complete, elapsed time: 00:00:35
Finished backup at 27-AUG-20
...
Starting Control File and SPFILE Autobackup at 27-AUG-20
piece handle=c-3671898825-20200827-0b comment=API Version 2.0,MMS Version 5.0.0.0
Finished Control File and SPFILE Autobackup at 27-AUG-20
...