Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Control Files not available after restoring the data from backup

Vinay Prasanna
Occasional Visitor

Control Files not available after restoring the data from backup

The Autoraid attached to one of our K460 Servers has a multiple disk failures and the data was lost. Ultimately we had to format the array, Recreate the Filesystems and restored data from the backup. The Database related filesystems were restored, but looks like the control files at all the three locations were missing. Somehow, the control files are missing from the cold backup. Is there any way to bring up the Database?
3 REPLIES
Peter Godron
Honored Contributor

Re: Control Files not available after restoring the data from backup

Hi,
and welcome to the forums !

If you have lost all controlfiles you are best off going to another machine with same dblevel and copying :

alter database backup controlfile to trace;

then take the file from the trace directory, ship it to the failed machine and change the controlfile to reflect your machine locations.

And get your backup changed ;-)

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
Volker Borowski
Honored Contributor

Re: Control Files not available after restoring the data from backup

Hello,

if the backup was a cold one, you should be able to recreate the controlfiles.
But first of all check if it is not only a permission problem.
What about the online logs?
Are they in place ?

You can create a template for a
CREATE CONTROLFILE statement
as already said, or you can google for a syntax graph and fill in all by yourself.
Be sure about the correct CHARSET !
Be sure not to miss a datafile in your statement.
Do consistency checks after you are ready.

DB-verify and "analyze table .... validate structure cascade" are tools to do this.

If you do not have corresponding onlinelogs, it might be neccessary to "open resetlogs" the DB to recreate them (?) Currently i am not sure if you can recreate onlinelogs in MOUNT state (?) Better you have them.

It might be neccessary to recreate tempfiles as well after you opened the DB.

Volker
Yogeeraj_1
Honored Contributor

Re: Control Files not available after restoring the data from backup

hi,
if you know the location of your data files and redolog files, you can use the "create control file" command to create a new control file.

e.g.
CREATE CONTROLFILE REUSE DATABASE "MYDB" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 50
MAXLOGMEMBERS 3
MAXDATAFILES 300
MAXINSTANCES 8
MAXLOGHISTORY 500
LOGFILE
GROUP 1 '/u01/oracle/mydb/dbs/log1p716.dbf' SIZE 1M,
GROUP 2 '/u01/oracle/mydb/dbs/log2p716.dbf' SIZE 1M,
GROUP 3 '/u01/oracle/mydb/dbs/log3p716.dbf' SIZE 1M
DATAFILE
'/u01/oracle/mydb/dbs/systp716.dbf' SIZE 40M,
'/u01/oracle/mydb/dbs/tempp716.dbf' SIZE 1M,
'/u01/oracle/mydb/dbs/toolp716.dbf' SIZE 15M ;


Basically, your step would be:
The complete procedure follows:

1. Take a full backup of the database, including all datafiles and redo log files.

2. Go into SQLPLUS and do a STARTUP NOMOUNT.

3. Issue the CREATE CONTROLFILE statement.

4. Perform media recovery on the database.
sqlplus> recover database;

5. Open the database.
sqlplus> alter database open;

6. At the first opportunity, shut the database down and take a full cold backup.


hope this helps!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)