Restoring and Applying Offline Redo Log Files

Use

You use this procedure when using BRRECOVER to perform:

·        Complete database recovery

·        Database point-in-time (PIT) recovery

·        Tablespace point-in-time (PIT) recovery

·        Whole database reset – if you selected an online backup

This procedure uses BRRESTORE to restore and SQLPLUS to apply offline redo log files, that is, archivelog files.

Prerequisites

·        BRRESTORE restores the offline redo log files in ascending order of application. This means that the first logs to be restored are those that are needed to start the apply phase.

·        This procedure restores and applies offline redo log files as follows:

Ў        Up to 100 files are processed as a single group.

Ў        All the files in a group must be from the same source. For example, files originally backed up with util cannot be restored and applied in the same group as files backed up with rman.

Ў        If there are two or more groups of files, they are processed in parallel with two concurrent processing threads.

Ў        For whole database reset, all offline redo log files that were restored in Restoring Control Files are applied in one group, which is generally small.

·        If you perform this procedure as part of a PIT recovery, only the offline redo log files required to reach the specified point are applied. If you have entered a point in time (PIT) or an Oracle system change number (SCN) to specify the end point of the recovery, BRRECOVER translates this to the equivalent log sequence number (SEQ).

·        BRRECOVER first remounts – that is, closes and again mounts – the database to refresh the views V$DATAFILE, V$RECOVER_FILE, and V$RECOVERY_STATUS.

·        BRRECOVER checks whether there are any data files not online. If so, it recommends to set them online.

·        BRRECOVER first displays a list of the redo log files to apply, as in the following example:

Archivelog files to apply for complete recovery

Pos. Seq.  Status   Apply  From  Disk Tape Util Rman Stage

 

  1 -  11  in_arch   yes    arch

  2 -  12  in_arch   yes    arch

  3 -  13  in_arch   yes    arch

  4 -  14  in_arch   yes    arch

  5 -  15  redo_arch yes    redo

  6 -  16  redo_arch yes    redo

  7 -  17  in_redo   yes    redo

Some files might be present on multiple media sources. For example, a file might be present on disk and on tape. BRRECOVER normally uses the most accessible version of the file, unless you specify otherwise. In this example, it would use the disk version of the file.

·        If the first copy of the redo log files is missing, you can use the second copy, if available. To do this, choose one of the following:

Ў        Change the command line for restore near the end of this procedure

Ў        Perform Restoring and Applying Offline Redo Log Files - Expert Mode instead of this procedure.

·        BRRECOVER recreates files that were added to the database during or (only for PIT) after the selected backup. It identified these during the procedure Selecting a Database Backup.

·        For a tablespace PIT recovery, BRRECOVER sets OFFLINE the data files of the exported tablespaces – that is, the tablespaces not involved in the recovery.

See “Example” below for the contents of the log file.

Procedure

...

       1.      If required, change the default options for the sources that BRRECOVER uses when it restores or applies the offline redo log files:

Menu Entry

Details of the Offline Redo Log File Group to be Changed

First sequence number (first_seq)

The sequence number of the first offline redo log file for which you want to change the source

Last sequence number (last_seq)

The sequence number of the last offline redo log file for which you want to change the source

New source for applying (source)

The new source of the offline redo log files

If required, you can specify a different source for each missing offline redo log file that is listed with multiple sources. You can also change the source for sequences of offline redo log files.

       2.      Choose Continue.

If a restore is necessary – that is, if not all required offline redo log files are on disk – BRRECOVER displays the restore menu.

       3.      If a restore is necessary, set the required options:

Menu Entry

Equivalent BRRESTORE Command Options

BRRESTORE profile (profile)

-p|-profile

Profile for cpio (prof_cpio)

-p|-profile

Profile for dd (prof_dd)

-p|-profile

Profile for rman (prof_rman)

-p|-profile

Profile for rman_dd (prof_rman_dd)

-p|-profile

BACKINT/Mount profile (parfile)

-r|-parfile

Database user/password (user)

-u|-user

Destination directory (dest_dir)

-a|-archive = <rest_dir>

Confirmation mode (confirm)

-c|-confirm

Additional output (output)

-o|-output

Message language (language)

-l|-language

       4.      If the restore menu is displayed, choose Continue.

BRRECOVER displays the menu for applying offline redo log files to the database instance.

       5.      If required, change the default options for applying offline redo log files:

Menu Entry

Equivalent BRRECOVER

Command Options

First sequence number (first_seq)

First offline redo log to apply

Last sequence number (last_seq)

