Unregistered Database From RMAN Catalog
If we need to unregister database from recovery catalog so we have two option-
1> Need to connect from target server and using RMAN easily we can unregister.
2> Suppose in a case if we dont have database(someone dropped) and we need to clear this from rman catalog server then
Sol-
Connect to rman catalog server, then connect to rman user or whatever is catalog user we have then do needful as below.
SQL> Conn rman/rman
Below is the query by which we will get command which we need to execute, so we need to pass DB_NAME in my case DB_NAME is TEST.
SQL> select 'EXECUTE dbms_rcvcat.unregisterdatabase('||db_key||','||dbid||');' FROM rc_database WHERE name in('TEST') ;
SQL> 'EXECUTEDBMS_RCVCAT.UNREGISTERDATABASE('||DB_KEY||','||DBID||');'
--------------------------------------------------------------------------------
EXECUTE dbms_rcvcat.unregisterdatabase(36631376,3102016920);
SQL> select db_key,DBID,NAME from rc_database where name='TEST';
DB_KEY DBID NAME
---------- ---------- --------
36631376 3102016920 TEST
SQL>EXECUTE dbms_rcvcat.unregisterdatabase(36631376,3102016920);
PL/SQL procedure successfully completed.
No comments:
Post a Comment