Marks the successful ending point of a user-defined transaction.
commit [tran[saction] | work] [transaction_name]
Usage
When Adaptive Server receives the commit transaction command, it notifies Component Integration Services, and Component Integration Services attempts to commit work associated with remote servers involved in the current transaction.
For all other server classes, when Adaptive Server receives the commit transaction command, it notifies Component Integration Services, and Component Integration Services attempts to commit work associated with remote servers involved 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 committed before local work. If the remote servers do not respond, or respond with errors, the transaction is aborted, including any local work.
Work performed by transactional RPC’s must be part of an explicit transaction.
transaction_name is not used by Component Integration Services in this release.
Transaction process 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).
In all other cases, when the Adaptive Server receives notification to commit a transaction, the Distributed Transaction Manager issues a CommitXact 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 (release 10.0 or later).
Transaction processing for servers in class ASIQ is identical to that of server class sql_server (release 10.0 or later).
When Component Integration Services receives notification to commit a transaction, it checks the TRANSACTION ACTIVE state of all remote participants associated with the client application. If there is more than one remote server involved in a transaction, Component Integration Services first sends a prepare transaction command to each connection with an active transaction. If all remote servers respond with no error, Component Integration Services sends a commit transaction command to each server involved in the transaction. If all remote servers again respond with no error, Component Integration Services notifies the Adaptive Server that it can commit local work.
This process applies to release 10.0 or later. Transaction handling is the same as server class db2, described below, if the server represented by server class sql_server is:
Pre-release 10.0 SQL Server
Microsoft SQL Server (any version)
Sybase IQ
Transaction processing for servers in class direct_connect is identical to that of server class sql_server (release 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, a begin transaction command precedes all insert, update and delete commands. Component Integration Services issues a commit or rollback transaction (depending on the success or failure of the statement) immediately after the statement is complete.
See Also
commit in the Adaptive Server Reference Manual.