Show TOC

Setting Up ArchivingLocate this document in the navigation structure

Prerequisites

The following parameters in the init<DBSID>.ora file control the archiving process for the Oracle database:

Parameter

Note

log_archive_dest = <directory>/<file prefix>

Part of the file name

log_archive_format = <Oracle default>

Use the Oracle default

log_archive_dest defines the archive directory of the online redo log files for archiving. It is delivered with the specification of the following SAP standard path (this example is for a single instance installation on UNIX):

OS> <SAPDATA_HOME>/oraarch/<ORACLE_SID>arch

For more information, see Environment Variables (UNIX) and Environment Variables (Windows).

Note

The Oracle database names the offline redo log files using the string <ORACLE_SID>arch followed by the log sequence number and the resetlogs ID.

You can back up the offline redo log files with BR*Tools. The offline redo log files are the copies of the online redo log files saved in the archive directory.

Context

This procedure tells you how to check the archiving parameters and ARCHIVELOG mode for your Oracle database and, if necessary, how to change these.

Caution

It is important that:

  • The database runs in ARCHIVELOG mode

  • Automatic archiving is enabled (standard as of Oracle 10g)

After correct installation of an SAP system, the Oracle database meets both these criteria. In this case, the online redo log files are automatically archived when full (that is, following a redo log switch). This is important because it allows the online redo log files to be reused for fresh archive data, so that archiving of the log files can continue at all times.

Procedure


  1. Make sure that:

    • The archive directory (under UNIX: oraarch) exists.

    • The directory is not write-protected.

    • The directory has enough free space. Otherwise, the archiving process cannot archive any log files and no further actions are possible on the database (this is known as "Archiver Stuck").

      Note

      For more information about the BR*Tools commands mentioned below, see Altering the Database Instance with BR*Tools and -f dbalter.

  2. Check the archiving status of the database by choosing Start of the navigation path Instance Management Next navigation step Show instance status End of the navigation path in BR*Tools.

    The system displays database instance details.

  3. Check that Archivelog mode is set to ARCHIVELOG.

  4. If you need to reset ARCHIVELOG mode, do this in one of the following ways:

    1. Do one of the following:

      • Choose Start of the navigation path Instance Management Next navigation step Alter database instance End of the navigation path in BRGUI or BRTOOLS and choose the action Set archivelog mode.

      • Enter the following from the command line:

        brspace -f dbalter -a archlog

      • Enter the following commands in the Oracle tool SQLPLUS:

        SQL> connect / as sysdba

        SQL> startup mount

        SQL> alter database archivelog

        SQL> alter database open

        SQL> archive log list

        BRSPACE or SQLPLUS reconfigures the database to set ARCHIVELOG mode on.

    2. Repeat steps 2 and 3 to check that ARCHIVELOG has been set correctly.