Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » SQL Anywhere database connections » Database connections

 

Starting and connecting to a database on another computer (command line)

Although not recommended, you can start and connect to a database on another computer.

Prérequis

If a database server isn't already running, start a network database server on another computer. For example, run the following command to start a database server:

dbsrv16 -n myserver -gd all

The -gd all option is not recommended because it permits any user to start a database on a server. This option is required for the following scenario. If your database page size is larger than the default of 4096, then specify the -gp option.

 Task
  • Run the following command (replace my_host with the host name of the computer running the network server):

    dbisql -c "Host=my_host;Server=myserver;DBF=C:\Users\Public\Documents\SQL Anywhere 16\Samples\demo.db;UID=DBA;PWD=sql"

    Since the host computer may be running several database servers, it is recommended that you always specify the database server name connection option (ServerName=server-name).

Résultat

The application connects to the database.

 See also