Connecting to a running database on this computer (dbeng12)

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.

Prerequisites

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

Many.

 Connecting to a running database on this computer (dbeng12)
  • Run the following command to start Interactive SQL and connect to the database server:

    dbisql -c "UID=DBA;PWD=sql;ServerName=demo12"
 Connecting to a running database on this computer (dbeng12)
  1. Open the Connect window. See Opening the Connect window (Sybase Central).

  2. Complete the following fields to connect to the database:

    1. In the Authentication dropdown list, click Database.

    2. In the User ID field, type a user name. For example, type DBA.

    3. In the Password field, type a password for the user. For example, type sql.

    4. 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.

    5. In the Server Name field, type the name of the running database server. For example, type demo12.

      Note

      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).

    6. In the Database Name field, type the name of the database. For example, type demo.

  3. Optional: To get a copy of the connection string that is created with this window, click Tools » Copy Connection String to Clipboard.

  4. Click Connect.

Results

The application connects to the database.

Next

None.

 See also