Overview of configuration for Open Client

All Open Client applications require some basic configuration information, obtained during initialization and connection, including:

  1. (Not applicable to DB-Library) The location of the Sybase installation directory as defined by the SYBASE environment variable.

  2. (Not applicable to DB-Library) A locale name. Open Client uses the values of the following POSIX environment variables as locale names:

    • 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 neither environment variable is defined, Open Client uses “default” as the locale name.

  3. (Not applicable to DB-Library) Localized message and character set files. Open Client looks in the locales.dat file for an entry whose name matches the locale name determined previously. Then, it loads the localized messages and character set files specified in the locales.dat file.

  4. The name of the target server. Open Client obtains the name of the target server from one of the following sources, in this order:

    1. The client application, which can provide the server name in the call to ct_connect (or dbopen). Some applications, such as isql, can specify the name of the target server through command line options.

    2. The DSQUERY environment variable, if the application does not specify the target server.

    3. The default name SYBASE, if DSQUERY is not set.

  5. The target server’s network address. Open Client obtains the target server’s addresses from the directory service or from interfaces. DB-Library does not examine the libtcl.cfg file, it accesses the interfaces file:

    • Directory service – Open Client looks for an entry in the [DIRECTORY] section of libtcl.cfg to determine where to look up server address information. The setting of the CS_DS_PROVIDER property determines which [DIRECTORY] entry the application searches for, or defaults to the first entry of the [DIRECTORY] section.

    • interfaces – If a directory service is not used, or if it is used and fails, Open Client searches for the SERVERNAME entry in interfaces that matches the name as determined previously and uses the corresponding target address.

  6. (Not applicable to DB-Library) The name of the security service driver. Open Client looks in the [SECURITY] section of libtcl.cfg to determine which security driver to load.

    Refer to Chapter 6, “Using Security Services,” for more information on security services.

NoteItems 1-3 occur when the Open Client Client-Library application calls the cs_ctx_alloc or cs_ctx_global routine. Items 4 through 6 occur when the Open Client application calls ct_connect.