Rolling Back Transactions; System Recovery - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

Rolling back transactions

What causes a rollback
Effect of rollback

System recovery

When you roll back a transaction, you undo all of the operations in that
transaction. We say that you are rolling back the database, since you are
returning the database to an earlier state.
Rollbacks can occur either due to an explicit user request, or automatically.
You use a
statement to undo any changes to the database since the
ROLLBACK
last
or
COMMIT
ROLLBACK
You use a
ROLLBACK TO SAVEPOINT
database since the
SAVEPOINT
Adaptive Server IQ rolls back the database automatically if a user is in a
transaction and then logs out or disconnects without committing. The rollback
is to the most recent commit or rollback.
Rollback returns both the main and temporary stores to their former state. It
also releases locks:
Transaction rollback releases all locks held by the transaction.
Rollback to a savepoint releases all locks acquired after that savepoint.
Rollback of open cursors deletes all cursor information and closes both hold
and non-hold cursors:
Transaction rollback closes all cursors. It does not matter whether the
cursor was opened in the transaction being rolled back, or in an earlier
transaction.
Rollback to a savepoint closes all cursors opened after that savepoint.
For more information on cursors, see "Cursors in transactions". For more
information on rollback to a savepoint, see "Rolling back to a savepoint".
In the event of a system failure or power outage, or when you restart the
database server after it has been stopped, Adaptive Server IQ attempts to
recover automatically.
CHAPTER 8
Transactions and Versioning
.
statement to undo any changes to the
you name, or else to the last
.
SAVEPOINT
307

Advertisement

Table of Contents
loading

Table of Contents