COMMIT ARCHIVE [ ALLBASE/SQL Reference Manual ] MPE/iX 5.5 Documentation
ALLBASE/SQL Reference Manual
COMMIT ARCHIVE
If you do not have TURBO STORE and you must do a static backup, you can
use the COMMIT ARCHIVE statement following the BEGIN ARCHIVE statement to
start a new archive log file before a DBEnvironment is backed up.
However if you have TURBO STORE, the recommended approach to initiate
archive logging is to use the SQLUtil STOREONLINE command or to use the
ARCHIVE option with the START DBE NEWLOG statement.
Scope
ISQL or Application Programs
SQL Syntax
COMMIT ARCHIVE
Description
* You can turn archive mode off only by using the START DBE NEWLOG
statement.
* A backup copy of a DBEnvironment and an archive log file can be
used for rollforward recovery when database files are physically
damaged. In this type of recovery, you load a backup copy of the
DBEnvironment, then issue the SQLUtil SETUPRECOVERY, RECOVERLOG,
and ENDRECOVERY commands. You may also need to use RESCUELOG.
* Use the following procedure to create a new archive log and a
static backup of the DBEnvironment:
* Issue the BEGIN ARCHIVE statement, then the COMMIT ARCHIVE
statement, to write an archive record in the rollforward
log. The archive record indicates the point from which
rollforward recovery can begin.
* Use the SQLUtil STORE command to make a static backup copy
of the DBEnvironment. The DBEnvironment must be stopped
and remain stopped while you are making the static backup
copy if you are using STORE. This procedure does not turn
the archive flag in the DBECon file on or off. You cannot
use STORE from an application program, since it is an
SQLUtil command.
* If a procedure invoked by a rule executes a COMMIT ARCHIVE
statement, an error occurs.
Refer to the ALLBASE/SQL Database Administration Guide for detailed
backup and recovery procedures and recommended practices.
Authorization
You must have DBA authority to use this statement.
Example
A single-user DBE session is established.
START DBE 'PartsDBE.SomeGrp.SomeAcct'
ALLBASE/SQL creates an archive record.
NOTE Always use these two statements together in sequence.
BEGIN ARCHIVE
COMMIT ARCHIVE
STOP DBE
The DBEnvironment is shut down. Then the SQLUtil STORE command is used
to make an archival copy of the DBEnvironment.
MPE/iX 5.5 Documentation