A single computer can run multiple database servers at the same time. Each database server can run multiple databases at the same time. The connection parameters required to connect to a database vary depending on whether multiple database servers are running on the same computer, whether multiple databases are running on the same database server, and whether the application is running on the same computer as the database server.
The following table describes several common connection scenarios and the client connection parameters that are required in each case. By combining these connection parameters, you can correctly identify the database you want to connect to. SQL Anywhere supports many connection parameters in addition to the ones listed below to handle less common connection scenarios.
Scenario | Required connection parameters | Comments | See also |
---|---|---|---|
One database running on a single database server, all running on the same computer as the client application. |
Userid (UID) Password (PWD) |
||
Database server running on a different computer than the client application. |
Userid (UID) Password (PWD) HOST |
The HOST connection parameter identifies the computer where the database server is running. |
|
Multiple database servers running on the same computer. |
Userid (UID) Password (PWD) ServerName (Server) |
The Server connection parameter identifies the database server where the database is running. It is a good practice to always specify a server name. |
ServerName (Server) connection parameter |
Multiple databases running on the same database server that is only database server running on the computer. |
Userid (UID) Password (PWD) DatabaseName (DBN) |
The DBN connection parameter identifies which database you want to connect to. |
DatabaseName (DBN) connection parameter |
You do not know if the database is running on the database server and you want the database started so you can connect to it. |
Userid (UID) Password (PWD) DatabaseFile (DBF) |
The DBF connection parameter specifies the full path and name of the database you want to connect to, relative to the database server computer. The DBF connection parameter should specify a file on the computer where the database server is running, and it should not be a UNC file name. |
DatabaseFile (DBF) connection parameter |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |