Wednesday, August 24, 2011

Solution to ORA-01261: When Control Files are deleted.

I was trying to start my local DB, but suddenly it started throwing the following error:

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated

Later on figure out that control file is not there anymore and flash_recovery_area folder is corrupt.
From the following forum:
https://forums.oracle.com/forums/thread.jspa?threadID=431560&start=15&tstart=0

Figured out that following needs to be done:

1) SQL> startup nomount
2) SQL> create control file noresetlogs ...
3) SQL> alter database open;

The CREAT CONTROL FILE command that I used is as follows:

CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 50
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 'D:\oracle\product\10.2.0\oradata\orcl\REDO01.LOG' size 50m,
GROUP 2 'D:\oracle\product\10.2.0\oradata\orcl\REDO02.LOG' size 50m,
GROUP 3 'D:\oracle\product\10.2.0\oradata\orcl\REDO03.LOG' size 50m
DATAFILE
'D:\oracle\product\10.2.0\oradata\orcl\ATTRS1_OID.DBF',
'D:\oracle\product\10.2.0\oradata\orcl\BATTRS1_OID.DBF',
'D:\oracle\product\10.2.0\oradata\orcl\DEV_APM.DBF',
...
//List of all the DATA FILES except TEMP DATA FILES
...
'D:\oracle\product\10.2.0\oradata\orcl\UNDOTBS01.DBF',
'D:\oracle\product\10.2.0\oradata\orcl\USERS01.DBF'
CHARACTER SET WE8MSWIN1252
;

After following the above 3 steps, I was able to restart my DB.