cancel
Showing results for 
Search instead for 
Did you mean: 

how to set up SQL Anywhere on Debian

Former Member
4,654

We have a Windows 2008 R2 server with about 20 PHP scripts that run throughout the day using Task Manager. The server they run on frequently freezes, and we would like to move the scripts to our Debian webserver.

The scripts have been using dbisql to connect to remote servers using Sybase databases.

I am new to Linux and I don't know how to install SQL Anywhere or configure ODBC on Debian.

Any help would be greatly appreciated. Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

If you are only connecting to SQL Anywhere from the Linux machine, you can use dbdsn and the SQL Anywhere ODBC driver manager on Linux.

To make sure you can actually call SQLA binaries or use the libraries, you'll need to set up the PATH and LD_LIBRARY_PATH environment variables accordingly. For testing, it may be sufficient to source a provided script from the SQL Anywhere directory:

source /opt/sqlanywhere12/bin64/sa_config.sh


You'll also need to ensure a .odbc.ini file exists to have create/find datasources. This may be in the home directory of the current user (but will need to be modified if used by another user or perhaps a daemon). More information on the .odbc.ini file can be found here:

ODBC data sources on Unix

dbdsn can be used to modify SQL Anywhere entries in the .odbc.ini file. Examples for this can be found here:

Data Source utility (dbdsn)

Finally, you can connect to a DSN with dbisql (or dbisqlc) on Linux the same way you would on Windows:

dbisql -c "DSN=my_dsn"


Note: This is all for SQL Anywhere specific connections. If you need to use remote servers and intend to run SQLA on the Linux machine, you'll need to consult the other DB documentation for how to create the appropriate DSN.