Home » RDBMS Server » Backup & Recovery » RMAN recovery to DR with Roll-forward (Oracle 10.2.0.2)
RMAN recovery to DR with Roll-forward [message #348003] Mon, 15 September 2008 06:28 Go to next message
marcelthompson
Messages: 5
Registered: September 2008
Location: UK
Junior Member
I have setup a flash recovery area (FRA) on a NAS system attached to my main oracle server and have setup archiving so that archivelogs are copied to both the FRA and local disks.
I have then set the following RMAN parameters:

CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2000m;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;

I have run a backup database plus archivelog which puts the relevant files into the FRA.

The NAS device is replicated to a secondary DR (Disaster recovery) NAS device attached to a DR server that is a clone of the primary live oracle server.

I then run the following sequence of commands on the DR box to simulate a DR restore scenario:

rman target sys/<password>
set dbid=<dbid of source database>
startup nomount
restore controlfile from autobackup;
alter database mount;
restore database; recover database;

This works fine apart from it ignores all archived redo logs generated after the backup was taken. I have tried restore until sequence 999999 and various other options.

I am trying to get the old fashioned functionality of recover using backup controlfile until cancel so that it rolls forward from the last full backup.

I was toying with using duplicate and standby options but would prefer to use the NAS to NAS replication. Any ideas on what what I've forgotten to do to get this to work would be appreciated.

Re: RMAN recovery to DR with Roll-forward [message #348007 is a reply to message #348003] Mon, 15 September 2008 06:56 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
This works fine apart from it ignores all archived redo logs generated after the backup was taken.

As you restore the control file, the last SCN to recover is the one that is recorded in the backed up control file and can't be those after it has been created.
If you want to recover after you have to:
- either use the current control file
- either manually recover "using backup controlfile"

Regards
Michel
Re: RMAN recovery to DR with Roll-forward [message #348040 is a reply to message #348007] Mon, 15 September 2008 08:25 Go to previous messageGo to next message
marcelthompson
Messages: 5
Registered: September 2008
Location: UK
Junior Member
Thanks Michel, I know this is the way traditional backup & recovery works and you have confirmed what I thought was happening. I was hoping that RMAN would be clever enough to scan the FRA and find the later archived redo's and apply them (this has been implied in various references I've looked at).
Re: RMAN recovery to DR with Roll-forward [message #348050 is a reply to message #348040] Mon, 15 September 2008 08:46 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
RMAN can't guess, it only knows what you tell it, maybe you put inside FRA some file that look like archive logs but are not. If it is not recorded in control file, it does not exist for RMAN.

Regards
Michel
Re: RMAN recovery to DR with Roll-forward [message #348056 is a reply to message #348050] Mon, 15 September 2008 08:55 Go to previous messageGo to next message
marcelthompson
Messages: 5
Registered: September 2008
Location: UK
Junior Member
OK, I'll simply duplex the control file into the FRA so that the later one is captured and replicated across to the DR system.

Thanks.
Re: RMAN recovery to DR with Roll-forward [message #348061 is a reply to message #348056] Mon, 15 September 2008 09:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, this is also what I do: having one of my control files in the FRA.

Regards
Michel
Re: RMAN recovery to DR with Roll-forward [message #348155 is a reply to message #348040] Mon, 15 September 2008 16:59 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You are correct, during the restore, RMAN will automatically do an inventory of the FRA to include any new archive logs. Any new archive logs can be used during recovery.
Re: RMAN recovery to DR with Roll-forward [message #348280 is a reply to message #348155] Tue, 16 September 2008 05:34 Go to previous messageGo to next message
marcelthompson
Messages: 5
Registered: September 2008
Location: UK
Junior Member
I now have another problem with recovery. I am running the following commands on the DR box:

The spfile is already a clone from the live box.

Copy E:\oraclerecoveryarea\DIM10\controlfile\ctrl2.ora (this is my duplexed file stored in the FRA)C:\Oracle\ora10g\oradata\DIM10\ctrl1.ora

Attempt 1:

rman target sys/<password>
run {
set DBID=2318069170;
startup mount;
restore database;
recover database;
}

Attempt2:
RMAN> restore database until scn 1234567;
RMAN> recover database until scn 1234567;

Starting recover at 16-SEP-08
using channel ORA_DISK_1

all end up with a similar error message to this:-

starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/16/2008 11:33:44
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database reco
ver if needed
start until change 1234567
ORA-00283: recovery session canceled due to errors
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: 'C:\ORACLE\ORA10G\ORADATA\DIM10\REDO03.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.

Any ideas why online redo is required (especially using the until scn clause) or why this error is occuring?
Re: RMAN recovery to DR with Roll-forward [message #348763 is a reply to message #348003] Wed, 17 September 2008 22:30 Go to previous message
BlackSwan
Messages: 25042
Registered: January 2009
Location: SoCal
Senior Member
>Any ideas why online redo is required (especially using the until scn clause) or why this error is occuring?
I suspect that the online redo log file contained the desired SCN.

Here is what I do to build a physical standby DB.
1) Take a hot backup of online DB
2) SQL> ALTER SYSTEM SWITCH LOGFILE
3) backup all archived redo logfiles from before #1 above through & including archive redo log file from #2 above.

Now you have ensured that the physical standby can be be made consistent through last SCN in #2 above.

HTH & YMMV!
Previous Topic: Problem with Recovery
Next Topic: Incomplete Recovery again
Goto Forum:
  


Current Time: Wed Dec 07 02:46:38 CST 2016

Total time taken to generate the page: 0.08381 seconds