tags:

views:

97

answers:

2

Hi all, I want to restore and recover my oracle database to the current state.

For example, I have a full backup on Sunday and I have all archive logs from Sunday to Wednesday.

If I restore and recover from backup to the new host, my database is in the state of Sunday only.

How can I apply all archive logs I have to recover my database to the state of Wednesday?

Do I need controlfile autobackup on Sunday or the current one on Wednesday?

Please give me steps to do this.

Regards, Sarith

A: 

You haven't said what version of oracle you are using, the version you are using, and the backup strategy you have in place will effect how exactly you recover.

You need to read and understand the Backup and Recovery Manual

If this is actually a production issue, then you need to contact Oracle support right now, this isn't the time to make mistakes or learn on the job.

Matthew Watson
A: 

Restore the full backup to the new server and all the new archive log files that you want to restore.

See note: 161742.1 (How To Roll Forward The Database Using a Old Control File, With Archivfiles) in metalink for a complete guide but I'm going to paraphrase it.

If you do not have access to metalink then here is the text from that note abreviated:

start db in mount mode SQLPLUS> startup mount

Issue the command to start the recovery and apply all the archivelog files that are newer than the control/datafiles restored.

SQLPLUS> alter database recover until cancel using backup controlfile;

use this command to continue until you run out of archivelog to apply. SQLPLUS> alter database recover continue default;

when you run out of archivelogs to apply stop the recovery and open the database with reset logs.

SQLPLUS> alter database recover cancel; SQLPLUS> alter database open resetlogs;

its important to take a new backup now as old archive logs will not be able to be used with this db since you've reset the logs.

As stated by the other poster, read the backup recovery manual for more info.

MichaelN
That's alright. Thank U.But if I have some redo data in my redo log file, how can I roll it forward to my restored database?Best regards,Sarith
Sarith