Oracle Server Manager User's Guide

Contents Index Home Previous Next

ARCHIVE LOG

Purpose

Start or stop automatic archiving of online redo log files, manually (explicitly) archive specified redo log files, or display information about redo log files.

Note: This command applies only to the current instance. To specify archiving for a different instance or for all instances in a Parallel Server, use the SQL command ALTER SYSTEM.

Prerequisites

You must be connected to an open Oracle database as INTERNAL, SYSOPER, or SYSDBA.

Syntax

ARCHIVE LOG command ::=

where:

LIST Requests a display that shows the range of redo log files to be archived, the current log file group's sequence number, and the current archive destination (specified by either the optional command text or by the initialization parameter LOG_ARCHIVE_DEST).
If you are using both ARCHIVELOG mode and automatic archiving, the display might appear like:

				Database log mode		Archive Mode
				Automatic archival		Enabled
				Archive destination		DISK9:ARCH
				Oldest online log sequence	30 
				Next log sequence to archive	33 
				Current log sequence		33

Because the log sequence number of the current log group and the next log group to archive are the same, automatic archival has archived all log groups up to the current one.
If you are using ARCHIVELOG but have disabled automatic archiving, the last three lines might look like:

				Oldest online log sequence		30 
				Next log sequence to archive		30 
				Current log sequence			33

If you are using NOARCHIVELOG mode, the "next log sequence to archive" line is suppressed.
The log sequence increments every time LGWR begins to write to another redo log file group; it does not indicate the number of logs being used. Every time an online redo log file group is reused, the contents are assigned a new log sequence number.
STOP Disables automatic archival. If the instance is still in ARCHIVELOG mode and all redo log file groups fill, database operation is suspended until a redo log file is archived (for example, until you enter the command ARCHIVE LOG NEXT or ARCHIVE LOG ALL).
START Enables automatic archiving. Starts the background process ARCH, which performs automatic archiving as required. If ARCH is started and a filename is supplied, the filename becomes the new default archive destination.
ARCH automatically starts on instance startup if the initialization parameter LOG_ARCHIVE_START is set to TRUE.
NEXT Manually archives the next online redo log file group that has been filled but not yet archived.
ALL Manually archives all filled, but not yet archived, online log file groups.
integer Causes archival of the online redo log file group with log sequence number n. You can specify any redo log file group that is still online. An error occurs if the log file cannot be found online or the sequence number is not valid. This option can be used to re-archive a log file group.
`destination' Specifies the destination device or directory in an operating system. Specification of archive destination devices is installation-specific; see your platform-specific Oracle documentation for examples of specifying archive destinations. On many operating systems, multiple log files can be spooled to the same tape.
If not specified in the command line, the archive destination is derived from the initialization parameter LOG_ARCHIVE_DEST. The command ARCHIVE LOG START 'destination' causes the specified device or directory to become the new default archive destination for all future automatic or manual archives. A destination specified with any other option is a temporary destination that is in effect only for the current (manual) archive. It does not change the default archive destination for subsequent automatic archives.
Additional Information: For information about specifying archive destinations, see your platform-specific Oracle documentation.

Usage Notes

If an online redo log file group fills and none are available for reuse, database operation is suspended. The condition can be resolved by archiving a log file group.

Examples

ARCHIVE LOG START

Starts up the archiver process and begins automatic archiving, using the archive destination specified in LOG_ARCHIVE_DEST.

ARCHIVE LOG STOP 

Stops automatic archiving.

ARCHIVE LOG 1001 'DISK9:[TEMPARCH]TEMP' 

Archives the log file group with the sequence number 1001 to the destination specified. 'TEMP' specifies the prefix of the filename on the destination device; the remainder of the filename is dependent on the initialization parameter LOG_ARCHIVE_FORMAT, which specifies the filename format for archived redo log files.


Contents Index Home Previous Next