Lesson 13: Creating a remote database on a remote device

This lesson assumes you have completed all preceding lessons. See Lesson 1: Creating a consolidated database.

In this lesson, you use a remote task to create a new remote database on the remote device. If you are adding central administration to an existing synchronization system, proceed to Lesson 14: Scheduling synchronization.

 Create a remote database on a remote device
  1. Create a new remote task. In the Folders view of Sybase Central under MobiLink 12, expand Central Admin Tutorial. Right-click Remote Tasks and click New » Remote Task.

    The Create Remote Task Wizard appears.

  2. On the Welcome page, type Create DB in the Name field. Unlike the task you created before, this task creates or acts on a remote database, so check This Task Requires Or Creates A Remote Database and select the remote schema name Tutorial Application v1.0. This identifies the remote database that the database actions in this task act on. Click Next.

  3. On the Trigger Mechanisms page, check When It Is Received By An Agent then click Finish to complete the wizard.

  4. Click the newly created Create DB task in the Folders view.

  5. Add commands to the remote task from the Commands pane on the right.

    1. The first command creates a new, empty database on the remote device. Set the command type to Create Database.

    2. Set the filename to {db_location}\tutorial_v1.db. This file name corresponds to the file name in the connection string you specified when you configured the Agent.

    3. Press Tab until a new command appears.

    4. The second command creates the schema in the new database. Set the command type to Execute SQL. Click Import.

    5. From the Open window, choose the file c:\cadmin_demo\remote_db\tutorial_v1.sql and click Open. This imports the SQL for initializing a remote database that was generated when you deployed the synchronization model into the command.

  6. The remote task is now complete. Deploy the task and assign it to the agent AID_JOHN:

    1. Right-click the Create DB task in the Folders view and click Deploy.

      The Deploy Remote Task Wizard appears.

    2. Accept the defaults on the Task Name And Destination page and click Next.

    3. From the Recipients dropdown, select Specific Agents. In the Agent list, select AID_JOHN and click Next.

    4. On the Delivery Options page, check The Next Time The Agent Synchronizes and click Next.

    5. On the Reporting Results And Status page, select Send Results And Status Immediately for both questions.

    6. Click Finish.

  7. Check to see if the task was successful:

    1. In the Folders view of Sybase Central under MobiLink 12, expand Central Admin Tutorial, Consolidated Databases, Tutorial, Agents, and right-click AID_JOHN.

    2. Select the Events tab and look for the Create DB task. You may need to press F5 to refresh the results.

  8. Proceed to Lesson 14: Scheduling synchronization.