Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi,

We have a remote Sybase db that provides only an odbc driver. Our Java application runs on a separate machine. I assume I need a Type 3 JDBC driver where the proxy on the db machine needs a jdbc/odbc bridge to Sybase. Is this feature supported by SQL Anywhere? If not, I'd really appreciate if someone could point me in the right direction.

Thanks a ton.

asked 14 Jun '11, 20:42

VirtualCorner's gravatar image

VirtualCorner
1111
accept rate: 0%

Are you using SQL Anywhere (in contrast to Sybase ASE?)

The following doc for JDBC support in SQL Anywhere may be of help. Note, it's for version 12, older versions have somewhat different support.

(15 Jun '11, 03:31) Volker Barth
Replies hidden

Here's a further reference from Jason's blog on the various JDBC driver versions in SQL Anywhere 9.0.2 and above.

(15 Jun '11, 07:53) Volker Barth

If you are using ASE, then you can use the jConnect JDBC driver that is available with ASE. Note that jConnect is a Type-4 driver so there is no need for ODBC or any other native component. If you are using SQL Anywhere, then you can use the SQL Anywhere JDBC driver that came with your copy of SQL Anywhere. In SQL Anywhere 12, the SA JDBC driver is a Type-2 driver and does not require any ODBC component. In SQL Anywhere 11 and below, the SA JDBC driver (known as the iAnywhere JDBC driver in these older versions) is a Type-1 driver and will happily work with the SQL Anywhere ODBC driver that came with your version of SQL Anywhere. There is no officially supported Type-3 JDBC driver for either SQL Anywhere or ASE.

One final note, the jConnect driver that I mentioned above for ASE also works with SQL Anywhere. If you are using SQL Anywhere, and if your particular environment demands a pure JAVA driver (which jConnect is since it is a Type-4 driver), then you can go ahead and use jConnect with SQL Anywhere. I should point out though, that in general we recommend that you use the SQL Anywhere JDBC driver with SA since it tends to be better geared towards SA and generally performs better than jConnect WHEN talking to SA. But, if you are using ASE, then you have NO choice but to use jConnect with ASE. Note that jConnect is geared towards ASE and performs quite well when talking to ASE.

HTH Karim

permanent link

answered 15 Jun '11, 07:58

Karim%20Khamis's gravatar image

Karim Khamis
5.7k53870
accept rate: 40%

1

I was asked this morning what exactly is a Type-3 driver. Allow me to elaborate.

A Type-1 driver has a JAVA layer that talks JDBC to the application and then loads a non-JAVA ODBC driver which talks ODBC to the data source. The iAnywhere JDBC driver in SA 11 and below is a Type-1 driver since it has a JAVA layer that provides the JDBC interface and then subsequently loads the SA JDBC driver to talk to SQL Anywhere.

A Type-2 driver has a JAVA layer that talks JDBC to the application and a non-JAVA layer that talks to the data source using a native protocol. The SQL Anywhere JDBC driver in SA 12 is a Type-2 driver since it has a JAVA layer that provides the JDBC interface and a non-JAVA layer that talks directly to SQL Anywhere without using ODBC.

A Type-3 driver is a pure JAVA JDBC driver that uses a non-native protocol to talk to the data source. For example, a user who wanted to use jConnect to talk to SQL Anywhere 5.5 would first have to run something called the Open Server Gateway. The user would then use jConnect which is a pure JAVA JDBC driver to talk directly to the Open Server Gateway using the TDS protocol, and the Open Server Gateway would subsequently talk to SQL Anywhere 5.5. So in SA 5.5, jConnect is considered a Type-3 driver since it is a pure JAVA JDBC driver that does not use a native protocol to talk to SQL Anywhere 5.5.

A Type-3 JDBC driver can also be a pure JAVA JDBC driver that provides the JDBC interface to the application, but then subsequently loads a secondary, third party supplied, pure JAVA piece that talks to the target data source.

A Type-4 driver is a pure JAVA JDBC driver that talks to the data source using a native protocol. Unlike SQL Anywhere 5.5, SQL Anywhere 6.0.0 and up allows jConnect to connect directly without requiring the Open Server Gateway as a go-between. As a result, jConnect is a Type-4 JDBC driver for SQL Anywhere 6.0.0 and up.

Karim

(15 Jun '11, 08:39) Karim Khamis
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×86

question asked: 14 Jun '11, 20:42

question was seen: 2,245 times

last updated: 15 Jun '11, 08:39