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.
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.
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.
On the Trigger Mechanisms page, check When it is Received by an Agent then click Finish to complete the wizard.
Click on the newly created Create DB task in the Folders view.
Next, add some 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 a few times 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 choose Deploy. The Deploy Remote Task Wizard is displayed.
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, check Send Results and Status Immediately for both questions.
Click Finish.
Check to see if the task was successful:
In the Folders view under Central Admin Tutorial » Consolidated Databases » Tutorial » Agents, 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.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |