Oracle Database Recovery

Once in my Company We face a serious disaster All our server crashes including the Oracle Server Located in BSNL, Gurgaon, India. The database has no backups and my boss asked me to recover the database. I really don't know how but I recovered the database.

How to recover a database having no backups?

Case: A database server crashed having no backups and not even any surity that the oracle file system i.e. the (.dbf files, Control files, the trace files are find or not).

Process :

1) First recover all the files i.e. System.dbf, Undo.dbf, Temp.dbf, all other .dbf files, control files, redolog files, trace files etc which are reqired to up the database.

2) Now put them in there perfect location means in the exact location where it stays before the database crash e.g. if the datafiles located in D:\ORCL\ then the files have to have in the same location of the new server.

3) You can get the information of the loaction of the files from either editing the control file or even fron the alert.log file.

4) Now after placing the files at there definite location and getting the database name and the instance name from alert.log file.

5) create a service for the Database.

oradim -new -sid AirtelDb -intpwd admin -pfile d:\AirtelDB\pfile\initAirtelDB.ora

6) Then login to sys

7) Open the database to mount mode.

8) Now pass the follwoing query to see the consistency of the database.

SQL> col checkpoint_change# format 9999999999999999999999

SQL> col controlfile_change# format 9999999999999999999999

SQL> select distinct checkpoint_change# from v$datafile_header;

CHECKPOINT_CHANGE#

-----------------------

8888129

SQL> select checkpoint_change#,controlfile_change# from v$database;

CHECKPOINT_CHANGE# CONTROLFILE_CHANGE#

----------------------- -----------------------

8888129 8888129

The Above queries will so the information from the header of the datafiles and the control files. If this values r same that means the datafiles r consistent.

9) Now pass the command

RECOVER DATABASE;

Hope fully u will get Media Recovery Successfull.

10) Then try to open the database.

ALTER DATABASE OPEN

11) If every thing r fine then database is recovered else some more work to do.

In my case there was a version problem also The previous database is on Oracle 9.0 and the current one which m using is Oracle 9.2 so there is some problem. Thats why I use the following command.

ALTER DATABASE OPEN MIGRATE

And this command works. The Database is recovered.