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

SQL Anywhere 12.0.0 » MobiLink - Getting Started » MobiLink Tutorials » Tutorial: Using central administration of remote databases


Lesson 13: Create a remote database on a remote device

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 you can skip this step.

 To create a remote database on a remote device
  1. The first step is to create a new remote task. In the Folders view of Sybase Central under Central Admin Tutorial, right-click Remote Tasks and choose 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 will create or act 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 will 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 on the newly created Create DB task in the Folders view.

  5. Next, add some 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 a few times 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 choose Deploy. The Deploy Remote Task Wizard is displayed.

    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, check 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 under Central Admin Tutorial » Consolidated Databases » Tutorial » Agents, 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.