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 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.
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.
On the Trigger Mechanisms page, check When It Is Received By An Agent then click Finish to complete the wizard.
Click the newly created Create DB task in the Folders view.
Add commands to the remote task from the Commands pane on the right.
The first command creates a new, empty database on the remote device. Set the command type to Create Database.
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.
Press Tab until a new command appears.
The second command creates the schema in the new database. Set the command type to Execute SQL. Click Import.
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.
The remote task is now complete. Deploy the task and assign it to the agent AID_JOHN:
Right-click the Create DB task in the Folders view and click Deploy.
The Deploy Remote Task Wizard appears.
Accept the defaults on the Task Name And Destination page and click Next.
From the Recipients dropdown, select Specific Agents. In the Agent list, select AID_JOHN and click Next.
On the Delivery Options page, check The Next Time The Agent Synchronizes and click Next.
On the Reporting Results And Status page, select Send Results And Status Immediately for both questions.
Click Finish.
Check to see if the task was successful:
In the Folders view of Sybase Central under MobiLink 12, expand Central Admin Tutorial, Consolidated Databases, Tutorial, Agents, and right-click AID_JOHN.
Select the Events tab and look for the Create DB task. You may need to press F5 to refresh the results.
Proceed to Lesson 14: Scheduling synchronization.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |