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 18: Uploading files using SIRT

In this lesson, you upload files from the remote device using a server-initiated remote task (SIRT). Uploading files from the remote device is useful for troubleshooting because an administrator can examine the files for problems.

Prerequisites

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.

Context and remarks

When you started the MobiLink Agent on the remote device, you directed it to log messages to the file agent.txt. You are now going to retrieve and examine that file from the remote device.

 Task
  1. 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 Upload Agent Log in the Name field.

  3. Clear This task requires or creates a remote database if it is selected and click Finish.

  4. Click the new task in the Folders view and add a command to the task. Set the Command type to Upload file.

  5. Set the Server file name to {agent_id}\agent.txt and the Remote file name to {agent_log}. You can use the ellipsis (three dots) button in the command editor to easily enter the macro values.

    The {agent_log} macro is replaced by the name of the log file being kept by the MobiLink Agent on the remote device.

    In the Server file name field you specified the directory where the file is located using the {agent_id} macro. This is very important. If you do not use a macro when specifying the server file name, then every Agent that executes the task places their upload file in the same place, with each new Agent overwriting the file written by the previous agent. Using a macro ensures that each Agent uploads its log file to a different location on the server, allowing you to view all the log files.

  6. Right-click the new Upload Agent Log task and click Deploy. Click Next.

  7. For Recipients, click Specific agents and then select agent AID_JOHN. Click Next.

  8. On the Delivery Options page, click The next time the agent synchronizes and click Next.

  9. On the Reporting Results And Status page, set both If task succeeds and If task fails to Send results and status immediately. Click Finish.

  10. The task needs to be initiated by the administrator in Sybase Central. To initiate the task, go to AID_JOHN under Agents. In the pane, select the Tasks tab, right-click the Upload Agent Log task and click Initiate. Wait for the task to execute.

    The uploaded file is placed in the MobiLink upload directory that was specified it with the -ftru option on the MobiLink command line. You specified c:\cadmin_demo\consolidated\upload for the upload directory. Take a look at that directory using a command prompt or the Windows Explorer. You should find the AID_JOHN subdirectory. In that subdirectory is the agent.txt file that you uploaded.

Results

Result

Next

Proceed to Cleaning up.