ערוך

שתף באמצעות


sys.sp_manage_distributed_transaction (Transact-SQL)

Applies to: SQL Server 2022 (16.x) Azure SQL Managed Instance

sp_manage_distributed_transaction commits, aborts, or forgets a specified transaction.

Transact-SQL syntax conventions

Syntax

sp_manage_distributed_transaction
    @transaction_uow = 'transaction_ID'
    , @operation = 'value'
[ ; ]

Arguments

@transaction_uow = 'transaction_id'

Specifies the MSDTC transaction ID (transaction unit of work). @transaction_uow is uniqueidentifier.

@operation = 'value'

Specifies operation to perform. Valid values are commit, abort, or forget.

Return code values

0 (success) or 1 (failure).

Result set

None.

Permissions

Requires sysadmin fixed server role, or have CONTROL SERVER permissions.

Examples

EXEC sys.sp_manage_distributed_transaction
    @transaction_uow = '1101AD68-43A7-4DC5-B06C-2B4BEF230643',
    @operation = N'commit'