Using RMAN to unregister database


So every night, as part of my RMAN backups, I sync the controlfiles with the catalog after the backup is done, which by the way, is much faster than connecting to the catalog “while” the backup is being done.

Anyway, I now have two incarnations of yesterday’s clone in the catalog which can play havoc with my scripts when I query the catalog for RMAN backup information.  We need to get rid of the old incarnation.

Using the following method will not work on and after the example, I’ll show you what does work.

looking at what I have in the catalog:

526463  526745  DEVHT90  768942452 PARENT  17967527671 16:45:28 22-OCT-11

526463  526464  DEVHT90  768942452 CURRENT 18075529221 10:42:07 08-NOV-11

1491485 1491767 DEVHT90  799090106 PARENT  17967527671 16:45:28 22-OCT-11

1491485 1491486 DEVHT90  799090106 CURRENT 20771438544 09:03:04 16-OCT-12

let’s run this and see what happens:

RMAN> run {

 2> set DBID 768942452;

3> unregister database DEVHT90;

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found “unregister”:


I’ve tried this on both an and environment, and the run block is not working in either.

Instead, I simply removed the run block and ran the statements individually:

RMAN> set DBID 768942452;

executing command: SET DBID

database name is “DEVHT90” and DBID is 768942452

RMAN> unregister database DEVHT90;

database name is “DEVHT90” and DBID is 768942452

Do you really want to unregister the database (enter YES or NO)? yes

database unregistered from the recovery catalog



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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