Oracle 19c RMAN Recovery Catalog Upgrade error RMAN-07539

After successfully upgrading an Oracle database to 19c release, the following error was thrown after attempting to upgrade the recovery catalog:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-07539: insufficient privileges to upgrade the catalog schema

SOLUTION:

connect to Recovery Catalog Database, and grant recovery catalog user the following permissions :

SQL> grant CREATE ANY CONTEXT to catalog_user;

SQL> grant drop ANY CONTEXT to catalog_user;

Then, go to the 19c upgraded database and upgrade the catalog:

rman target /

RMAN> connect catalog catalog_user/XXXXXX@catalogdb

RMAN> upgrade catalog;

RMAN> upgrade catalog;

I hope this helps !