Operating System - HP-UX
1752277 Members
4463 Online
108786 Solutions
New Discussion юеВ

Re: Restore and Recovery using RMAN

 
Kaustubh Kane
Advisor

Restore and Recovery using RMAN

Hi,

I am working on a system where we restore the Oracle 9i database using the RMAN utility.

For restore database we issue:
RESTORE DATABASE;

After the restore we Recover database using the RMAN command:
RECOVER DATABASE;

From the help docs I have read the RECOVER DATABASE will update the datafiles using redo records i.e. records of changes made to the database after the backup was taken.

But at times it is expected that the database be restored to the state it was when the backup was taken i.e. we do not need RECOVER DATABASE.

In such a situation I am thinking of just executing the RESTORE DATABASE and skipping the RECOVER DATABASE step.
Is it advisable to do so? This is DBA specific and I am new to this area hence I need your opinion. Please let me know.

Regards,
Kaustubh Kane.
17 REPLIES 17
Peter Godron
Honored Contributor

Re: Restore and Recovery using RMAN

Hi,
and welcome to the forums !

Not sure I understand. Why would you want to restore your database to the last backup, unless it is to create a known test environment ?

If you only restore without adding the entries from the log files, you would need to clear down the log files, or allow them to be overwritten.

Oracle experts to the front, please.

Please read:
http://66.34.90.71/ITRCForumsEtiquette/after.html

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

Re: Restore and Recovery using RMAN

Hi Kaustubh,

What's the use of doing RMAN backup then?

If this is your requirement, just shutdown the database before you do your backup and then when you have to recover, you just have to recover the files and lose all the transactions that might have been done since your backup and the time you are doing the recovery.

Not sure about what you are trying to archive here.

The ideal method of what you are trying to do is to flashback the database.

Please clarify on your main objective.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Julio Yamawaki
Esteemed Contributor

Re: Restore and Recovery using RMAN

Hi,

If you want to just restore the database without recovering, you MUST use datafile copy when backup is done.
Then you just restore the datafiles and they will be ready to startup.
If you make a normal BACKUP, you allways have to RECOVER the database (complete or incomplete). In this case, you will be able to recover to a point in time (this time can be when you make this backup).


Regards,
Peter Godron
Honored Contributor

Re: Restore and Recovery using RMAN

Hi,
if this problem is resolved, could you please award points to useful answers and then close the thread, summarising the solution used.
http://forums1.itrc.hp.com/service/forums/helptips.do?#40
Kaustubh Kane
Advisor

Re: Restore and Recovery using RMAN

Julio,
To RECOVER the database using point in time recovery to the time the backup was taken is almost not to perform any RECOVERY.

So can I skip the REOVER DATABSE step and then open the database with RESET LOGS option.
For e.g.

Please let me know.

Regards,
Kaustubh Kane.
Julio Yamawaki
Esteemed Contributor

Re: Restore and Recovery using RMAN

Hi,

Normally, when you restore a backup, you will restore datafiles and control files (and, of course archivelogs, but it's not teh case).
After restoring, you will need to open the database (this will be in MOUNT state until this moment) with resetlogs because of the redologs, in order for these to stay in the same incarnation of the rest of the database files.
If you are not using raw devices or ASM, you'd better make a full backup with the database closed. In this case, you just restore backup and startup the database.

Regards,

Kaustubh Kane
Advisor

Re: Restore and Recovery using RMAN

I tried the Incomplete Recovery (Point in Time Incomplete Recovery) after doing database restore. But it failed.

I did the following:
Step1: RESTORE DATABSE.

Step2: SQL 'ALTER SESSION SET NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"';
SET UNTIL TIME 'Apr 23 2007 11:10:41';
RECOVER DATABASE;

The above gave an error while performing the Incomplete Recovery. The error is as follows:
RMAN-03002: failure of recover command at 04/23/2007 11:31:58
RMAN-06555: datafile 1 must be restored from backup created before 23-APR-07

Please advice me on this.

Regards,
Kaustubh Kane
Julio Yamawaki
Esteemed Contributor

Re: Restore and Recovery using RMAN

Hi,

See this error message:
RMAN-06555: datafile 1 must be restored from backup created before 23-APR-07
It means that this datafile was created AFTER 23-APR-07, in order to perform a recover, you MUST have a datafile BEFORE the target date.

Regards,
Kaustubh Kane
Advisor

Re: Restore and Recovery using RMAN

Hi,
The database backup which we perform is a level 0 cumulative backup. From the info I recived this is equivalent to full backup. Hence all the datafiles should be present in the backup image. Is this correct?

When I would restore this image then all the datafiles should get restored in the RESTORE DATABASE step. (i.e. also the datafile which gave me error).

Is this correct, please confirm my understanding?

The Recovery I tried was Incomplete (Point in Time) and time specified was the time when the backup was taken.

In this case why should it try to recover the datafile 1.

Waiting for your kind reply.

Regards,
Kaustubh