SQL*Plus User's Guide and Reference Release 8.1.5 A66736-01 |
|
Command Reference, 8 of 52
Starts or stops automatic archiving of online redo log files, manually (explicitly) archives specified redo log files, or displays information about redo log files.
ARCHIVE LOG {LIST|STOP}|{START|NEXT|ALL|integer} [TO destination]
Refer to the following list for a description of each term or clause:
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:
SQL> ARCHIVE LOG LIST Database log mode Archive Mode Automatic archival Enabled Archive destination /vobs/oracle/dbs/arch Oldest online log sequence 221 Next log sequence to archive 222 Current log sequence 222
Since 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 222 Next log sequence to archive 222 Current log sequence 225
If you are using NOARCHIVELOG mode, the "next log sequence to archive" line is suppressed.
The log sequence increments every time the Log Writer 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
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
ALL
integer
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.
For information about specifying archive destinations, see your platform-specific Oracle documentation.
You must be connected to an open Oracle database as SYSOPER, or SYSDBA. For information about connecting to the database, see the CONNECT command.
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.
For information about specifying archive destinations, see your platform-specific Oracle documentation.
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. For more information about using SQL commands, see the Oracle8i SQL Reference. |
To start up the archiver process and begin automatic archiving, using the archive destination specified in LOG_ARCHIVE_DEST, enter
SQL> ARCHIVE LOG START
To stop automatic archiving, enter
SQL> ARCHIVE LOG STOP
To archive the log file group with the sequence number 1001 to the destination specified, enter
SQL> ARCHIVE LOG 1001 '/vobs/oracle/dbs/arch'
'arch' 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.
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|