Lesson 2: Starting multiple databases on the Windows Mobile database server

On Windows Mobile devices, attempting to start a second SQL Anywhere database server while a first database server is already running brings the first database server to the foreground. This is standard behavior for Windows Mobile applications. Because of this behavior, two database servers cannot run at the same time on a Windows Mobile device. As an alternative to running multiple database servers, one server can run multiple databases.

 Connect to a database from Sybase Central
  1. Click Start » Programs » SQL Anywhere 12 » Administration Tools » Sybase Central.

  2. Click Connections » Connect With SQL Anywhere 12.

  3. In the Authentication dropdown list, click Database.

    1. In the User ID field, type DBA.

    2. In the Password field, type sql.

  4. From the Action dropdown list, click Connect To A Running Database On Another Computer.

    1. In the Host field, type 169.254.2.1.

    2. In the Port field, type 2639.

    3. In the Server Name field, type MobileServer.

    4. In the Database Name field, type Alpha.

  5. Click Connect to connect to the Alpha.db database running on your Windows Mobile device.

  6. If you fail to connect to the database server, see Creating an ODBC data source to connect to your Windows Mobile device.

Now that you have started the database server and connected to the Alpha database, you can start additional databases on your Windows Mobile device.

 Start a second database on the network database server
  1. In the left pane of Sybase Central, right-click MobileServer and click Start Database.

  2. In the Database File field, type \My Documents\Beta.db.

  3. Click OK to start the database on the network database server.

The database is loaded on the network database server. Now you must initiate a connection from your desktop computer.

 Connect to the second database
  1. In the left pane of Sybase Central, right-click Beta and click Connect.

  2. In the Authentication dropdown list, click Database then:

    1. In the User ID field, type DBA.

    2. In the Password field, type sql.

  3. From the Action dropdown list, click Connect To A Running Database On Another Computer.

    1. In the Host field, type 169.254.2.1.

    2. In the Port field, type 2639.

    3. In the Server Name field, type MobileServer.

    4. In the Database Name field, type Beta.

  4. Click Connect to connect to the Beta database running on your Windows Mobile device.

You can now view and manipulate the data in the Alpha and Beta databases using Sybase Central.

Proceed to Lesson 3: Shutting down the database server on Windows Mobile.