Data access problems for Microsoft SQL Server data sources

Use troubleshooting tips for help accessing Microsoft SQL Server data sources.

What problem are you having accessing your Microsoft SQL Server database?

Hang in Microsoft SQL Server JDBC Driver V2.0 after connection error

If you are using version 2.0 of the Microsoft SQL Server JDBC Driver (other versions do not have the problem), you might experience a hang after a connection error occurs. The following test fix from Microsoft fixes this problem: http://support.microsoft.com/kb/977924

ERROR CODE: 20001 and SQL STATE: HY000 accessing SQLServer database

The problem might be that the distributed transaction coordinator service is not started. Look for an error similar to the following example when attempting to access a Microsoft SQL Server 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) ...
To confirm this problem:
  1. Go to the Windows Control Panel > Services. Or, click Control Panel > Administrative Tools > Services.
  2. Verify whether the service Distributed Transaction Coordinator or DTC is started.
  3. If not, start the Distributed Transaction Coordinator service.

Application fails with message stating "Cannot find stored procedure..." accessing a Microsoft SQL Server 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 JDBC driver installation guide.

ERROR CODE: SQL5042 when you run a Java application

This error can occur when you configure your application to run in the following manner:
  1. You use a type 2 (application) driver running on the gateway to the OS 390
  2. Your application is an XA application.
OS 390 does not use XA, but uses SPM. To resolve the problem:
  1. Check your dbm cfg to see that the SPM is not started on the gateway.
  2. Assign a port and set the db2comm variable to TCPIP.
  3. Update the dbm cfg value SPM_NAME to use your machine name.
  4. Start the SPM on the gateway.
Reference topic    

Terms and conditions for information centers | Feedback

Last updated: April 18, 2014 05:01 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-nd-iseries&topic=rtrb_dsaccess4
File name: rtrb_dsaccess4.html