On UNIX operating systems, ODBC data sources are held in a file named .odbc.ini. When creating a .odbc.ini file on any UNIX system, you must use the long form of each identifier, for example:
[My Data Source] EngineName=myserver CommLinks=tcpip(port=1870) Userid=DBA Password=sql
You can enter any connection parameter in the .odbc.ini file. Network communications parameters are added as part of the CommLinks (LINKS) parameter. For a complete list of network parameters, see “Network communications parameters”.
You can create and manage ODBC data sources on UNIX using the iqdsn command-line utility. See “Creating an ODBC data source from the command line”.
References to ODBC functions are resolved at runtime.
To connect with ODBC data sources, the location of your .odbc.ini file must be referenced by one of the following variables. Sybase IQ searches the directories specified by the variables below in the following order:
$ODBCINI – must contain the exact full path name of the .odbc.ini file.
$HOME
Current directory
$PATH
Sybase IQ clients ignore the following variables when searching for .odbc.ini:
$ODBC_HOME
$ODBC_INI
You need to edit the .odbc.ini file with any text editor to add entries for your data sources.
On UNIX systems, Sybase IQ installs only the ODBC driver, and not the driver manager. The name of the driver file includes an operating system-specific extension, for example, so for Solaris systems. If you are using an ODBC application that uses libodbc.so (libodbc.so.1) or libodbcinst.so (libodbcinst.so.1), simply create symbolic links for these that point to $SYBASE/IQ-15_2/lib/libdbodbc11.so.1. If you are creating a custom ODBC application, you can link directly to dbodbc11.so.
If an ODBC driver manager is not present, the IQ ODBC driver (found via the symbolic link) uses the .odbc.ini for data source information.
See Chapter 7, “ODBC Programming” in SQL Anywhere Server – Programming to ensure that you are using the correct driver for your platform.
To create an ODBC trace file, see”Using the SQL Anywhere ODBC driver manager on UNIX” in SQL Anywhere Server - Programming.
On UNIX and Linux systems, use the libdbodbc11.so driver and leave it up to the driver to choose the multithreaded or unthreaded driver. Tracing capability exists in the switch (libdbodbc11.so), not in the individual drivers (libdbodbc11_n.so or libdodbc11_r.so). If you change the driver to point to the _r version, you remove the switch from the call sequence, preventing the tracing.