Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 326

Table of Contents

Advertisement

Checkpoints, savepoints, and transaction rollback
Rolling back to a savepoint
Example
Automatic and user-defined savepoints
Naming and nesting savepoints
306
You can undo all changes after a savepoint by issuing a
. This command rolls back to the savepoint you specify, or to the
SAVEPOINT
most recent
SAVEPOINT
to savepoint n undoes all actions for all savepoints greater than or equal to n.
Normally, locks are released only at the end of a transaction. However,
ROLLBACK TO SAVEPOINT
the following scenario.
Assume that you have a series of savepoints in a transaction, and then perform
a write operation. You then roll back the transaction to an earlier savepoint. The
rollback undoes all actions after that savepoint, including the write operation
and any locks it acquires after the savepoint you are rolling back to.
IQ sets an implicit savepoint before and after every DML command. The data
page versions associated with these savepoints are released when the command
completes. If you want to retain data page versions beyond the end of a single
DML command, you need to set your own, named savepoints.
Savepoints can be named and they can be nested. By using named, nested
savepoints, you can have many active savepoints within a transaction. Changes
between a
and a
SAVEPOINT
rolling back to a previous savepoint or rolling back the transaction itself.
Changes within a transaction are not a permanent part of the database until the
transaction is committed. All savepoints are released when a transaction ends.
Savepoints cause Adaptive Server IQ to update information it maintains about
the location of available disk space. This information is used during transaction
rollback.
There is no additional overhead in using savepoints, although unreleased
savepoints may consume extra disk space by keeping older intermediate
versions active.
if you do not specify a named savepoint. Rolling back
does release locks under certain conditions, as in
RELEASE SAVEPOINT
ROLLBACK TO
can still be canceled by

Advertisement

Table of Contents
loading

Table of Contents