Server name caching for faster connections

When the DoBroadcast (DOBROAD) communication parameter is set to DIRECT or ALL, the network library looks for a database server on a network by broadcasting over the network using the CommLinks (LINKS) connection parameter.

Tuning the broadcast

The CommLinks (LINKS) parameter takes as argument a string that lists the protocols to use and, optionally for each protocol, a variety of network communication parameters that tune the broadcast.

For a complete listing of network communications parameters, see Chapter 4, “Connection and Communication Parameters.”

Caching server information

Broadcasting over large networks to search for a server of a specific name can be time-consuming. Leaving the DoBroadcast (DOBROAD) communication parameter at the default value (ALL) speeds up network connections by saving the protocol the first connection to a server was found on, and its address, to a file, and using that information for subsequent connections.

The server information is saved in a file named asasrv.ini, in your Sybase IQ executable directory. The file contains a set of sections, each of the following form:

[Server name]
Link=protocol_name
Address=address_string

How the cache is used

When a connection specifies a server name, and a server with that name is not found, the network library looks first in the server name cache to see if the server is known. If there is an entry for the server name, an attempt is made to connect using the link and address in the cache. If the server is located using this method, the connection is much faster, as no broadcast is involved.

If the server is not located using cached information, the connection string information and CommLinks parameter are used to search for the server using a broadcast. If the broadcast is successful, the server name entry in the named cache is overwritten.

NoteIf a server name is held in the cache, the cache entry is used before the CommLinks string.