Restore and Application of Offline Redo Log Files with BR*Tools

Purpose

You can use BR*Tools for Oracle to restore and apply offline redo log files – that is, archivelog files. BRRESTORE restores offline redo log files and BRRECOVER applies the offline redo log files.

Only perform this procedure if you are an expert in Oracle database administration. Even as an expert, we recommend that you first try other types of recovery supported by BR*Tools.

If you are not an expert, you might severely damage the database with this procedure. You might lose data and cause downtime to fix the problem.

This section discusses how to perform a restore and apply of offline redo log files.

For more information on how to approach restore and apply of offline redo log files, see Restore and Application of Offline Redo Log Files.

Prerequisites

·        Make sure you have set the necessary BRRECOVER parameters in the initialization profile init<DBSID>.sap, because BRTOOLS uses these when it calls BRRECOVER.

·        Since this function is designed for experts, the usual safeguards are not present:

Ў        There is no database status check.

Ў        You have less guidance than otherwise, since BRRECOVER does not guide you step by step through restore and recovery.

Ў        You can choose individual actions independently.

Ў        The database is closed for the shortest time possible.

Ў        You can overwrite existing offline redo log files if required.

·        You must meet the following prerequisites before starting the restore or apply:

Procedure

Requirements

Restore archivelog files

·        Check that there is enough free space in the restore directory

·        The BRARCHIVE summary log exists

Apply archivelog files

Identify the offline redo log sequence number that the database requires to start the apply.

Open database

Make sure that all database files are consistent before trying to open the database.

·        BRRECOVER calls SQLPLUS to apply the offline redo log files.

·        For Apply archivelog files, you can force application of the online redo logs – that is, the online redo logs that have been archived but not yet overwritten.

Process Flow

...

       1.      You start BRGUI or BRTOOLS.

       2.      You choose Restore and recovery ® Restore and application of archivelog files.

       3.      You choose the required procedure.

BRRECOVER starts the restore or apply.

Processing now depends on which procedure you chose.

       4.      If you chose Restore archivelog files, you set the required options and choose Continue to start the restore:

Menu Entry

Equivalent BRRESTORE Command Options

BRRESTORE profile (profile)

-p|-profile

Instance of archivelog thread (instance)

Oracle Real Application Cluster (RAC) only

 

-a|-archive <DBSID>

First sequence number (first_seq)

-a|-archive <log_no1>-<log_no2>

Last sequence number (last_seq)

-a|-archive <log_no1>-<log_no2>

Restore device type (device)

-d|-device

BACKINT/Mount profile (parfile)

-r|-parfile

Database user/password (user)

-u|-user

Restore second copy (sec_copy)

-a2|-archive2

Destination directory (dest_dir)

-a|-archive <log_no1>-<log_no2> rest_dir

Confirmation mode (confirm)

-c|-confirm

Query mode (query)

-q|-query

Compression mode (compress)

-k|-compress

Additional output (output)

-o|-output

Message language (language)

-l|-language

BRRESTORE command line (command)

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

Restore device type (device) is taken from the device type used for the backup containing the selected offline redo log files.

All selected offline redo log files must be backed up on the same backup device type.

Restore second copy (sec_copy)lets you use the second copy of the restore if the first is damaged or unavailable.

       5.      If you chose Apply archivelog files, you set the required options and choose Continue to start the apply:

Menu Entry

Meaning

Archivelog directory (archive_dir)

The source directory used by SQLPLUS to apply the redo log files

Instance of archivelog thread (instance)

Database instance that created the offline redo log files

Apply from redo log group (apply_redo)

Apply changes recorded in the online redo log group

First sequence number (first_seq)

The sequence number of the first offline redo log file to apply

Last sequence number (last_seq)

The sequence number of the last offline redo log file to apply

Last system change number (last_scn)

Specifies that the recovery finishes with an Oracle system change number (SCN)

End point-in-time (end_pit)

Specifies that the recovery finishes with a normal point in time, using the time stamp (that is, date, hours, minutes, and seconds)

Use backup control file (back_ctl)

Option for SQLPLUS RECOVER command.

Parallel recovery (degree)

Specifies whether the recovery is serial or parallel

SQLPLUS command (command)

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

You must enter First sequence number (first_seq) and Last sequence number (last_seq). In this case, all the offline redo logs in the sequence you specify are applied.

If required, you can also enter Last system change number (last_scn) or End point-in-time (end_pit). In this case, only changes in the logs up till the last_scn or end_pit that you specify are applied.

       6.      If you chose Open database, you open the database.

       7.      You check the results in the BRRECOVER and BRRESTORE logs:

Ў        BRRECOVER logs:

§         The summary log recov<DBSID>.logdisplays the return code.

§         The detail log v<encoded timestamp>.rsa displays the progress.

Ў        BRRESTORE logs for the restore functions:

§         The summary log rest<DBSID>.logdisplays the return code

§         The detail log r<encoded timestamp>alf displays the progress.

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 Apply archivelog files.

BR0655I Choice menu 131 - please decide how to proceed

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

Restore and application of archivelog files

 

 1 = Restore archivelog files

 2 - Apply archivelog files

 3 - Open database

 4 - Exit program

 5 - Reset program status

 

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

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

BR0662I Enter your choice:

BR0280I Time stamp 2003-01-29 19.08.51

BR0663I Your choice: '2'

 

BR0613I Database instance GC2 is shut down

BR0750I Database instance GC2 will be mounted now

 

.....

 

BR0280I Time stamp 2003-01-29 19.10.55

BR0657I Input menu 134 - please check/enter input values

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

Apply archivelog files to database instance GC2

 

 1 - Archivelog directory (archive_dir) ....... [/oracle/GC2/saparch]

 2 # Instance of archivelog thread (instance) . []

 3 - Apply from redolog group (apply_redo)..... []

 4 - First sequence number (first_seq) ........ [9]

 5 - Last sequence number (last_seq) .......... [10]

 6 ~ Last system change number (last_scn) ..... []

 7 ~ End point-in-time (end_pit) .............. []

 8 - Use backup control file (back_ctl) ....... [no]

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

 10 - SQLPLUS command (command) ............... [recover from '/oracle/GC2/saparch' database]

 

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

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

BR0662I Enter your choice:

BR0280I Time stamp 2003-01-29 19.10.56

BR0663I Your choice: 'c'

BR0259I Program execution will be continued...

 

BR0783I Archivelog files with sequence number 9-10 will be applied to database GC2

 

BR0280I Time stamp 2003-01-29 19.10.56

BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:

BR0280I Time stamp 2003-01-29 19.10.58

BR0257I Your reply: 'c'

BR0259I Program execution will be continued...

 

BR0280I Time stamp 2003-01-29 19.10.58

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

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

 

BR0280I Time stamp 2003-01-29 19.10.58

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

BR0280I Time stamp 2003-01-29 19.10.59

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

===================================================================