ORA-00904: “SYS”.”DBMS_RCVMAN”.”NUM2DISPLAYSIZE”: invalid identifier

SYMPTOM

The following errors occurred from 11.2.0.4 standby databases:

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
MOUNTED

SQL> select * from v$rman_backup_job_details;
select * from v$rman_backup_job_details
 *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-00904: "SYS"."DBMS_RCVMAN"."NUM2DISPLAYSIZE": invalid identifier

CAUSE

The problem is that DBMS_RCVMAN and other packages are not initialized when database in MOUNT mode, only in OPEN mode, hence the error when using SYS.DBMS_RCVMAN

dbms_rcvman package is not loaded in memory until database is open or RMAN client is ran explicitly.

SOLUTION

This error is expected because the standby instances are in MOUNT mode and the DBMS_RCVMAN does not get initialized.

Workaround: just make a call to rman before running the query in the Standby database.  This will initialize the DBMS_RCVMAN package.

SQL> select * from v$rman_backup_job_details;
select * from v$rman_backup_job_details
 *
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-00904: "SYS"."DBMS_RCVMAN"."NUM2DISPLAYSIZE": invalid identifier


SQL> exit

$ rman target /

RMAN> exit

$ sqlplus / as sysdba

SQL> select * from v$rman_backup_job_details;
...
..
.
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: