Operating System - HP-UX
1752350 Members
6245 Online
108787 Solutions
New Discussion юеВ

Re: Restore and Recovery using RMAN

 
Yogeeraj_1
Honored Contributor

Re: Restore and Recovery using RMAN

hi,

The level 0 backup should normally contain all the required data files.

If you were running oracle 10g, you could have verified your RMAN backup by doing a test recovery (without actually recovering any data files) using the following command:

restore validate database;

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,

I think you are trying to simulate a disaster in your database, but, you are trying to restore rman backup into your last datafiles. These datafiles are up-to-date, so, probably rman is not restoring any block and when your try to recover, rman notice that this target date is older than datafiles' date. It would be better to remove some datafiles (for testing purposes, it's better to drop only data tablespaces - not system) and try to restore/recover this one.
Remember that, if you are in a real disaster situation, you probably lost your entire machine.

Regards,
Kaustubh Kane
Advisor

Re: Restore and Recovery using RMAN

To take the database back to the state when the backup was done, I am removing all the datafiles, control files and redo log files under u02, u03, u04, u05, u06, u07 and then performing a restore. It works fine, the changes made to the database after the backup was taken are not seen if restore is done in such a manner.

But I need to know if would have any side effects or serious impacts.

Please let me know.
Julio Yamawaki
Esteemed Contributor

Re: Restore and Recovery using RMAN

Hi,

Now you made a restore like in a disaster.
Well, to recover until a SCS or a date, you must recover this until ...
Please, let me know what commands are you using and also I'd like to know what oracle version are you using.

Regards,
Kaustubh Kane
Advisor

Re: Restore and Recovery using RMAN

Hi Julio,
Earlier I had tried the Incomplte Recovery (Point in time recovery). But it failed. Please find the details in my message dated Apr 23, 2007 06:12:44 GMT in this chain above. Please also find the Incomplete recovery commands in the same message.

The Oracle version is Oracle 9i and the release is 9.2.0.7.0.

About deleting database file:
I just manually removed the files under u02 to u07 and then restored using RMAN tool.
The restore command is:
RESTORE DATABASE

The recover database command is:
RECOVER DATABASE

As the Incomplete recovery did not work for me I used the procedure of deleting all the files u02 to u07 and then restoring to bring the database back to the state it when backup was taken (i.e. to not have the changes made to the database after the backup was taken)
Is this wrong?

Please let me know.





Julio Yamawaki
Esteemed Contributor

Re: Restore and Recovery using RMAN

Hi,

Can you post what commands you used to backup the whole database?
Let's start from the begning in order to clarify all your doubts.

Regards,
Kaustubh Kane
Advisor

Re: Restore and Recovery using RMAN

Hi Julio,

For performing database backup using RMAN I use the following commands:

Step 1: Backup Database
ALLOCATE CHANNEL C1 TYPE DISK;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP INCREMENTAL LEVEL=0 CUMULATIVE format '$dir/level0' DATABASE include curr
ent controlfile for standby FORCE;
BACKUP CURRENT CONTROLFILE format '$dir/control_primary' FORCE;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP ARCHIVELOG ALL format '$dir/archivelogs_%s_%t';

Step 2: Validate Restore
RESTORE DATABASE VALIDATE;

Regards,
Kaustubh Kane.
Julio Yamawaki
Esteemed Contributor

Re: Restore and Recovery using RMAN

Hi,

Your backup is perfect.
Now let's recover a tablespace:
1. Shutdown database
2. Remove a datafile (users or data)
3. Startup database - you will get ORA-1157 and ORA-1110, but database will mount
4. Call rman
5. Execute this sequence in RMAN:
RMAN> SQL 'ALTER DATABASE DATAFILE n OFFLINE'; => n is the datafile number
RMAN> OPEN DATABASE;
RMAN> RESTORE DATAFILE n;
RMAN> RECOVER DATAFILE n; => this will make a complete recover because you have all archivelogs and redologs
RMAN> SQL 'ALTER DATABASE DATAFILE n ONLINE';

This is the procedure for a complete recovery;
Try this one, after that, if you want a incomplete recovery procedure, I will send this for you.

Regards,