Lost control file, So what?

Recently got involved in couple conversations regarding common “RULE OF THUMB” about backing up control file, and double backup of control file backup etc..

I guess its good thing to do, its does not take much space anyway, but if you lost it or control file got corrupted, and do not have backup, how big deal is it?

If you remember your database character set and have access to filesystem/ASM to find where datafiles and redo logs are – not really big deal.

STARTUP NOMOUNT;

CREATE CONTROLFILE REUSE DATABASE "DBNAME" NORESETLOGS ARCHIVELOG
 MAXLOGFILES 16
 MAXLOGMEMBERS 3
 MAXDATAFILES 1000
 MAXINSTANCES 8
 MAXLOGHISTORY 292
LOGFILE
 GROUP 1 '/path/to/redo/file' SIZE 512M BLOCKSIZE 512, ...
DATAFILE
 '/path/to/data/file',...
CHARACTER SET <DB character set>

RECOVER DATABASE;

ALTER DATABASE OPEN;

No need to even RESETLOGS if redo logs are still available, so – ZERO data loss!

Some rman metadata could be lost, but most of it could be registered back by:

RMAN> CATALOG START WITH '/directory/where/backups/are/'

Same thing for registering back archive logs:

RMAN> CATALOG START WITH '/directory/where/archlogs/are'

Used it couple times, worked as a charm.

The only restrictions: all files mentioned “create control file” statement has to exists, as oracle probe their headers to get SCN and other metadata. If that is not met, better bet on restore of control file from binary backup.

Advertisements
This entry was posted in Oracle, SQL and tagged , , , , , , , . Bookmark the permalink.

2 Responses to Lost control file, So what?

  1. Thank you for posting this awesome article. I will come back for sure to check your future articles!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s