Rolls a user-defined transaction back to the last savepoint inside the transaction or to the beginning of the transaction.
rollback {transaction | tran | work} [transaction_name | savepoint_name ]
Usage
When the Distributed Transaction Manager (DTM) is enabled, DTM handles all transaction processing for servers of server class ASEnterprise with a version of 12.0 or later.
For all other server classes, Adaptive Server notifies Component Integration Services when it receives a rollback transaction command and Component Integration Services attempts to rollback work associated with remote servers in the current transaction.
Multiple remote servers can be involved in a single transaction, each with their own unit of work which is associated with the Adaptive Server unit of work.
Remote work is rolled back before local work.
Work performed by transactional RPC’s is included in the local transaction and can be rolled back if the remote server supports RPC’s within transactions.
transaction_name and savepoint_name is not used by Component Integration Services in this release.
Transaction processing for servers in class ASEnterprise with a version prior to 12.0 is identical to that of server class sql_server (release 10.0 or later).
When DTM is not enabled, transaction processing for all servers in class ASEnterprise is identical to that of server class sql_server (release 10.0 or later).
When the Adaptive Server receives notification to rollback a transaction, the Distributed Transaction Manager issues a RollbackXact RPC to all remote participants having a server class of ASEnterprise.
Transaction processing for servers in class ASAnywhere is identical to that of server class sql_server (version 10.0 or later).
Transaction processing for servers in class ASIQ is identical to that of server class sql_server (version 10.0 or later).
When Component Integration Services receives notification that a transaction is to be rolled back, it checks the TRANSACTION ACTIVE state of all remote connections associated with the client application. For each connection with an active transaction, Component Integration Services sends a rollback transaction. If all remote servers respond with no error, Component Integration Services notifies the Adaptive Server that it can begin to roll back local work.
This process applies to version 10.0 or later, but not to the following servers represented by server class sql_server is:
Pre-version 10.0 SQL Server
Microsoft SQL Server (any version)
Sybase IQ
For these types of servers, transaction handling is similar to server class db2, described below.
Transaction processing for servers in class direct_connect is identical to that of server class sql_server (version 10.0 or later).
Transactions are supported only at the statement level for servers in class db2. When the internal state of a client connection indicates that there is an active transaction, Component Integration Services precedes each insert, update and delete command with a begin transaction command. It then issues a commit or rollback transaction (depending on the success or failure of the statement) immediately after the statement is complete.
files are not part of transaction management. They can not be committed or rolled back.
directories are not part of transaction management. They can not be committed or rolled back.
See Also
rollback in the Adaptive Server Reference Manual.