Oracle7 Server SQL Reference

Contents Index Home Previous Next

ARCHIVE LOG clause

Purpose

To manually archive redo log file groups or to enable or disable automatic archiving.

Prerequisites

The ARCHIVE LOG clause must appear in an ALTER SYSTEM command. You must have the privileges necessary to issue this statement. For information on these privileges, see the ALTER SYSTEM command [*].

You must also have the OSDBA or OSOPER role enabled.

You can use most of the options of this clause when your instance has the database mounted, open or closed. Options that require your instance to have the database open are noted.

If you are using Trusted Oracle7 in DBMS MAC mode, your DBMS label must be the equivalent of DBHIGH.

Syntax

Keywords and Parameters

THREAD

specifies thread containing the redo log file group to be archived. You only need to specify this parameter if you are using Oracle7 with the Parallel Server option in parallel mode.

SEQ

manually archives the online redo log file group identified by the log sequence number integer in the specified thread. If you omit the THREAD parameter, Oracle7 archives the specified group from the thread assigned to your instance.

CHANGE

manually archives the online redo log file group containing the redo log entry with the system change number (SCN) specified by integer in the specified thread. If the SCN is in the current redo log file group, Oracle7 performs a log switch. If you omit the THREAD parameter, Oracle7 archives the groups containing this SCN from all enabled threads. You can only use this option when your instance has the database open.

CURRENT

manually archives the current redo log file group of the specified thread, forcing a log switch. If you omit the THREAD parameter, Oracle7 archives all redo log file groups from all enabled threads, including logs previous to current logs. You can only use this option when your instance has the database open.

GROUP

manually archives the online redo log file group with the specified GROUP value. You can determine the GROUP value for a redo log file group by examining the data dictionary view DBA_LOG_FILES. If you specify both the THREAD and GROUP parameters, the specified redo log file group must be in the specified thread.

LOGFILE

manually archives the online redo log file group containing the redo log file member identified by 'filename'. If you specify both the THREAD and LOGFILE parameters, the specified redo log file group must be in the specified thread.

NEXT

manually archives the next online redo log file group from the specified thread that is full but has not yet been archived. If you omit the THREAD parameter, Oracle7 archives the earliest unarchived redo log file group from any enabled thread.

ALL

manually archives all online redo log file groups from the specified thread that are full but have not been archived. If you omit the THREAD parameter, Oracle7 archives all full unarchived redo log file groups from all enabled threads.

START

enables automatic archiving of redo log file groups. You can only enable automatic archiving for the thread assigned to your instance.

TO

specifies the location to which the redo log file group is archived. The value of this parameter must be a fully-specified file location following the conventions of your operating system. If you omit this parameter, Oracle7 archives the redo log file group to the location specified by the initialization parameter LOG_ARCHIVE_DEST.

STOP

disables automatic archiving of redo log file groups. You can only disable automatic archiving for the thread assigned to your instance.

Usage Notes

You must archive redo log file groups in the order in which they are filled. If you specify a redo log file group for archiving with these or LOGFILE parameter and earlier redo log file groups are not yet archived, Oracle7 returns an error. If you specify a redo log file group for archiving with the CHANGE parameter or CURRENT option and earlier redo log file groups are not yet archived, Oracle7 archives all unarchived groups up to and including the specified group.

You can also manually archive redo log file groups with the ARCHIVE LOG Server Manager command. For information on this command, see the Oracle Server Manager User's Guide.

You can also choose to have Oracle7 archive redo log files groups automatically. For information on automatic archiving, see the "Archiving Redo Information" chapter of the Oracle7 Server Administrator's Guide. Note that you can always manually archive redo log file groups regardless of whether automatic archiving is enabled.

Example I

The following statement manually archives the redo log file group with the log sequence number 4 in thread number 3:

ALTER SYSTEM ARCHIVE LOG THREAD 3 SEQ 4 

Example II

The following statement manually archives the redo log file group containing the redo log entry with the SCN 9356083:

ALTER SYSTEM ARCHIVE LOG CHANGE 9356083 

Example III

The following statement manually archives the redo log file group containing a member named 'DISKL:LOG6.LOG' to an archived redo log file in the location 'DISKA:[ARCH$]':

ALTER SYSTEM ARCHIVE LOG 
	LOGFILE 'diskl:log6.log' 
	TO 'diska:[arch$]' 

Related Topics

ALTER SYSTEM command [*]


Contents Index Home Previous Next