Server name caching for faster connections – Sybase 12.4.2 User Manual

Page 104

Advertising
background image

How Adaptive Server IQ makes connections

84

Server name caching for faster connections

The network library looks for a database server on a network by broadcasting
over the network using the

CommLinks

connection parameter.

Tuning the broadcast

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
.

Caching server
information

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:

[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.

Note

If a server name is held in the cache, the cache entry is used before the

CommLinks

string.

Advertising