Entering content frameProcedure documentation Partial Recovery Locate the document in its SAP Library structure

A partial recovery means that some data cannot be recovered after a database error. If one of the following problem constellations occurs, you will not be able to restore your database completely:

In such cases, contact your SAP consultant or an Oracle specialist. It may be possible to perform a complete recovery anyway. This depends on the exact situation, however, and cannot be explained in detail here.

When you follow the SAP recommendations, this problem should not occur. The loss of all the members in an online redo log group is highly improbable, since the mirrored copies should be stored on different disks. The offline redo logs should also be regularly archived to tape using the BRARCHIVE utility.

A partial recovery will cause data to be irretrievably lost, because the database can only be recovered in an older version. You can significantly reduce this risk by using a continual backup procedure for your database. We therefore ask you to adhere to the configuration and backup procedures recommended by SAP.

Caution

If you do not use the current control file for a recovery, but instead an older copy of the same, it is essential that you indicate this by using the supplement clause using backup controlfile.

The following section only describes the partial recovery after the loss of an offline redo log file.

For more information on partial recovery, see the Oracle documentation.

Recovery: Loss of an Offline Redo Log File

A media error has occurred in the data file area of the database, and one of the offline redo log files is no longer readable. For this reason, the recovery terminates with the last available redo log file in the sequence.

Proceed as follows during recovery:

  1. If the database system is still active, use the following SQLPLUS command to shut it down:
  2. shutdown abort

    ABORT is required in most cases, because the loss of individual data files means that changes in the SGA can no longer be copied.

  3. Use the ALERT and trace files to analyze the error.
  4. Restore all the available backups of all data files and the offline redo log files of all instances.
  5. Use the SAP utility BRRESTORE (see Command Options for BRRESTORE).

  6. After a partial recovery, the structure of the database may no longer be identical to that fixed in the current control file. Therefore, use a copy of the control file that reflects the structure of the database at the end of the recovery.
  7. Mount the database. Enter the following SQLPLUS commands:
  8. connect internal

    startup mount

  9. If you could not load the backup files into their original directories or had to change file names, update the control file.
  10. Use the following command to change the path names:

    alter database rename file '<file name>' to '<file name>';

    See Updating the Control File.

  11. You may be able to automate the recovery.
  12. See Automating the Recovery.

  13. Use the following SQLPLUS command to start the recovery:
  14. recover database until cancel;

    The use of the option until cancel means that the online redo logs will be reset when opened or not, depending on whether parameter resetlogs or noresetlogs is used.

    If you do not use the current control file, enter the command
    recover database until cancel using backup controlfile;.

  15. Depending on the recovery mode, the required offline redo log files are processed automatically (autorecovery on) until the file for the next log sequence number cannot be found, or (with autorecovery off) the recovery is stopped with cancel.
  16. Once the message recovery complete or recovery canceled is displayed, you can use the following SQLPLUS command to open the database again:

alter database open resetlogs;

RESETLOGS: The existing online redo log files are initialized, and the current log sequence number is reset to 1.

NORESETLOGS: The online redo log files are not initialized. This option should only be used when you did not use the option using backup controlfile and (unusually) all the online redo log files, including the current ones, were processed during the recovery.

The options resetlogs and noresetlogs are only possible after a recover database until... or after a recovery with the option using backup controlfile. See also Actions after a Partial Recovery.

Point in Time Recovery

You can also select a point in time recovery, which you can carry out either manually or automatically. In contrast to the partial recovery with until cancel, this recovery is terminated at a specific time.

Use the following SQLPLUS command:

recover database until time 'dd-mm-yyyy:hh:mm:ss';

Depending on the recovery mode (manual or automatic), the required redo log files are processed automatically, or you have to enter their paths and names. When the specified point in time is reached, the recovery is terminated. See also Actions after a Partial Recovery.

Leaving content frame