High Availbility

OS & Virtualization

Wednesday, April 09, 2008

Steps of recovering database using Rman from a barebone system. (ie you have lost everything). This is tested on Oracle 10g database.

For setting up Rman, you should set controlfile autobackup on.

Before you do this, you need to create the oradata and admin (bdump, cdump...) directories.


C:\>rman target /
connected to target database: orcl2 (not mounted)

RMAN> set dbid=632410335
RMAN> startup nomount;
RMAN> set controlfile autobackup format for device type disk to 'c:\backup\%F';
RMAN> restore spfile from autobackup;
RMAN> restore controlfile from autobackup;
RMAN> startup force mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;