What will be the end result of this set of RMAN commands?

What will be the end result of this set of RMAN commands?

shutdown abort
startup mount
restore datafile 4 until time 09/30/2008:15:00:00;
recover datafile 4 until time 09/29/2008:15:00:00;
alter database open resetlogs;

What will be the end result of this set of RMAN commands?

shutdown abort
startup mount
restore datafile 4 until time 09/30/2008:15:00:00;
recover datafile 4 until time 09/29/2008:15:00:00;
alter database open resetlogs;

A.
Datafile 4 will be recovered until 9/30/2008 at 15:00 and the database will open.

B.
The restore command will fail.

C.
The recover command will fail.

D.
The alter database open resetlogs command will fail.

E.
All these commands will fail because they must be in the confines of a run block.



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Reji Mathew

Reji Mathew

Because it needs more recovery.

TonyE

TonyE

Reason, log files were not required… a simple enough answer

spellblind

spellblind

The answer should be C.

Here’s a test case

RMAN> startup mount
RMAN> restore datafile 5 until time “TO_DATE(’09-07-2015:20:44:00′,’dd-mm-yyyy:hh24:mi:ss’)”;
.
.
.
It works

RMAN> recover datafile 5 until time “TO_DATE(’09-07-2015:20:40:00′,’dd-mm-yyyy:hh24:mi:ss’)”;

Starting recover at 09-JUL-15
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/09/2015 20:56:21
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

dbr

dbr

This example works ONLY if the backupset was created prior to 09/29/2008:15:00:00 when recovery is requested. You must assume that a backup is already there, if a backup would have been done before the restore date but after the recovery date than it would fail on recovery

I)RMAN> restore tablespace “TEST” until time “to_date(’22-JUL-2015 15:00:00′,’dd-mon-rrrr hh24:mi:ss’)”;

Starting restore at 23-JUL-15
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00008 to /u01/app/oracle/test.dbf
channel ORA_DISK_1: reading from backup piece +FRA/rac/backupset/2015_07_21/nnndf0_tag20150721t164325_0.725.885660529
channel ORA_DISK_1: piece handle=+FRA/rac/backupset/2015_07_21/nnndf0_tag20150721t164325_0.725.885660529 tag=TAG20150721T164325
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
Finished restore at 23-JUL-15

RMAN> recover datafile ‘/u01/app/oracle/test.dbf’ until time “to_date(’21-JUL-2015 23:00:00′,’dd-mon-rrrr hh24:mi:ss’)”;

Starting recover at 23-JUL-15
using channel ORA_DISK_1

starting media recovery
—-
media recovery complete, elapsed time: 00:02:31
Finished recover at 23-JUL-15

II)

RMAN> restore tablespace “TEST” until time “to_date(’22-JUL-2015 15:00:00′,’dd-mon-rrrr hh24:mi:ss’)”;

Starting restore at 23-JUL-15
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00008 to /u01/app/oracle/test.dbf
channel ORA_DISK_1: reading from backup piece +FRA/rac/backupset/2015_07_21/nnndf0_tag20150721t164325_0.725.885660529
channel ORA_DISK_1: piece handle=+FRA/rac/backupset/2015_07_21/nnndf0_tag20150721t164325_0.725.885660529 tag=TAG20150721T164325
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 23-JUL-15

RMAN> recover datafile ‘/u01/app/oracle/test.dbf’ until time “to_date(’20-JUL-2015 23:00:00′,’dd-mon-rrrr hh24:mi:ss’)”;

Starting recover at 23-JUL-15
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/23/2015 14:15:54
RMAN-06555: datafile 8 must be restored from backup created before 20-JUL-15