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

xraphael75's gravatar image

xraphael75
31114
accept rate: 0%


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.

permanent link

answered 10 Jul '14, 19:40

Tyson%20Lewis's gravatar image

Tyson Lewis
2.2k1641
accept rate: 22%

edited 10 Jul '14, 19:48

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:

×105
×70
×68
×49

question asked: 10 Jul '14, 15:55

question was seen: 4,083 times

last updated: 21 Mar '17, 08:15