Sybase 12.4.2 manual Server name caching for faster connections

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 104
Image 104

How Adaptive Server IQ makes connections

Server name caching for faster connections

Tuning the broadcast

Caching server information

The network library looks for a database server on a network by broadcasting over the network using the CommLinks connection parameter.

The CommLinks 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 3, “Connection and Communication Parameters” in the Adaptive Server IQ Reference Manual.

Broadcasting over large networks to search for a server of a specific name can be time-consuming. To speed up network connections (except for the first connection to a server), when a server is located, the protocol it was found on and its address are saved to a file.

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

How the cache is used

[Server name] Link=protocol_name Address=address_string

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.

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

84

Page 104
Image 104
Sybase 12.4.2 manual Server name caching for faster connections