The ARCHIVE LOG command is used to control, or display information about, archive logging. It’s discussed in Chapter 10 and may be used to start archiving, stop archiving, manually archive one or more log files, or display information about the current archive log state. You must be connected as SYSDBA, SYSOPER, or INTERNAL in order to use this command.
ARCHIVE LOG {LIST |STOP |START [TOdestination
] |NEXT [TOdestination
] |ALL [TOdestination
] |log_sequence_number
[TOdestination
]}
where:
Is the command.
Causes SQL*Plus to display information about the current state of archiving. This includes the current destination, an indication of whether or not automatic archiving is enabled (the ARCH process), the oldest online log sequence number, the sequence number of the next log to be archived, and the current log sequence number.
Stops logs files from being automatically archived. You must manually archive redo log files as they fill; otherwise, you run the risk of the instance suspending operation because the log files have run out of space.
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.
Manually archives all log file groups that have been filled, but not previously archived.
Manually archives a specific log file group, provided that group is still online. Use ARCHIVE LOG LIST to find the sequence number of the oldest remaining log file group.
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.