Locating a database server

In the next step towards establishing a connection, SQL Anywhere attempts to locate a server. If the connection parameter list includes a server name (ServerName (ENG) connection parameter), it performs a search for a server of that name. If no ServerName (ENG) connection parameter is supplied, and LINKS is not specified or LINKS includes Shared Memory, SQL Anywhere looks for a default server.

Flowchart of SQL Anywhere attempting to start a personal server.

If SQL Anywhere locates a server, it tries to locate or load the required database on that server. See Locating the database.

If SQL Anywhere can not locate a server, it may attempt to start a personal server, depending on the connection parameters.

Notes
  • For local connections, locating a server is simple. For connections over a network, you can use the CommLinks (LINKS) connection parameter to tune the search in many ways by supplying network protocol options.
  • You can specify a set of network protocol options for each network protocol in the argument to the CommLinks (LINKS) connection parameter.
  • Each attempt to locate a server involves two steps. First, SQL Anywhere looks in the server name cache to see if a server of that name is available (this step is skipped if the value of DoBroadcast is none). Second, it uses the available connection parameters to attempt a connection.
  • If the server is autostarted, information from the START, DBF, DBKEY, DBS, DBN, ENG, and AUTOSTOP connection parameters are used to construct the options for the autostarted server.
  • If the server has an alternate server name, you can only use the alternate server name to connect to the database that specified the alternate server name. You cannot use the alternate server name to connect to any other databases running on that database server. See -sn database option.

Locating a database server using the Broadcast Repeater utility