To connect to a database running on a network server somewhere on a local or wide area network, the client software must locate and connect to the database server. SQL Anywhere provides a network library to handle this task.
Network connections occur over a network protocol. TCP/IP is available on all platforms.
SQL Anywhere server names must be unique on a local domain for a given network protocol. The following connection parameters provide a simple example for connecting to a server running elsewhere on a network:
ENG=svr-name DBN=db-name UID=user-id PWD=password CommLinks=all |
When CommLinks=all is specified, the client library first looks for a personal server of the given name, and then looks on the network for a server of the given name. See CommLinks connection parameter [LINKS].
If several protocols are available, you can instruct the network library which ones to use to improve performance. The following parameters use only the TCP/IP protocol:
ENG=svr-name DBN=db-name UID=user-id PWD=password CommLinks=tcpip |
The network library searches for a server by broadcasting over the network, which can be a time-consuming process. Once the network library locates a server, the client library stores its name and network address in a file (sasrv.ini), and reuses this entry for subsequent connection attempts to that server using the specified protocol. Subsequent connections are normally faster than a connection achieved by broadcast.
Many other connection parameters are available to assist SQL Anywhere in locating a server efficiently over a network.
To connect to a database on a network server ( Sybase Central or Interactive SQL )
Start Sybase Central or Interactive SQL and open the Connect window (if it doesn't appear automatically).
On the Identification tab of the window, enter a user ID and a password.
On the Database tab of the window, enter the Server Name. You can search for a server by selecting the Search Network For Database Servers option and then clicking Find.
Identify the database by specifying a Database Name.
You can connect using a data source (a stored set of connection parameters) by selecting the appropriate data source option at the bottom of the Identification tab of the Connect window.
By default, all network connections in Sybase Central and Interactive SQL use the TCP/IP network protocol.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |