Transaction identification in systransactions

Adaptive Server stores transaction names in a column of varchar(255) (as compared to varchar(64) in previous server versions) to accommodate the length and format of transaction names supplied by different distributed transaction protocols. In the X/Open XA protocol, for instance, distributed transactions are assigned a transaction name consisting of both a global transaction ID (gtrid) and a branch qualifier. Within Adaptive Server, this information is combined in the xactname column of the systransactions table.

systransactions.xactname stores the names of both externally-created distributed transactions (defined by an X/Open XA transaction manager or MSDTC) and local server transactions. Clients defining local transactions can name those transactions anything they wish, within the confines of the varchar(255) column. Similarly, external transaction managers can use a variety of different formats to name a distributed transaction.


Transaction keys

The transaction key, stored in the xactkey column of systransactions, acts as a unique internal handle to a server transaction. For local transactions, xactkey ensures that transactions can be distinguished from one another, even if the transaction name is not unique to the server.

Beginning with Adaptive Server version 12.0, all system tables refer to systransactions.xactkey to uniquely identify a transaction. The sysprocesses and syslogshold tables are the only exceptions to this rule—they reference systransactions.xactname and truncate the value to a length of varchar(64) (for sysprocesses) and varchar(67) (for syslogshold), to maintain backward compatibility with earlier Adaptive Server versions.