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.


We are trying to establish SQL Anywhere 17 client connection to SQL Anywhere database using ODBC driver on Linux 64 machine. We have installed driver from

Below is the odbc.ini entry [xxxxxxxx] Driver=/sas/sqlanywhere17/install/lib64/ Description=SQL Anywhere 17 Host=xxxxxxxxxxxx Userid=xxxxxx DatabaseName=xxxxx Port=50094 Password=xxxxxx

Below is the odbcinst.ini entry [SQL Anywhere 17] Driver=/sas/sqlanywhere17/install/lib64/ Setup=/sas/sqlanywhere17/install/lib64/

And below are the environment variables that are being set.

ODBCHOME=/etc ODBCINI=/etc/odbc.ini ODBCINST=/etc/odbcinst.ini LD_LIBRARY_PATH=/sas/sqlanywhere17/install/lib64/

When we run isql or dbisql to connect to this DSN we get below error.

[sasinst@compute1p 9.4]$ isql -v Ticketmaster xxxxxxx xxxxxxx [08001][unixODBC][SAP][ODBC Driver][SQL Anywhere]Database server not found [ISQL]ERROR: Could not SQLConnect

We get the same error in dbisql.

But the same connection works for the windows driver. However there are 2 parameters in windows which are not in unix. 1. Authentication type "Database" 2. Action "Connect to a running server in the cloud"

We believe as we are not able to provide these parameter the connection cannot find the Database server and errors out.

Could you please help us in providing the parameters to make connection in Linux. Or do we need to add anything else.

Regards, Sid

asked 20 Jun '19, 16:48

sid3284's gravatar image

accept rate: 0%


It appears that the ODBC environment is properly setup but the DSN (or connection string) is not valid or correct.

DatabaseName MyDBName Driver Host ServerName

(20 Jun '19, 20:52) Chris Keating
Comment Text Removed

If you have a working DSN on Windows, you can copy the settings from the Windows Registry into the Unix DSN. The infomation can be found in one of the following locations (where <dsn> is the Windows DSN Name)


For a SA ODBC Cloud based DSN (which is SQL Anywhere On Demand Edition or SAODE), you do not specify server name but HOST is of the form that I have described previously i.e., host=MyHost:50094. You have PORT as a separate connection parameter which is incorrect.

permanent link

answered 20 Jun '19, 22:00

Chris%20Keating's gravatar image

Chris Keating
accept rate: 31%

converted 21 Jun '19, 02:57

Volker%20Barth's gravatar image

Volker Barth

Thanks Chris. It works with host=MyHost:50094.

(20 Jun '19, 23:31) sid3284

It appears that the ODBC environment is properly setup but the DSN (or connection string) is not correct. This is what I would expect to see in the DSN.

DatabaseName       MyDBName
Driver             /sas/sqlanywhere17/install/lib64/
Host               MyHost:50094
ServerName         MyDBEngName

The database server would be started on a machine named MyHost with a start line like:

dbsrv17 -n MyDBEngName -x tcpip(port=50094) database.db -n MyDBName

If the database is hosted on dbeng17, connections can only be made on MyHost (as it is a local server).

If you continue to have problems, it would be helpful to add LogFile=<filespec> to the DSN which creates a debug log for the connection on the client and add -z option on the engine to enable connection debugging on the server.

permanent link

answered 20 Jun '19, 21:09

Chris%20Keating's gravatar image

Chris Keating
accept rate: 31%

I want to connect to a SQL Anywhere database already running in the cloud. Will I need to use ServerName and do I need to start on a machine. That is the option I give in my Windows ODBC connection and it works.

(20 Jun '19, 21:29) sid3284

The HOST= is incorrect. It should be HOST=<host>:<port>. You are specifying PORT separately and the correct syntax for that would be like:


Without knowing how the database engine was started, I am not able to tell you what the ServerName value should be. Since you are able connect on Windows, you can query its value:

select property('ServerName')

When you say you are running in the cloud, what specifically do you mean?

(20 Jun '19, 21:44) Chris Keating
Replies hidden

Thanks Chris.

Basically to connect Windows ODBC driver I follow the steps mentioned in this link.

I don't know much about the database setup. But as I don't need ServerName to connect to it from Windows I would assume I wuld not need that for unix too. I am not able to to find equivalent steps (mentioned in the link) for unix.

(20 Jun '19, 22:11) sid3284
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: 20 Jun '19, 16:48

question was seen: 4,720 times

last updated: 20 Jun '19, 23:31