cancel
Showing results for 
Search instead for 
Did you mean: 

jTDS on SA12: Error -83: Specified database not found

0 Kudos
4,907

Hi, I'm trying connect to a SA12 database using jTDS driver. I've used the following setting:

driver="net.sourceforge.jtds.jdbc.Driver";
url="jdbc:jtds:sybase://10.0.0.251:2638/testdb;tds=4.2";

obtaining the following error:

java.sql.SQLException: SQL Anywhere Error -83: Specified database not found
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
    at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:610)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:345)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at it.cointa.FullOdbcTest.jTDS(FullOdbcTest.java:55)
    at it.cointa.FullOdbcTest.main(FullOdbcTest.java:38)

What's the problem (of course db engine and database exists ! ....) ????
I've also tried on a ASA9 db, with the same results....
Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

I've taken a look on jTDS forum and SqlAnywhere seems not supported 😞

jeff_albion
Product and Topic Expert
Product and Topic Expert
0 Kudos

This is probably true - SQL Anywhere has explicit support for jConnect via the 'ALTER DATABASE UPGRADE JCONNECT ON' statement (which installs the metadata stored procedures that jConnect uses to collect information about the system tables of the SQL Anywhere database). jTDS is likely assuming 'ASE' is the target database, so it may not be issuing appropriate SQL calls to get the information back.

This shouldn't be a big issue for you: jConnect uses the same protocol jTDS does (TDS) - it's also a Type 4, JDBC driver and is supported.

I'm trying jTDS because, after many years of successful ASA9+JConnect experience, SA12+JConnect combo has many problems in my scenario (low performance on some queries and, sometime, freezing experience ...)

This may not be a driver issue and changing drivers may not resolve it.

If you're really trying to solve the problem stated in your comment, you should investigate the performance of the database server first to ensure it matches the performance you expect. If you notice a discrepancy between what the database server is showing for performance and the time the result takes to show in your client, only then you should start looking at the client pieces (JDBC driver, network, etc.). (Aside: Using the Type 2 SQL Anywhere JDBC driver may show performance benefits over TDS in many scenarios)

Performance / hang issues are a different discussion entirely - you should post a new question with the details. You may want to try Diagnostic Tracing to start hunting down 'slow/hung queries'. Another option is to work with Technical Support and open a case to help trace out the issue.