Name

ARCHIVE LOG

Synopsis

ARCHIVE LOG {LIST |
             STOP |
             START [TO destination] |
             NEXT [TO destination] |
             ALL [TO destination] |
             log_sequence_number [TO
                destination]}

The ARCHIVE LOG command is used to control—or display information about—archive logging. You must be connected as SYSDBA, SYSOPER, or INTERNAL in order to use this command. For example:

ARCHIVE LOG LIST
ARCHIVE LOG START
ARCHIVE LOG ALL TO /m01/oradata

Parameters

LIST

Causes SQL*Plus to display information about the current state of archiving.

STOP

Stops log files from being automatically archived.

START

Turns on automatic archiving of redo log files.

NEXT

Manually archives the next log file group in the sequence, provided that it is filled. Use ARCHIVE LOG LIST to see the sequence number of this file.

ALL

Manually archives all log file groups that have been filled but not previously archived.

log _sequence_number

Manually archives a specific log file group, provided that the group is still online.

destination

Specifies a destination for archived log files. If used with ARCHIVE LOG START, this becomes the destination for all log files as they are archived. If used with NEXT, ALL, or a specific sequence number, this becomes the destination for files archived by that one command. If you do not specify a destination when using ARCHIVE LOG START, the value from the LOG_ARCHIVE_ DEST initialization parameter is used.

Get Oracle SQL*Plus Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.