Article ID: 246870 - Last Review: July 3, 2008 - Revision: 6.1 MTS/IIS interoperability with IBM DB2 using two-phase commit through MSDTC/XA
This article was previously published under Q246870 We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 7.0 running on Microsoft Windows Server 2008. IIS 7.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site: http://www.microsoft.com/technet/security/prodtech/IIS.mspx
(http://www.microsoft.com/technet/security/prodtech/IIS.mspx)
For more information about IIS 7.0, visit the following Microsoft Web site: http://www.iis.net/default.aspx?tabid=1
(http://www.iis.net/default.aspx?tabid=1)
On This PageSUMMARY Any transactional Microsoft Transaction Server (MTS)
activity (in other words, a transactional MTS component or Internet Information
Server [IIS] Active Server Page) calls upon Microsoft Distributed Transaction
Coordinator (MSDTC) to initiate an OLE TX transaction, which is a two-phase
commit protocol. When an ODBC connection, or a connection to any other
transactional resource manager via a resource dispenser, is made from that
activity, it is enlisted in the transaction. Currently, IBM DB2 does not support OLE TX directly as a two-phase commit (2PC) protocol, but it does support XA. Microsoft SQL Server supports OLE TX directly as a 2PC protocol. Therefore, the OLE TX initiated by MSDTC must be mapped to an XA transaction. For information about how to do this, see the "Mapping OLE Transactions to the XA Protocol" paper. This paper is avalable from the following link: ftp://ftp.microsoft.com/bussys/viper/docs/OLETxToXa.Doc
(ftp://ftp.microsoft.com/bussys/viper/docs/OLETxToXa.Doc)
This article provides technical information for developers who
are deploying Windows DNA applications using DB2, including:
MORE INFORMATIONDriver and connectivity configurations for DB2To get 2PC support for DB2, you must use IBM Client Connect software, including the IBM ODBC driver for DB2. For more information about this product, visit the following IBM Web site:http://www-01.ibm.com/software/data/db2/db2connect/
(http://www-01.ibm.com/software/data/db2/db2connect/)
You can use other database connectivity software for
nontransactional DB2 clients, including the ODBC driver included with Microsoft
SNA Server. For more information about Microsoft SNA Server, visit the
following Microsoft Web site: http://www.microsoft.com/hiserver/snaserver/default.mspx
(http://www.microsoft.com/hiserver/snaserver/default.mspx)
Use the following table to determine which driver and
connectivity software configuration meets your needs
Collapse this table
Recommended software for MTS/IIS ServerFor DB2 connectivity, it is recommended that you obtain the following software updates.Windows NT 4.0 Service Pack 5 or laterMSDTC maintains two transaction log files for outstanding transactions, one for OLE TX information (Msdtc.log) and the other for XA information (Dtcxatm.log). Among other fixes, Windows NT Service Pack 5 includes bug fixes to MSDTC's XA log file management and therefore should be applied for maximum stability. For more information, click the following article number to view the article in the Microsoft Knowledge Base:229613
(http://support.microsoft.com/kb/229613/
)
Dtcxatm.log file grows
unexpectedly large
For information about Windows NT 4.0 Service Pack 5 or Service
Pack 6, visit the following Microsoft Web site: http://www.microsoft.com/technet/archive/downloads/winnt.mspx
(http://www.microsoft.com/technet/archive/downloads/winnt.mspx)
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
241211
(http://support.microsoft.com/kb/241211/
)
List of bugs fixed in Windows NT 4.0 Service Pack 6/6a (part 1)
DB2 UDB v5.2 Fix Pack 11 or laterThere have been fixes to IBM Client Connect when using XA transaction, including:
Microsoft Data Access Components (MDAC) 2.1 Service Pack 2MDAC 2.1 Service Pack 2 includes the latest updates to ActiveX Data Objects (ADO), OLE DB, and ODBC. Because your application most likely uses one or more of these technologies, you may want to install this latest version which includes many bug fixes.Note There is no functional requirement to use a particular version of MDAC for DB2 connectivity. To obtain MDAC 2.1, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/data/aa937730.aspx
(http://msdn2.microsoft.com/en-us/data/aa937730.aspx)
Application design considerationsAssuming that you are using an ODBC driver, you can use one of the following approaches for DB2 connectivity from your application.Coding to the ODBC APIApplication -> ODBC API -> ODBC Driver Collapse this table
Coding to the OLE DB InterfacesApplication -> OLE DB Interfaces -> OLE DB Provider for ODBC -> ODBC API -> ODBC Driver Collapse this table
ADO (ActiveX Data Objects)Application -> ADO -> OLE DB Interfaces -> OLE DB Provider for ODBC -> ODBC API -> ODBC Driver Collapse this table
Because IBM DB2 implementation of XA support is one-pipe, versus two-pipe, the physical database connection to DB2 must be kept open for the lifetime of the transaction. Therefore, some sort of database connection pooling must be used for a 2PC (XA) transaction to work. This is because after a transactional component's method call has completed, MSDTC will typically be notified to abort or commit the transaction. These transactional commands must go over the same database connection the actual database commands (SQL) were issued over; it's a one-pipe implementation. MDAC implements two types of database connection pooling, ODBC connection pooling and OLE DB session pooling. Depending on the interface chosen to call from your application for DB2 connectivity, one or both of these may come into play. Refer to the API choices listed previously to determine which is available for your application. Avoiding deadlocksDepending on the isolation level used for a particular database connection, locks may be held on DB2 resources (tables, pages, rows, and so on) for the lifetime of a transaction. In the current implementation of DB2, each connection is treated as its own transaction, meaning that multiple connections enlisted in the same transaction cannot "share" locks. For example:MTS Transaction Component 'A'
Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information. | Other Resources Other Support Sites
CommunityGet Help NowArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
