Interfaces file

The interfaces file is a dictionary of connection information for Adaptive Servers and Open Server applications. For every server to which a client might connect, the interfaces file contains an entry that includes the server name and the necessary information to connect to that server.

The interfaces file is the default directory for Client-Library. However, applications may be configured to use a Sybase directory driver so that Client-Library uses a network-based directory service provider. For information on configuring Sybase directory drivers, see the Open Client and Open Server Configuration Guide for Microsoft Windows or Open Client and Open Server Configuration Guide for UNIX. For information on network-based directory services, see “Directory services”.

For an Open Server or Open Client application that uses an interfaces file, a linked list containing all the interfaces file entries is loaded into memory when the application builds an outgoing connection. This linked list is then referenced by subsequent outgoing connections. If the application uses more than one interfaces file, linked lists for all of these files are loaded into memory. If an interfaces file is updated while the application is running, a linked list corresponding to the updated interfaces file is loaded into memory when a new connection is built. The linked list corresponding to the old, unupdated copy of the interfaces file is not released from memory until all connections built on the old interfaces file have been closed. Consequently, there may be more than one linked list for a given interfaces file in memory simultaneously.

On most platforms, the interfaces file is an operating system file in text format. On these systems, the default name, default location, and internal format of the interfaces file differs by platform. Other platforms use an alternate form of storage. Table 2-23 summarizes interfaces files for some common platforms.

Table 2-23: Name of the interfaces file by platform

Platform or platform family

File name

UNIX (all)

interfaces

Path is specified by the setting of the SYBASE environment variable.

Windows 2000, Windows 2003, and Windows XP

sql.ini

Path is specified by the setting of the SYBASE environment variable.

Applications can set the CS_IFILE context property to specify a file name and location that are different from the defaults. (See “Location of the interfaces file”). An alternate default file name and path for the interfaces file can be specified by the CS_DEFAULT_IFILE property. For detailed information about the CS_DEFAULT_IFILE property, see the Open Client and Open Server Common Libraries Reference Manual.