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, 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

asked 12 May '12, 04:18

NCister's gravatar image

NCister
211111219
accept rate: 0%

Please post your database server start-up command. You should also turn on the database server console output and check for the connection request details from the TDS connection:

dbsrv12 -z -o dbsrv12-console.txt ...

Also, is there a particular reason you're using jTDS instead of jConnect?

(14 May '12, 13:30) Jeff Albion

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 the Log output after activating "-z" option:

I. 05/17 11:12:23. TDS 1: connection created I. 05/17 11:12:23. TDS 1: login I. 05/17 11:12:23. TDS 1: using TDS version 4.2.0.0 I. 05/17 11:12:23. TDS 1: login: user 'ergon', database '', application 'jTDS',host 'XDEV91', host_pid '123', charset '' E. 05/17 11:12:23. Connection ID 1: Connection error '08W10': Specified database not found I. 05/17 11:12:23. TDS 1: request complete I. 05/17 11:12:23. Connection ID 1: Client disconnected ....

(17 May '12, 05:31) NCister

I've taken a look on jTDS forum and SqlAnywhere seems not supported :-(

permanent link

answered 17 May '12, 07:08

NCister's gravatar image

NCister
211111219
accept rate: 0%

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.

(17 May '12, 12:25) 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:

×438
×86

question asked: 12 May '12, 04:18

question was seen: 4,483 times

last updated: 17 May '12, 12:43