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

SQL Anywhere 11.0.0 » SQL Anywhere Server - Database Administration » SQL Anywhere for Windows Mobile » SQL Anywhere for Windows Mobile » Using the administration utilities on Windows Mobile » Tutorial: Running Windows Mobile databases from Sybase Central

 

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 be run at the same time on a Windows Mobile device. As an alternative to running multiple database servers, one server can run multiple databases.

To connect to a database from Sybase Central

  1. Choose Start » Programs » SQL Anywhere 11 » Sybase Central.

  2. Choose Connections » Connect With SQL Anywhere 11.

  3. Click the Identification tab and complete the following fields:

    • User ID   DBA

    • Password   sql

  4. Click ODBC Data Source Name.

  5. Click Browse, choose the MobileServer data source that you created in Creating an ODBC data source to connect to your Windows Mobile device.

  6. Click the Database tab and type MobileServer in the Server Name field. If you fail to connect to the server:

    • Click the Network tab.
    • Click TCP/IP.
    • Complete the Host and Port(s) fields.
    • Click OK.
  7. Click OK to connect to the Alpha.db database running on 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.

To start a second database on the network database server

  1. In the left pane of Sybase Central, right-click MobileServer and choose 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 computer.

To connect to the second database

  1. In the right pane of Sybase Central, select the Beta database icon.

  2. From the File menu, choose Connect.

  3. Click the Identification tab, and complete the following fields:

    • User ID   DBA

    • Password   sql

  4. Click the Database tab and type Beta in the Database File field.

  5. Click OK 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.

What's next?

Next, you will learn how to disconnect from the databases and shut down the database server on Windows Mobile.