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.
The CommLinks (LINKS) parameter takes as an argument a string listing the protocols to use and, optionally for each protocol, a variety of network protocol options that tune the broadcast. See Network protocol options.
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 sasrv.ini. The file contains a set of sections, each of the following form:
[Server name] LINKS=protocol_name Address=address_string
The default location of sasrv.ini is %ALLUSERSPROFILE%\Application Data\SQL Anywhere 11 on Windows and ~/.sqlanywhere11 on Unix.
It is very important that each server has a unique name. Giving different servers the same name can lead to identification problems.
If the server name and protocol in the cache match the connection string, SQL 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.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|