Previous Topic: REVOKE Table Access PrivilegesNext Topic: SELECT


ROLLBACK

The ROLLBACK transaction management statement performs the following tasks:

Authorization

None required.

Syntax
►►─── ROLLBACK work ─┬───────────┬────────────────────────────────────────────►◄
                     └─ RELEASE ─┘
Parameters
RELEASE

Directs CA IDMS to end the current SQL session and the current transaction after canceling the changes to the database.

The RELEASE parameter is a CA IDMS extension of the SQL standard.

Usage

Effect of a ROLLBACK on an SQL Session

A ROLLBACK statement has the following impact on the SQL session and its transaction:

Effect of Transaction Sharing

If more than one database session is sharing the SQL session's transaction, the changes made by all sharing sessions are immediately rolled back. All sharing sessions other than the one through which the ROLLBACK statement was issued are flagged to indicate that they must also issue a ROLLBACK. If the next statement issued by each of these sessions is not a ROLLBACK, it will receive an error:

Example

Canceling Database Changes

The following ROLLBACK statement cancels the uncommitted changes to the database made during the current transaction and ends both the transaction and the current SQL session:

EXEC SQL
   ROLLBACK RELEASE
END-EXEC
More Information