CHAPTER 8 Transactions and Versioning
307
Rolling back transactions
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.
What causes a rollback
Rollbacks can occur either due to an explicit user request, or automatically.
You use a
ROLLBACK
statement to undo any changes to the database since the
last
COMMIT
or
ROLLBACK
.
You use a
ROLLBACK TO SAVEPOINT
statement to undo any changes to the
database since the
SAVEPOINT
you name, or else to the last
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.
Effect of 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”.
System recovery
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.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...