Performing Distributed Transactions
Collapse the table of content
Expand the table of content

Performing Distributed Transactions


System_CAPS_ICON_warning.jpg Warning

SQL Server Native Client (SNAC) is not supported beyond SQL Server 2012. Avoid using SNAC in new development work, and plan to modify applications that currently use it. The Microsoft ODBC Driver for SQL Server provides native connectivity from Windows to Microsoft SQL Server and Microsoft Azure SQL Database.

The Microsoft Distributed Transaction Coordinator (MS DTC) allows applications to extend transactions across two or more instances of SQL Server. It also allows applications to participate in transactions managed by transaction managers that comply with the Open Group DTP XA standard.

Normally, all transaction management commands are sent through the SQL Server Native Client ODBC driver to the server. The application starts a transaction by calling SQLSetConnectAttr with the autocommit mode turned off. The application then performs the updates comprising the transaction and calls SQLEndTran with either the SQL_COMMIT or SQL_ROLLBACK option.

When using MS DTC, however, MS DTC becomes the transaction manager and the application no longer uses SQLEndTran.

When enlisted in a distributed transaction, and then enlist in a second distributed transaction, the SQL Server Native Client ODBC Driver defects from the original distributed transaction and enlists in the new transaction. For more information, see DTC Programmer's Reference.

Performing Transactions (ODBC)

Community Additions

© 2016 Microsoft