Transactions

Each transaction is a sequence of logically related commands that accomplish one task and transform the database from one consistent state into another.

Transactions are atomic; SAP Sybase IQ executes all the statements within a transaction as a unit. At the end of each transaction, changes are committed to make them permanent. If for any reason any of the commands in the transaction do not process properly, some or all of the intermediate changes can be undone, or rolled back. The user application controls the conditions under which changes are committed or rolled back.

Transactions are made up of small blocks. The completion of each block marks a point at which the information is self-consistent. Transaction processing is fundamental to ensuring that a database contains correct information.

In most cases, SAP Sybase IQ transactions begin and end automatically, based on the commands being issued, and the options set. You can also issue explicit commands to begin or end a transaction.

Transactions start automatically with the first statement following either:

SAP Sybase IQ also supports SAP Sybase IQ Transact-SQL commands, such as BEGIN TRANSACTION, for compatibility with Adaptive Server. You can explicitly start a transaction using the BEGIN TRANSACTION command.

Transactions complete with one of these events:

Database definition commands, such as ALTER, CREATE, and DROP all have the side effect of an automatic commit.

You can use savepoints to identify important states within a transaction and return to them selectively or cause other actions to occur.

Related reference
CHECKPOINT Statement
SAVEPOINT Statement