All Open Client applications require the following basic configuration information obtained during initialization and connection:
Location of the Sybase installation directory
Locale name
Localized message and character set files
Target server name
Network address of the target server
Security mechanism to be used
In a heterogeneous environment that uses applications built for versions 10.x and later, you must explicitly set the SYBASE, SYBASE_OCS, and PATH environment variables at the command prompt, to point to the current version of the Open Client and Open Server installation.
For example, for applications using version 15.5 products installed in C:\SYBASE, open a command prompt and set the following environment variables:
set SYBASE=C:\SYBASE
set SYBASE_OCS=OCS-15_0
set PATH=%PATH%;%SYBASE%\%SYBASE_OCS%\bin; %SYBASE%\%SYBASE_OCS%\dll
Open Client uses the values of the following POSIX environment variables as locale names (does not apply to DB-Library):
LC_ALL
LANG, if LC_ALL is not defined
Open Client later uses this value to obtain localization information from the locales.dat file. If LC_ALL, LANG, and sLanguage are not defined, Open Client uses “default” as the locale name.
Open Client looks in the locales.dat file for an entry whose name matches the locale name determined in the previous step. Then, it loads the localized messages and character set files specified in the locales.dat file.
Open Client obtains the name of the target server from one of the following sources, in the order listed:
The client application, which can provide the server name in the call to ct_connect (or dbopen)
The DSQUERY environment variable, if the application does not specify the target server
The default name SYBASE, if DSQUERY is not set
Open Client gets the address(es) of the target server from the directory service or from the sql.ini file:
Directory service – Open Client looks for an entry in the [NT_DIRECTORY] section of libtcl.cfg file to determine where to look for the server address information. The setting of the CS_DS_PROVIDER property determines which [NT_DIRECTORY] entry the application searches for or defaults to the first entry of the [NT_DIRECTORY] section.
sql.ini file – if a directory service is not used or if it is used and fails, Open Client searches for the SERVERNAME entry in sql.ini that matches the name, and uses the corresponding target address.
See “The sql.ini file” for information about the sql.ini file.
In a heterogeneous environment that uses applications built for versions 10.x and later, you can still maintain a single sql.ini file by passing the address file name to each application, for example:
isql -Usa -P -Sconnect50 -Ic:\sybase\ini\sql.ini
(Does not apply to DB-Library) If the client application requests network-based security services, Open Client looks in the [SECURITY] section of libtcl.cfg to determine which security driver to use.