RMAN Catalog RC_BACKUP_FILES View access Issue

When I am trying to access RC_BACKUP_FILES view from our RMAN Catalog database,  getting following error ..

SQL> select count(*) from RC_BACKUP_FILES;
select count(*) from RC_BACKUP_FILES
*
ERROR at line 1:
ORA-20021: database not set
ORA-06512: at "RCAT_EMB.DBMS_RCVMAN", line 26137
ORA-06512: at "RCAT_EMB.RC_LBRECSETIMPL_T", line 69

Workaround:

It is usually more convenient to access this information using the LIST BACKUP and LIST COPY  commands from within RMAN.

We must use DBMS_RCVMAN.SetDatabase to select a database from the recovery catalog schema before you can use this view.


SQL> SELECT NAME,DBID FROM V$DATABASE;

NAME            DBID
--------- ----------
XXXXXX 3430087157                                                                                                                                                                        

DBID  => 3430087157

SQL> CALL DBMS_RCVMAN.SETDATABASE(null,null,null,3430087157,null);

Call completed.

SQL> select count(*) from RC_BACKUP_FILES;

  COUNT(*)
----------

     27762




-ANIL12CDBA


Comments

Popular posts from this blog

Useful OEM Queries to get Target details from OEM Repository

WARNING: Subscription for node down event still pending' in Listener Log

ORA-65139: Mismatch between XML metadata file and data file