What the Options Mean
DECLARE TRANSACTION…
declares the described transaction, without activating it.SET TRANSACTION…
, on the other hand, activates the transaction, temporarily switching the SQL_ATTR_AUTOCOMMIT
global attribute of the ODBC API to SQL_AUTOCOMMIT_OFF
.The transaction will have to be finished explicitly;when it ends, the abiding rule of the API resumes.
LOCAL
limits a transaction to acting only within the context of the current connection.
NAME transaction-name
is a uniquely-named transaction, prepared for use by any connections in the global environment.
USING namedUniqueWorkspace
is a uniquely-named transaction workspace in which NAME transaction-name
can be set to run by any connections in the global environment.Identically named transactions with differing parameters can run in the same named workspace.