IBM Support

Error occurs while connecting from WebSphere Application Server to Microsoft SQL Server 2005

Troubleshooting


Problem

Exceptions occur while trying to make a connection from WebSphere Application Server to Microsoft SQL Server 2005

Symptom

The following exceptions might occur when an application tries to use the Microsoft SQL Server JDBC driver to connect to Microsoft SQL Server 2005:

[9/7/11 20:59:11:229 CDT] 000014c5 XATransaction E   J2CA0027E: An exception occurred while invoking start on an XA Resource Adapter from dataSource jdbc/my_SQLServer_Datasource, within transaction ID {XidImpl: formatId(57415344), gtrid_length(36), bqual_length(54), data(0000013246c297a100000001000638d322b747843a81ae640de13fb38af221e3e08f0d9b0000013246c297a100000001000638d322b747843a81ae640de13fb38af221e3e08f0d9b000000010000000000000000000000000003)}: javax.transaction.xa.XAException: java.sql.SQLException: DTC_XA_START:Status:0 msg:*** SQLJDBC_XA DTC_ERROR Context: xa_start, state=5, StatusCode:-7 (0xFFFFFFF9) ***
at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Unknown Source)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.start(WSRdbXaResourceImpl.java:1417)
at com.ibm.ejs.j2c.XATransactionWrapper.start(XATransactionWrapper.java:1467)
at com.ibm.ws.Transaction.JTA.JTAResourceBase.start(JTAResourceBase.java:145)
at com.ibm.ws.Transaction.JTA.RegisteredResources.startRes(RegisteredResources.java:1240)
at com.ibm.ws.Transaction.JTA.RegisteredResources.enlistResource(RegisteredResources.java:648)
at com.ibm.ws.Transaction.JTA.TransactionImpl.enlistResource(TransactionImpl.java:3294)
at com.ibm.ws.Transaction.JTA.TranManagerSet.enlist(TranManagerSet.java:405)
at com.ibm.ejs.j2c.XATransactionWrapper.enlist(XATransactionWrapper.java:693)
at com.ibm.ejs.j2c.ConnectionManager.lazyEnlist(ConnectionManager.java:1926)

or

[10/11/11 7:07:35:871 CDT] 0000004b XATransaction E   J2CA0027E: An    
exception occurred while invoking start on an XA Resource Adapter from  
dataSource jdbc/my_SQLServer_Datasource, within transaction ID {XidImpl:  
formatId(57415344), gtrid_length(36), bqual_length(54),                
data(00000132f2e14418000000010000002bbafa1794098aa711ccea679da2bae683f34
1a23c00000132f2e14418000000010000002bbafa1794098aa711ccea679da2bae683f34
1a23c000000010000000000000000000000000004)}:                            
javax.transaction.xa.XAException:                                      
com.microsoft.sqlserver.jdbc.SQLServerException: Failed to create the XA
control connection. Error: "Could not find the function                
xp_sqljdbc_xa_init_ex in the library SQLJDBC_XA.dll. Reason: 127(The    
specified procedure could not be found.)."  

Cause

The cause of this issue is a mismatch of the Microsoft SQL Server JDBC driver and the extended stored procedures which are installed on the Microsoft SQL Server database server.

Resolving The Problem

To resolve the problem, it will be necessary to install the version of the sqljdbc_xa.dll file which is shipped in the installation package of the Microsoft SQL Server JDBC driver being used.

If the Microsoft SQL Server JDBC driver or the database server itself was upgraded recently, the old version of the sqljdbc_xa.dll should be removed and the latest one should be installed.

Instructions for how to do this are contained in the Microsoft SQL Server JDBC driver installation package help pages under the section entitled:
"Configuring the JDBC Distributed Transaction Components"

The basic instructions are these:
(1) Copy the correct sqljdbc_xa.dll file (32-bit or 64-bit) to the Binn directory of SQL Server.
(2) Execute the xa_install.sql database script.
(3) Add the user defined on the data source to the SqlJDBCXAUser role.

Please consult the Microsoft documentation for the full details on how to complete this task.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"DB Connections\/Connection Pooling","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF027","label":"Solaris"},{"code":"PF016","label":"Linux"},{"code":"PF010","label":"HP-UX"},{"code":"PF002","label":"AIX"}],"Version":"8.0;7.0","Edition":"Base;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21568412