What kind of problem are you having accessing your SQL Server database?
ERROR CODE: 20001 and SQL STATE: HY000 accessing SQLServer database
ERROR CODE: 20001 SQL STATE: HY000 java.sql.SQLException: [Microsoft][SQLServer JDBC Driver] [SQLServer]xa_open (0) returns -3 at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) ... at com.microsoft.jdbcx.sqlserver.SQLServerDataSource.getXAConnection (Unknown Source) ...
Application fails with message stating "Cannot find stored procedure..." accessing an SQLServer database
This error can occur because the stored procedures for the Java Transaction API (JTA) feature are not installed on the Microsoft SQL Server.
To resolve the problem: Repeat the installation for the stored procedures for the JTA feature, according to the ConnectJDBC installation guide.
ERROR CODE: SQL5042 when running a Java application
Cannot connect to SQL Server 2000 running on Windows Server 2003 when using XA data source
Symptom
When using XA data source to connect to SQL Server 2000, running on Windows® 2003, you receive the following exception:
java.sql.SQLException: [IBM][SQLServer JDBC Driver][SQLServer]xa_open (0) returns -3You might also see the following exceptions in WebSphere Application Server SystemOut.log:
[9/21/04 16:57:53:284 CST] 558bbb0a FreePool E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/lmDS, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a XAConnection from the DataSource. at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init> (DataStoreAdapterException.java:244) at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init> (DataStoreAdapterException.java:171) at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException (AdapterUtil.java:209) at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection (DSConfigurationHelper.java:911) at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection (WSRdbDataSource.java:675) .... Caused by: java.sql.SQLException: [IBM][SQLServer JDBC Driver] [SQLServer]xa_open (0) returns -3 at com.ibm.websphere.jdbc.base.BaseExceptions.createException (Unknown Source) ---- Begin backtrace for nested exception java.sql.SQLException: [IBM][SQLServer JDBC Driver][SQLServer] xa_open (0) returns -3 at com.ibm.websphere.jdbc.base.BaseExceptions.createException (Unknown Source) at com.ibm.websphere.jdbc.base.BaseExceptions.getException (Unknown Source)
Problem
XA transactions are disabled by default on Windows Server 2003. Microsoft® Windows Server 2003, Microsoft Distributed Transaction Coordinator (MS DTC) requires the creation of registry values for all XA DLLs that you plan to use.
Solution
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\XADLL
Name | Type | Value |
sqljdbc.dll | String (REG_SZ) | c:\Program Files\Microsoft SQL Server\MSSQL\Binn\sqljdbc.dll |
For more details, see the following Microsoft document:
INFO: Registry Entries Are Required for XA Transaction SupportRelated tasks
Troubleshooting by task
Troubleshooting by component
Example: Accessing data using IBM extended APIs to share connections
between container-managed and bean-managed persistence beans
Related reference
Cannot access a data source
Problems accessing an Oracle data source
Problems accessing a DB2 database
Problems accessing a Cloudscape database
Problems accessing a Sybase data source
Extensions to data access APIs