This section describes the measures you need to take after an incomplete recovery in the following cases:
Case 1
Restore of a complete offline backup and subsequently opening the database, without performing a complete recovery of the database
Case 2
Restore of a complete online or offline backup and subsequent point-in-time recovery of the database (with ALTER DATABASE OPEN RESETLOGS)
Prerequisites
There are the following possible problem situations:
Situation A
The information about the last backups and volumes used in database tables SDBAH and SDBAD has been lost, because neither item is current in the database. As a result, during the next backup, BRBACKUP prompts you to mount volumes (based on the automatic volume management) that are logically free, but are physically locked.
Situation B
The current log sequence number was reset during a incomplete recovery.
To a smaller value in case 1
To the value 1 in case 2
BRARCHIVE does not find the newly written offline redo log files after the restore, because offline redo logs with these log sequence numbers have already been saved. The summary BRARCHIVE log arch
.log still contains entries for successful backup runs of these offline redo log files and, as a result, BRARCHIVE does not detect the new offline redo log files as files requiring backup.
Procedure
Depending on the situation and case, proceed as follows:
Situation A
Using the detail BRBACKUP log, you can find out which volume was the last one used. Based on the information on the volume pool in initialization profile init
.sap (parameter backup_volumes), you can determine which volume to use for the next backup. Explicitly name this volume when you start the next backup:brbackup -v
, ,... Situation B
Make sure the old offline redo log files in the backup directory are renamed.
Case 1
The current log sequence number can be seen in the detail BRBACKUP log of the backup you used to restore the data. Find the line Current log sequence (message BR0116I). Then change the log sequence number in the last line of the summary BRARCHIVE log arch
.log , which starts with #ARCHIVE, to the value: <(determined current log sequence number) - 1>.Example
#ARCHIVE. 86 /oracle/C11/saparch/C11arch_86 1995-04-18 15.55.55
Current log sequence number: 30
Change the entry to:
#ARCHIVE. 29 /oracle/C11/saparch/C11arch_86 1995-04-18 15.55.55
After the backup, reset the changes in this line. Note that new lines have been added.
End of the example.Case 2
Change the log sequence number in the last line of the summary BRARCHIVE log arch
.log , which starts with #ARCHIVE, to zero (0).Example
#ARCHIVE. 86 /oracle/C11/saparch/C11arch_86 1995-04-18 15.55.55
Change the entry to:
#ARCHIVE. 0 /oracle/C11/saparch/C11arch_86 1995-04-18 15.55.55
After the backup, reset the changes in this line. Note that new lines have been added.
End of the example.
BRARCHIVE automatically recognizes the resetting of log sequence numbers if the database is opened when BRARCHIVE is started. In this case, the actions described in situation B are not necessary.
Note
In general (as after all recovery operations), delete from the disk offline redo log files that were restored from tape to disk after the recovery. If you used it for recovery, BRRECOVER automatically performs this action .
No comments:
Post a Comment