ALLBASE/SQL Reference Manual (36216-90216)

316 Chapter10
SQL Statements A - D
CHECKPOINT
CHECKPOINT
The CHECKPOINT statement causes an ALLBASE/SQL system checkpoint to be taken.
Scope
ISQL or Application Programs
SQL Syntax
CHECKPOINT [:
HostVariable
:
LocalVariable
:
ProcedureParameter
]
Parameters
HostVariable
identifies an output host variable used to communicate the
amount of log space available for use. The host variable is
an integer.
LocalVariable
contains a value in a procedure.
ProcedureParameter
contains a value that is passed into or out of a procedure.
Description
Specifying a host variable with CHECKPOINT statement in an application allows you to
determine how much free space is available in the log file.
The
LocalVariable
parameter is used in the stored procedure for obtaining free log
space.
When you can use the host variable in a CHECKPOINT statement in an application
program or procedure, the host variable can be omitted if you don't need to know the
number of free blocks available.
When you enter a CHECKPOINT statement interactively in ISQL, you cannot specify a
host variable. Returned information is displayed on the screen.
Checkpoint processing is as follows:
Contents of the log buffers are written to the log files(s).
Data buffers containing changed pages are written to DBEFiles.
A checkpoint record containing a list of the transactions currently in progress is
written in the log.
When nonarchive logging is in effect, space containing log records written prior to
the beginning of the oldest incomplete transaction is made available for reuse. When
archive logging is in effect, however, this step is skipped and no log file space is
recovered by checkpoints.