Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Thierry.

Asked: July 21, 2016 - 11:46 am UTC

Last updated: August 08, 2016 - 7:07 am UTC

Version: DB 11g EEdition 11.2.0.3.0 - 64bit

Viewed 1000+ times

You Asked

Hi,
Maybe this question was already answered somewhere but there so many question that I can not find the solution on this site. It is rather a simple one (I hope not a stupid one).

Strictly speaking, when I make a "backup database" with Rman, do I need any redolog or archivelog in order to be able to restore the DB at the time the backup was made ?

In my mind, the process doesn't need anything else because everything was forced to be written on the disk and the undo is there to rollback all uncommitted transactions.

Thanks

and Connor said...

You want the archive logs because a backup duration might extend past that of the "cycle" time of the redo logs. eg In the (say) 60mins that the backup runs for, you might consume dozens of redo logs (which are now archived redo logs).

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Thierry Beb, July 25, 2016 - 8:05 am UTC

OK.
So we don't need any of the archivelogs that were produced just before the start of the backup process. Just those produced during the process. And nothing after the last logswitch you made during this process.

A side question : does the DBW continue to write while the backup is running ?

Thanks again, your answer solve a recurring problem I had in my mind:)
Connor McDonald
July 25, 2016 - 8:57 am UTC

And nothing after the last logswitch you made during this process.

Well, if you want point-in-time recovery to some point after the backup finished, then yes, you do need them! Say the backup finished at 1am and you want to recover to 10am that day. You need the archivelogs from 1 -> 10am.

does the DBW continue to write while the backup is running ?

Assuming you're doing a hot backup with RMAN, yes.

Archived log necessary

Thierry Beb, July 29, 2016 - 7:10 am UTC

Hi,
First of all : many thanks for your answer and this site very very useful.

But when I make a full backup and then a "restore database preview",I see that the restore needs an archived log that was made before the backup started. If a checkpoint is made before the backup starts and because every undo information is written, why do we need this 'old' archived log.

Here below is the result of the command (with some .... to reduce the length)

RMAN> restore database preview

Starting restore at 29-07-16,08:55:41
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=347 device type=DISK

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
5173    Full    3.47G      DISK        00:01:09     28-07-16,23:01:22
  List of Datafiles in backup set 5173
  File LV Type Ckp SCN    Ckp Time          Name
  ---- -- ---- ---------- ----------------- ----
  1       Full 9475559245562 28-07-16,23:00:14 E............DATAFILE\O1_MF_SYSTEM_8GZP56NR_.DBF
  2       Full 9475559245562 28-07-16,23:00:14 .........ILE\O1_MF_SYSAUX_8GZP56P6_.DBF
......
  10      Full 9475559245562 28-07-16,23:00:14 ........0PP\DATAFILE\BIDON-TBS

  Backup Set Copy #1 of backup set 5173
  Device Type Elapsed Time Completion Time   Compressed Tag
  ----------- ------------ ----------------- ---------- ---
  DISK        00:01:09     28-07-16,23:01:22 NO         BACKUP_DB10PP_0000_072816110001

    List of Backup Pieces for backup set 5173 Copy #1
    BP Key  Pc# Status      Piece Name
    ------- --- ----------- ----------
    9073    1   AVAILABLE   .....B10PP\BACKUPSET\2016_07_28\O1_MF_NNNDF_BACKUP_DB10PP_0000_0_CSNWLYTK_.BKP
..........
    9077    5   AVAILABLE   ......B10PP\BACKUPSET\2016_07_28\O1_MF_NNNDF_BACKUP_DB10PP_0000_0_CSNWNTYD_.BKP
using channel ORA_DISK_1

List of Archived Log Copies for database with db_unique_name DB10PP
=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - -----------------
<u><b>16399   1    82      A 28-07-16,22:00:58
        Name: E:\APP\DB\FAST_RECOVERY_AREA\DB10PP\ARCHIVELOG\2016_07_28\O1_MF_1_82_CSNWOD3O_.ARC</b></u>

16401   1    83      A 28-07-16,23:01:31
        Name: E:\APP\DB\FAST_RECOVERY_AREA\DB10PP\ARCHIVELOG\2016_07_29\O1_MF_1_83_CSO7S9T2_.ARC

16403   1    84      A 29-07-16,02:11:21
        Name: E:\APP\DB\FAST_RECOVERY_AREA\DB10PP\ARCHIVELOG\2016_07_29\O1_MF_1_84_CSO7SCTG_.ARC

Media recovery start SCN is 9475559245562
Recovery must be done beyond SCN 9475559245724 to clear datafile fuzziness
Finished restore at 29-07-16,08:55:43

RMAN>





Connor McDonald
August 08, 2016 - 7:07 am UTC

From what I can see there, that first archive spans 22:00:58 to 23:01:31.

Your backup completed at 23:01:22, so that archive might be relevant.

OK and thanks

A reader, August 11, 2016 - 9:39 am UTC

Ok so simple. I should have read the name of the column (low_time) ! Thanks.



I have a general remark concerning the Oracle documentation. Sketches, graphs of Oracle workflows and Oracle processes are really too rare. Often a good schema is better than thousands words.

Thanks again for your help

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.