Thursday, December 3, 2009

RMAN Recovery Scenario

SCENARIO: Server Crash, same server was used for catalog database. Now we have RMAN backup, DBID. Db files(ctl, bdf, tmp,log, spfile) and catalog db is not available.

How are we going to recover the database???

We'll assume that we are performing the restore & recovery on a new server having the same environment setup(OS, oracle software, etc) as the crashed server.

CONDITIONS:

For successful restore, the controlfile record keep time must suffice the backup set.

We must know the DBID.

We must have the RMAN backups and know the latest autobackup information.

STEPs:

Start RMAN without Catalog

rman target / nocatalog

RMAN> set dbid=1439101873

RMAN> startup nomount;

It will show error as spfile not found, along with starting instance with basic parameters. Now restore spfile & controlfile from autobackup, specify location as we do not have catalog database.

RMAN> restore spfile from '/ora100base/admin/mydb/rman/bkups/c-10330…';

RMAN> restore controlfile from '/ora100base/admin/mydb/rman/bkups/c-10330…';

RMAN> restore database;

RMAN> sql 'alter database mount';

RMAN> recover database noredo; (as we don't have the current redo logs)

RMAN> sql 'alter database open resetlogs';

Again for using catalog db just connect to catalog database and resync catalog.

rman connect / target catalog rman/rman@rcatdb

RMAN> resync catalog;