Data access problems for Sybase data sources

This article provides troubleshooting tips for accessing Sybase data sources.

What kind of problem are you having accessing your Sybase database?

Sybase Error 7713: Stored Procedure can only be executed in unchained transaction mode

This error occurs when either:
  • The JDBC attempts to put the connection in autocommit(true) mode.
  • A stored procedure is not created in a compatible mode.

To fix the autocommit(true) mode problem, let the application change the connection to chained mode using the Connection.setAutoCommit(false) mode, or use a set chained on language command.

To resolve the stored procedure problem, use the sp_procxmode procedure_name anymode command.

JZ0XS: The server does not support XA-style transactions. Please verify that the transaction feature is enabled and licensed on this server

This error occurs when XA-style transactions are attempted on a server that does not have Distributed Transaction Management (DTM) installed.

To resolve this problem, use the instructions in the Sybase Manual titled: Using Adaptive Server Distributed Transaction Management Features to enable Distributed Transaction Management (DTM). The main steps in this procedure are:
  1. Install the DTM option.
  2. Check the license.dat file to verify that the DTM option is installed.
  3. Restart the license manager.
  4. Enable DTM in ISQL.
  5. Restart the ASE service.

Container managed persistence (CMP) enterprise bean is causing exceptions

This error is caused by improper use of reserved words. Reserved words cannot be used as column names.

To correct this problem: Rename the variable to remove the reserved word. You can find a list of reserved words in the Quick Reference Guide for Sybase Adaptive Server Enterprise 15.5. This manual is available online at: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc70202.1550/html/quickref/CACIGGEB.htm.

Database deadlocks and XA_PROTO errors occur when using Sybase

When using Sybase with the IBM® WebSphere® Application Server, do one of the following to prevent database deadlocks and errors:
  • Change the transaction isolation level on the connection to TRANSACTION_READ_COMMITTED. Set the isolation level on the connection for unshareable connections or, for shareable connections, define the isolation levels in the resource reference for your data source using an assembly tool.
  • Modify Sybase by doing one of the following:
    • If you want to use the existing tables, modify the table locking scheme using the alter table table name lock datarows command to get a row lock level granularity.
    • If you want to set the system-wide locking scheme to data rows, all subsequently created tables inherit that value and have a locking scheme of data rows.
      Note: You must drop your original databases and tables.

Sybase does not throw an exception when an incorrect database name is specified

Verify that your database name is correctly entered on the data source properties.

Most databases (DB2®, Oracle, Informix® , MS SQL Server and Apache Derby) throw an exception when the database specified does not exist. But Sybase does not throw an exception when an incorrect database name is specified. Sybase generates an SQL warning and then connects to the default database. If you misspell the requested database name, Sybase connects you to the master or the default database where the table you requested is not found.

If none of these steps fixes your problem, check to see if the problem has been identified and documented by looking at the available online support (hints and tips, technotes, and fixes). If you do not find your problem listed there, contact IBM Support.