I am trying to use SQL Anywhere with Liquibase which should support it. I have encountered the following iAnywhere JDBC driver issue when trying to connect to it:

Caused by: java.sql.SQLException: [Sybase][JDBC Driver]Driver not capable at sybase.jdbc4.sqlanywhere.IDatabaseMetaData.getTablesN(Native Method) at sybase.jdbc4.sqlanywhere.IDatabaseMetaData.getTables(IDatabaseMetaData.java:720)

I have tried both with sajdbc4.jar and sajdbc.jar both seems to have this problem.

Could you please help me with this issue. Is there any other JDBC driver available? I have tried also jConnect in past but against SQL Anywhere 12 it has some issues with UTF8.

asked 30 Sep '11, 02:26

MartinH's gravatar image

MartinH
16112
accept rate: 0%


My guess is that Liquibase is passing in a catalog value and SA does not support catalogs. My suggestion would be to stick with the SQL Anywhere JDBC driver, but do the following:

1) create an ODBC DSN to connect to SQL Anywhere
2) Within the ODBC DSN, make sure you check the "Prevent driver not capable errors" check box.
3) Change your URL to be something like "jdbc:sqlanywhere:dsn=YourDSNFrom2Above;...

See if that gets you further.

permanent link

answered 07 Oct '11, 16:05

Karim%20Khamis's gravatar image

Karim Khamis
5.6k53870
accept rate: 40%

1

Note for others coming back to this thread: Only versions of Liquibase 2.x have this issue. This issue is resolved in Liquibase 3.x and higher.


Another alternative to using Karim's work-around above would be to directly use the ODBC option in the JDBC URL string, via the "PreventNotCapable" option:

 jdbc:sqlanywhere:uid=dba;pwd=sql;eng=demo;PreventNotCapable=y

(05 Jan '15, 14:23) Jeff Albion
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:

×67

question asked: 30 Sep '11, 02:26

question was seen: 1,687 times

last updated: 05 Jan '15, 14:26