Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » UltraLite - Database Management and Reference » UltraLite Database Reference » UltraLite connection parameters reference

 

UltraLite COMMIT_FLUSH connection parameter

Determines when committed transactions are flushed to storage after a commit call. If no calls to commit are made by the UltraLite application, no flush can occur.

Syntax
COMMIT_FLUSH={ immediate | grouped | on_checkpoint }
Default

immediate

Remarks

This connection parameter defines which transactions are recovered following a hardware failure or crash. You can group logical autocommit operations as a single recovery point.

By grouping these operations, you can improve UltraLite performance, but at the expense of data recoverability. There is a slight chance that a transaction may be lost—even though it has been committed—if a hardware failure or crash occurs after a commit, but before the transaction is flushed to storage.

The following parameters are supported:

  • immediate   Committed transactions are flushed to storage immediately upon a commit call before the commit operation completes.

  • grouped   Committed transactions are flushed to storage on a commit call, but only after a threshold you configure has been reached. You can configure either a transaction count threshold with the commit_flush_count database option or a time-based threshold with the commit_flush_timeout database option.

    If set, both the commit_flush_count and the commit_flush_timeout options act as possible triggers for the commit flush; the first threshold that is met triggers the flush. When the flush occurs, UltraLite sets the counter and the timer back to 0. Then, both the counter and timer are monitored, until one of these thresholds is reached again.

  • on_checkpoint   Committed transactions are flushed to storage on a checkpoint operation. You can perform a checkpoint with any of the following:

    • The CHECKPOINT statement. APIs that do not have a checkpoint method must use this SQL statement.
    • The ULCheckpoint function for UltraLite embedded SQL.
    • The Checkpoint method on a connection object in a C++ component.

See also