Sybase 12.4.2 manual Using Odbc data sources on Unix

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 92
Image 92

Using ODBC data sources on UNIX

Using ODBC data sources on UNIX

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

UserID=DBA

Password=SQL

Network communications parameters are added as part of the CommLinks parameter. For a complete list, see “Connection parameters” on page 73.

References to ODBC functions are resolved at run time. The database server looks for the .odbc.ini file in:

1The directory specified by the ODBCHOME environment variable

2The directory specified by the HOME environment variables

3The path

The database server ignores the ODBC_HOME, ODBC_INI and ODBCINI environment variables.

Note On UNIX systems, Adaptive Server IQ installation 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. For example, on a Sun Solaris system, 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/asiq12/lib/dbodbc6.so.1. If you are creating a custom ODBC application, you can link directly to dbodbc6.so.

If Adaptive Server IQ does not detect the presence of an ODBC driver manager, it will use ~/.odbc.ini for data source information. Otherwise, it will query the driver manager for data source information.

72

Page 92
Image 92
Sybase 12.4.2 manual Using Odbc data sources on Unix