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

SAP Sybase SQL Anywhere 16.0 » MobiLink - Getting Started » MobiLink tutorials » Tutorial: Using central administration of remote databases

 

Lesson 12: Creating 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, proceed to Lesson 13: Scheduling synchronization.

Prérequis

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

This lesson assumes you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Using central administration of remote databases.

 Task
  1. Create a new remote task. In the Folders view of Sybase Central under MobiLink 16, 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\Central Admin Tutorial\tutorial1_deploy\remote_setup.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 16, expand Central Admin Tutorial » Consolidated Databases » Tutorial » Agents, and click AID_JOHN.

    2. Select the Events tab and look for the Create DB task. Wait until the tab is automatically refreshed, or press F5 to refresh immediately.

Résultat

The new remote database is created on the remote device.