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.

I have a rather old dbms, SQL Anywhere v5.5, running on an even older operating system, OS/2. It is past time to rewrite the business application that uses the database to another language, in this case I thought Java would be cool. Later on I could migrate the dbms to something more modern.

The initial exploration of jconnect (v7) seemed to indicate that it could connect with the old database version. So far I have had no success.

Here is the connection string: ""

It yields the error: "java.sql.SQLException: JZ006: Caught IOException: Connection refused"

Port 1498 is what the SA dbclient program uses to communicate with the database. The app talks to the client which acts as an agent between the app and the dbms.

This is actually promising since all of the preliminary bits have succeeded. I suspect the "connection refused" part is because the connection must be UDP-based, not TCP. I do not know what to change to cause UDP to be preferred for a connection. I also suspect that the protocol "Tds" may not be appropriate but I cannot find info on what protocols are acceptable.

Any suggestions (besides moving to a newer version of SQL Anywhere)?

asked 05 Nov '11, 18:45

jimoe's gravatar image

accept rate: 0%

Never mind. I discovered the "rebuild" database option.

Another question still in the spirit of the subject for this thread. I have installed a demo version of SQLAnywhere v12 and have connected to it using the rebuilt database. The nascent application, though, is not totally happy with the result. All of the queries returns this:

java.sql.SQLException: JZ0BT: The last() method is not supported for ResultSets of type TYPE_FORWARD_ONLY.

A typical query is: select max(t1.invoice_no) from sma_admin.ordr_dat t1;

What do I do to open the database in a non-TYPE_FORWARD_ONLY manner?

(06 Nov '11, 20:42) jimoe
Replies hidden

Please post this as a new question - Thanks

(07 Nov '11, 09:04) Mark Culp

Note that you can run a SQL Anywhere 5.5 database on a SQL Anywhere 9 database engine (i.e. dbeng9 or dbsrv9). That will make it easier (or doable at all?) to connect via JDBC/jConnect, and you will find much more information on how to connect to a v9 and above database server from JDBC. You might even try to use the SQL Anywhere JDBC drivers instead of jConnect.

permanent link

answered 05 Nov '11, 19:06

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

Where can I find the distribution for SQL Anywhere 9?

Would the database file be acceptable to v10 or later also?

(06 Nov '11, 14:05) jimoe
Replies hidden

SQL Anywhere v10 and up cannot directly use a v5.5 database - it must be converted to a v10 format database in order to be used.

(06 Nov '11, 20:14) Mark Culp

SQL Anywhere 5.5 did not support TDS (the protocol used by jConnect). Support for TDS was added in SQL Anywhere 6. Volker suggestion is on the right track - load the database on a newer server - a 5.5 database can be started on SQL Anywhere versions up to v9. If you do not have a copy of v9 you may have difficulty getting one since v9 is EOLed.

An alternative solution is to download a copy of SQL Anywhere v12 (which is the latest active codeline) and convert your database to a v12 database - the v12 software has all of the components needed for you to do this.

You can get a developers version of SQL Anywhere 12 by going here to register.

BTW if you do use a new version (e.g. you get your hands on v9 or upgrade to v12) then you should try using the iAnywhere JDBC driver since it uses SQL Anywhere 'native' protocol and may give you better performance (depending on your application).

permanent link

answered 06 Nov '11, 20:12

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 05 Nov '11, 18:45

question was seen: 3,633 times

last updated: 07 Nov '11, 09:04