JDBC Sybase Adapter Configuration

Hi,

I wonder if any one has successfully configured a JDBC adapter for a Sybase database. I wonder if you need to enter ‘jconn2d.jar’ in the ‘Add to CLASSPATH’ field name, and where would you obtain that file?

Also in the connection string (URL) field, does this seem to be correct?
“jdbc:Sybase:Tds:MyServer01:5000/dMyDatabase50” Many thanks.

Quang

I have configured a Sybase JDBC adapter. I used this as my JDBC driver: com.sybase.jdbc2.jdbc.SybDriver

I did have to add jconn2d.jar to the class path. I downloaded JConnect 5.5 from the Sybase web site to get this file.

Also you have to run a server side install on the database for the JDBC metadata tables. The SQL for this comes with JConnect. They’re in the sp directory.

Your url looks OK, but in my url Sybase is not capitalized.

Steve

Steve,

Thanks for your valueable time and your thoughtful response. It is helpful so far.

About the server side install on the database, is that something we would tell the DBA to do? And also, the reason for the install is for the adapter configuration? Thanks again!

Quang

Yes, your DBA would probably have to run the server side install. You do need to do this before you can enable the adapter. If you don’t, you will get an error that the Meta data tables are missing. You can try to configure the adapter with out it, if you get the error, you’ll know how to fix it. Are configuring this adapter using Adapter Manager or Adapter config? I know Adapter Manager gives a error about the Meta data tables.

Steve

I ended up using the info below and it worked:
Driver: com.sybase.jdbc.SybDriver
URL: jdbc:sybase:Tds:mySYBDEVserver:2025/mySybDBMS50
JConnect 4.2: jconnect.jar

JDBC2 and JConnect 5.5 are probably too new for the version of Sybase I am trying to connect (Sybase 12).

Quang

What version of Sybase are you running? I’m trying to connect to Sybase 11.5 witn JConnect 5.2 and 5.5 and it doesn’t work. I can connect to Sybase 12.0 but not 11.5. Has any one connected to Sybase 11.5 with a JDBC adapter?

Thanks,
Steve

Hi,

I am using webMethods 6.0.1,Sybase SQL Anywhere Studio 8.0.2 and JConnect 5.5 JDBC Driver. In the documents no where webMethods mentioned that webMethods 6.0.1 supports Sybase. I am able to Connect to the Sybase Server 12.5 using the WmDB Package.Through services it is working fine.

I am trying to configure the JDBC Adapter to connect Sybase Server.
I am getting the following error while enabling the Connection.

Error encountered
[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource SybaseFolder:Test.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
[ADA.1.204] Cannot connect to the database with DataSource class “com.sybase.jdbc2.jdbc.SybConnectionPoolDataSource”.
JZ0S3: The inherited method getConnection() cannot be used in this subclass.

Can anyone tell, what would be the problem?

Thanks in Advance.
Thota

You are using the wrong data source class.

hi,
Was somebody able to connect to Sybase Adaptive Server Anywhere(Sybase SQLAnywhere) database. If yes can u please let me know the adaptor setting.

I am able to connect to database using java code. Class.forName(“com.sybase.jdbc2.jdbc.SybDriver”).newInstance() ;
url = “jdbc:sybase:Tds:localhost:2639”;
conn = DriverManager.getConnection (url, “dba”, “sql”);
conn.setAutoCommit(true);

but when i use this same setting in WM Adaptpr it gives me following error.
Error encountered

[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource TEST:Conn_psdb.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
null

I tried both the setting using LOCAL_TRANSACTION AND XA_TRANSACTION.

Thank you

I’m not sure on where “Sybase Adapter Server Anywhere” fits in the Sybase Database server version (ie. 11.x, 12.x or something else). But what I can tell you is that the JDBC Adapter officially supports Sybase 11.x and 12.x using Sybase jConnect 6.5 type 4. I can also tell you that you do not use “Driver” style JDBC classes with the JDBC adapter, instead you use DataSource styles.

The class to use if using jConnect 6.5 for Sybase 11.x/12.x is:

For NO_TRANSACTION and LOCAL_TRANSACTION:
com.sybase.jdbc2.jdbc.SybDataSource

For XA_TRANSACTION:
com.sybase.jdbc2.jdbc.SybXADataSource

Check the JDBC Adapter 6.0.3 Installation Guide and Users guide for more details.

James…