Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: control file vs redo log files
In article <DbgW5.376383$4d.47228597_at_news02.optonline.net>,
your question is not very descriptive
it very much depends on how your database crashes, I assuems that your whole database crashes with control file lost
the lost of control file is most worst scenario,
but following are the steps which would help you when you lost the control file
Lost:
 All or one datafile.
 Control file.
 Online redo log files.
Retain:
 All archived log files, from the point of when last backup of all
datafiles was taken.
 backup of all datafiles.
What to recover:
We want to recover the whole database up to the point of failure.
Recovery Steps:
 First of all shutdown the database if database is open.
 Restore only the datafiles from the latest backup.
 Open the database in nomount mode.
 Recreate the control file from “create controlfile” command which is
saved in the trace file, this command is saved in the trace file as a
result of the alter database command which is issued by DBA when
database was in consistent from and was open. You can write the same
command from your own but the command in the trace file contains exact
structural information of the database so it is recommended that one
should use the create controfile command from the trace file.
An example of the create controlfile command is as follows, you can issue this command on the sever manager prompt.
CREATE CONTROLFILE REUSE DATABASE "P24ORA8I" NORESETLOGS ARCHIVELOG
MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXDATAFILES 32 MAXINSTANCES 16 MAXLOGHISTORY 1630 LOGFILE GROUP 1 'E:\ORACLE8I\ORADATA\P24ORA8I\REDO04.REDOLOG' SIZE 1M, GROUP 2 'E:\ORACLE8I\ORADATA\P24ORA8I\REDO03.REDOLOG' SIZE 1M, GROUP 3 'E:\ORACLE8I\ORADATA\P24ORA8I\REDO02.REDOLOG' SIZE 1M, GROUP 4 'E:\ORACLE8I\ORADATA\P24ORA8I\REDO01.REDLOG' SIZE 1M DATAFILE ‘E:\ORACLE8I\ORADATA\P24ORA8I\SYSTEM01.DBF', 'E:\ORACLE8I\ORADATA\P24ORA8I\USERS01.DBF', 'E:\ORACLE8I\ORADATA\P24ORA8I\RBS01.DBF','E:\ORACLE8I\ORADATA\P24ORA8I\TEMP01.DBF', 'E:\ORACLE8I\ORADATA\P24ORA8I\OEMREP01.DBF',
'E:\ORACLE8I\ORADATA\P24ORA8I\INDX01.DBF', 'E:\ORACLE8I\ORADATA\P24ORA8I\PRACTICE.DBF' CHARACTER SET WE8ISO8859P1;
This command will do the two things, first it recreates a control file in the location which is specified in the init.ora file and second it mount the database.
 Issue the recover database command on the server manager prompt as
follows.
SET AUTORECOVERY ON; RECOVER DATABASE USING BACKUP CONTROL FILE UNTIL CANCEL;
It is quite possible that you might get some errors that” recovery
session canceled” , because the oracle is unable to find the archived
log file which is suggested by the oracle itself. Ignore these errors,
because the recovery session has recovered the database upto the point
of failure.
 Open the database by issue the following command on the server
manager.
ALTER DATABASE OPEN RESETLOGS;
This command will do the two actions, it will open the database and
simultaneously it recreated the online redo log files.
 Once you have open the database successfully, you have recovered the
database.
Confirmation:
You can confirm the database recovery by checking the required data which was updated the last time before the database failure. If your database have got that specific data then your recovery is successful.
but remember that if once you have issued the resetlog command then you will not be able to use the new log file becuase the log sequecne number has beem reset in the control file.
To my personnel experience you cannot use the log files newwer than control file ,
but becare full in using the resetlog command becuase if once you use this command you cannot be roll back to condition before that.
This thing could be help full to you
Fsheem rao
"wayne" <pdxbq_at_yahoo.com> wrote:
> What will happen if the redo log files are newer than control files
when
> doing recovery? > > Thanks in advance. > > Wayne > >
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sun Dec 03 2000 - 02:46:57 CST
![]() |
![]() |