Last offline redo log to apply

Use backup control file (back_ctl)

Yes or no

Parallel recovery (degree)

-e|-degree

Unless you are an expert, we recommend that you only change the last entry, Parallel recovery (degree), if required.

       6.      Choose Continue.

       7.      If a restore is necessary, set the required options for restoring an offline redo log group:

Menu Entry

Equivalent BRRESTORE Command Options for Restore of an Offline Redo Log Group

Restore unattended (unattend)

-c|-confirm

BRRESTORE command line (command)

This shows you the BRRESTORE command that is to be executed using the current settings.

·         We recommend that only experts change the BRRESTORE command line.

·         If you are restoring large numbers of offline redo log files, you can choose unattended mode. Otherwise, BRRECOVER prompts you again for each group.

       8.      If the above restore menu is displayed, choose Continue to start the restore.

If necessary, BRRESTORE restores the offline redo log files.

       9.      Set the required options to apply a group of offline redo log files:

Menu Entry

Details of the Offline Redo Log File Group to be Applied

Apply unattended (unattend)

Log group applied in attended or unattended mode

First sequence number (first_seq)

First offline redo log to apply

Last sequence number (last_seq)

Last offline redo log to apply

SQLPLUS command (command)

This shows you the SQLPLUS command that is to be executed using the current settings.

·         Unless you are an expert, we recommend that you only change the first entry, Apply unattended (unattend), if required.

·         If you are applying large numbers of offline redo log files, you can choose unattended mode. Otherwise, BRRECOVER prompts you again for each group.

BRRECOVER applies the offline redo log files.

If there are two or more groups of offline redo log files to process, BRRESTORE and BRRECOVER work in parallel to restore and apply the files.

If you process in attended mode, you see the above menus with the BRRESTORE or BRRECOVER command line before each group of offline redo log files is processed.

Therefore, if you are processing many groups of offline redo log files, we recommend that you process the first few groups in attended mode to check that processing is correct. Then you can switch to unattended mode to finish processing automatically.

If successful, BRRECOVER displays the message Media recovery completed.

   10.      Check the results in the BRRESTORE and BRRECOVER logs.

Ў        The detail log r<encoded timestamp>.<ext> displays the progress for restoring the offline redo log files.

Ў        The detail log v<encoded timestamp>.<ext> displays the progress for applying the offline redo log files.

For more information on how to view the logs, see Showing Logs with BR*Tools.

Example

This example shows the contents of the BRRECOVER detail log file for this procedure. No restore is required in this example because all the offline redo log files are on disk.

 

BR0280I Time stamp 2003-01-29 19.13.39

BR0657I Input menu 117 # please check/enter input values

-------------------------------------------------------------------

Apply archivelog files to database instance GC2

 

 1 - First sequence number (first_seq) .. [11]

 2 - Last sequence number (last_seq) .... [17]

 3 # Use backup control file (back_ctl) . [no]

 4 ~ Parallel recovery (degree) ......... []

 

Standard keys: c - cont, b - back, s - stop, r - refr, h - help

-------------------------------------------------------------------

BR0280I Time stamp 2003-01-29 19.13.39

BR0134I Unattended mode with 'force' active - continuing processing with default reply 'cont'

 

BR0781I All archivelog files to be applied are on disk - no restore required

 

BR0783I Archivelog files with sequence number 11-14 will be applied to database GC2

 

BR0280I Time stamp 2003-01-29 19.13.39

BR0336I Applying offline redo log file /oracle/GC2/saparch/1_11.dbf ...

BR0336I Applying offline redo log file /oracle/GC2/saparch/1_12.dbf ...

BR0336I Applying offline redo log file /oracle/GC2/saparch/1_13.dbf ...

BR0336I Applying offline redo log file /oracle/GC2/saparch/1_14.dbf ...

 

BR0280I Time stamp 2003-01-29 19.13.40

BR0337I Offline redo log file /oracle/GC2/saparch/1_11.dbf applied successfully

BR0280I Time stamp 2003-01-29 19.13.40

BR0337I Offline redo log file /oracle/GC2/saparch/1_12.dbf applied successfully

BR0280I Time stamp 2003-01-29 19.13.40

BR0337I Offline redo log file /oracle/GC2/saparch/1_13.dbf applied successfully

BR0280I Time stamp 2003-01-29 19.13.40

BR0337I Offline redo log file /oracle/GC2/saparch/1_14.dbf applied successfully

 

BR0280I Time stamp 2003-01-29 19.13.40

BR0784I Media recovery completed