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

SAP SQL Anywhere, on-demand edition 1.0 SP 6 » Task syntax

AlterMaintenancePlan task

Alters an existing maintenance plan that is used in the cloud.

Syntax 1 (SQL)
CALL DBCloud.AlterMaintenancePlan ( plan=plan [, optional-parameters ] )
Syntax 2 (Cloud Command utility)
dbcloudcmd run AlterMaintenancePlan plan [ optional-parameters ]
Parameters
  • plan

    The plan ID. (Required)

  • plan_name

    The plan name. The default is the current value.

  • host

    The host to store backups on. Accepts a search query that identifies hosts. The search query can be a list of host names or IDs separated by semicolons (;), or a full search. An appropriate host is selected from this list and the backup is stored there. The default is the current value.

  • full_schedule

    The schedule for full backups. The default is the current value.

    This parameter accepts an XML string containing the schedule information. The XML string must be specified as follows and must include one or more of the listed XML elements:

    <schedule>XML-elements</schedule>
  • incremental_schedule

    The schedule for incremental backups. The default is the current value.

    This parameter accepts an XML string containing the schedule information. The XML string must be specified as follows and must include one or more of the listed XML elements:

    <schedule>XML-elements</schedule>
  • min_backups_to_keep

    The minimum number of full backups that should be kept when expired backups are deleted. The default is the current value.

  • min_days_to_keep

    The minimum number of days that full backups should be kept before they can be deleted. The default is the current value.

  • failed_backups_before_alert

    The number of failed backups within the most recent group before an alert is issued. The default is the current value.

  • failed_backup_group_size

    The minimum number of recent backups in which we look for failed backups. The default is the current value.

  • object_etag

    Internal use only. The default is NULL.

  • object_updated

    The last time the object was modified. If provided, the task fails if the object has changed since the specified time. The default is NULL.

    To ensure that you are not over-writing another user's changes, run dbcloudcmd -v describe task to get the time the cloud was last modified. Specify this value as the object_updated parameter. If the cloud has been altered since the specified time, then the task fails with an error. If this occurs, run the task again after re-running dbcloudcmd -v describe task.

Required privileges

BackupDatabase, RunScheduleTask

Remarks

This task alters an existing maintenance plan. However, you cannot alter the two system-defined maintenance plans.

XML elements Description
<time_range start_time="xx"/> Start time. Format may vary depending on command shell being used.
<start_date date="xx"/> Start date. Format may vary depending on command shell being used.
<interval frequency="xx" units="yy"/> Frequency of event. xx is an integer and yy is one of "HOURS", "MINUTES", or "SECONDS".
<days_of_week><dow day="xx"/></days_of_week> Day of the week. xx is a string as in "Sunday" or "Monday", etc.
<days_of_month><dom day="xx"/></days_of_month> Day of the month. xx is an integer between 0 and 31, with 0 being the last day of the month.

Example

Run the following task to alter the maintenance plan called myplan to run a full backup every Friday at 2:00 PM and to store the backups on the host my-host2:

dbcloudcmd run  AlterMaintenancePlan plan=myplan host=my-host2 full_schedule="<schedule><time_range start_time=\"14:00:00\"/><days_of_week><dow day=\"Friday\"/></days_of_week></schedule>"