Monday, April 8, 2013

Creating Control File Manually in 11g

In this post I'll show you to recover the control file in case of lost of its backup. To create a control file manually you must have known the path of your log files and data files.
I'll simulate the same case and will create a test table in order to check whether the data loss happens or not once the database will get back to its normal stage.

Lets simulate.

I'll create a table "TEST" by user scott.


























Now take the database backup including archived logs.



























Determine the Log file and Data File path and remove the control file from OS level.

















Shutdown the database and start it in nomount mode.











Now create the control file manually.














Control file creation failed as it is saying the in Resetlog mode you have to define the log file size.














When I open the database in resetlogs mode then I got the ORA-01194 error.
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/db1/system01.dbf'

You can see this with below snapshot.









Time to incomplete recovery.














































Incomplete Recovery is completed. Lets open the database with resetlogs mode and check the "test" table for any data loss.
















Immediately take the database backup once the DB is up. Below are the snippet of database backup.































Thanks for your time. Cheers!!!

No comments:

Post a Comment