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!
asked 10 Jul '14, 15:55
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:
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:
dbdsn can be used to modify SQL Anywhere entries in the .odbc.ini file. Examples for this can be found here:
Finally, you can connect to a DSN with dbisql (or dbisqlc) on Linux the same way you would on Windows:
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.