Client-Library and Server-Library can use a directory service, rather than interfaces, to obtain a server’s address.
To retrieve information from a directory service, Open Client and Open Server software use a directory driver, a Sybase library that provides Open Client and Open Server software with a generic interface to a specific directory service. Sybase provides a directory driver for each supported directory service.
Client-Library and Server-Library determine whether to use a directory service or interfaces as follows:
If the application specifies a directory driver—Client-Library by calling ct_con_props (CS_SET, CS_DS_PROVIDER) and Server-Library by calling srv_props (CS_SET, SRV_DS_PROVIDER)— the application checks in the [DIRECTORY] section of libtcl.cfg for a matching driver and loads that driver.
See “The libtcl.cfg and libtcl64.cfg files” for information about directory drivers and libtcl*.cfg.
If the client application does not specify a directory driver, Client-Library and Server-Library load the directory driver listed by the first entry in the [DIRECTORY] section of libtcl.cfg.
Client-Library and Server-Library fall back and use interfaces to obtain the server’s address if any of the following are true:
libtcl.cfg does not exist.
There are no entries in the [DIRECTORY] section of libtcl.cfg.
The specified directory driver fails to load.
libtcl*.cfg is overridden at the context level when the CS_IFILE property is set with ct_config.
Use the libtcl*.cfg file to specify the LDAP server name, port number, DIT base, user name, and password to authenticate the connection to an LDAP server.
Values specified in the libtcl*.cfg file serve as the defaults for the CS_* property, which is set with ct_con_props(). You can override these values by explicitly setting the ct_con_props() for that specific connection.
The CS_LIBTCL_CFG property specifies the name and path to an alternate libtcl.cfg file.
If you do not specify either the password or the user name in the libtcl*.cfg file, the connection is anonymous.
If the password begins with an 0x, the connection properties assume that the password is encrypted. See “Encrypting the password”.
On 64-bit platforms, Open Client and Open Server contain both 32-bit and 64-bit binaries. You should edit both the libtcl.cfg and the libtcl64.cfg files to ensure compatibility between 32- and 64-bit applications.
The libtcl*.cfg file is located in the $SYBASE/$SYBASE_OCS/config directory.
The connection process has these basic steps:
Client-Library uses the Sybase directory driver specified in the libtcl*.cfg file to request the address of my_server.
The directory service looks up the attributes for the my_server entry and returns the information to Client-Library using the Sybase directory driver.
The application uses the address to connect to the machine where my_server resides.