Friday, November 30, 2012

How to Restore & Recover Whole Oracle Database


Your Oracle database may become inaccessible once it got corrupted then it will display an error message while accessing or performing any task on Oracle. The Oracle Database may get corrupt due to numerous reasons such as media failure, virus attack, hardware failure etc. Oracle Database has inbuilt utility that is RMAN (Recovery Manager) to restore & recover corrupt Oracle database.   

RMAN: You can use Recovery Manager Utility via command line and Enterprise Manager. The utility has many features which is not available in user-managed methods, such as parallelization of backup/restore data streams, backup files retention policy, and detailed history of all backups. 

Backup your database with RMAN:
You can use this step only if you have the necessary backups. You can Use the BACKUP command to back up your database & files. Type following command at the RMAN prompt:
RMAN> BACKUP DATABASE;

Recovering the Whole Database:
You can use the 'RESTORE DATABASE' and 'RECOVER DATABASE' commands to recover the whole database. 

To restore & recover the whole database by following command:

1. Place the database in a mounted state.

RMAN> STARTUP FORCE MOUNT;

2. Restore the database.

RMAN> RESTORE DATABASE;

3. Recover the database.

RMAN> RECOVER DATABASE;

4. Open the database, as shown in the following example:

RMAN> ALTER DATABASE OPEN;

But these methods only work if you have valid oracle database backup. If you don't have updated backup then you should use Oracle Database Recovery Software to repair corrupt Oracle database & files. This software is specially designed to work on corrupt Oracle database & repair corrupt database & its components in few easy clicks.  

I always preferred RMAN utility to backup & recover Oracle database. 

No comments:

Post a Comment