To connect to a local database that is currently running, you can use the Connect window with the Connect To A Running Database On This Computer option.
This procedure assumes that a database is running on a database server on your computer. If it isn't already running, start a database server and database. For example, run the following command to start the SQL Anywhere 12 sample database on a personal server:
dbeng12 -n demo12 "%SQLANYSAMP12%\demo.db"
Context and remarks
Run the following command to start Interactive SQL and connect to the database server:
dbisql -c "UID=DBA;PWD=sql;ServerName=demo12"
Open the Connect window. See Opening the Connect window (Sybase Central).
Complete the following fields to connect to the database:
In the Authentication dropdown list, click Database.
In the User ID field, type a user name. For example, type DBA.
In the Password field, type a password for the user. For example, type sql.
In the Action dropdown list, click Connect To A Running Database On This Computer to connect to a database that is running on your computer.
In the Server Name field, type the name of the running database server. For example, type demo12.
Your computer may be running software that has an embedded SQL Anywhere server, in which case there could be multiple servers running without you realizing it. You should always specify the server name (ServerName=server-name).
In the Database Name field, type the name of the database. For example, type demo.
Optional: To get a copy of the connection string that is created with this window, click Tools » Copy Connection String to Clipboard.
Discuss this page in DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|