xa_bqual

Returns the binary version of the bqual component of an ASCII XA transaction ID.

Syntax

xa_bqual(xid, 0)

Parameters

Examples

Usage

If an external transaction is blocked on the SAP ASE server and you are using sp_lock and sp_transactions to identify the blocking transaction, you can use the XA transaction manager to terminate the global transaction. However, when you execute sp_transactions, the value of xactname it returns is in ASCII string format, while XA Server uses an undecoded binary value. Using xa_bqual thus allows you to determine the bqual portion of the transaction name in a format that can be understood by the XA transaction manager.

xa_bqual returns:

  • The translated version of this string that follows the second “_” (underscore) and preceeds either the third “_” or end-of-string value, whichever comes first.

  • NULL if the transaction ID cannot be decoded, or is in an unexpected format.

Note: xa_bqual does not perform a validation check on the xid, but only returns a translated string.

See also sp_lock, sp_transactions in Reference Manual: Procedures.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can use xa_bqual.

Related reference
xa_gtrid