Collection Contents Previous Next PDF

ASA Database Administration Guide

Connecting to a Database

Troubleshooting connections

Server name caching for faster connections


When the DoBroadcast (DOBROAD) protocol option 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 listing the protocols to use and, optionally for each protocol, a variety of network protocol options that tune the broadcast.

For more information about network protocol options, see Network protocol options.

Caching server information 

Broadcasting over large networks searching for a server of a specific name can be time-consuming. Caching server addresses 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 cached file named asasrv.ini. The file contains a set of sections, each of the following form:

[Server name]
Link=protocol_name
Address=address_string

The asasrv.ini file is located in your Adaptive Server Anywhere executable directory (the same directory as the ODBC/ DBLib DLL).

You can obfuscate the contents of the asasrv.ini file with simple encryption using the File Hiding utility.

For more information, see Hiding the contents of .ini files.

Note: 
It is very important that each server has a unique name. Giving different servers the same name can lead to identification problems.
How the cache is used 

If the server name and protocol in the cache match the connection string, Adaptive Server Anywhere tries to connect using the cached address first. If that fails, or if the server name and protocol in the cache do not match the connection string, the connection string information is used to search for the server using a broadcast. If the broadcast is successful, the server name entry in the cache is overwritten. If no server is found, the server name entry in the cache is removed. If the DoBroadcast protocol option is set to none, any cached addresses are ignored.


Collection Contents Previous Next PDF