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 » Tasks and events

Running batches of tasks

Use the ExecuteTaskBatch task to run more than one task at a time.


You must have the ExecuteSQL privilege.


Not all SQL statements are supported.


  1. In the Cloud Console, navigate to the Events panel.
  2. Click Run new task.
  3. Select ExecuteTaskBatch.
  4. Click Next.
  5. In the sql_batch field, paste the statements for the tasks that you want to run.

    For example:

    -- Move all databases off of server MYCLOUD-VM00#2 
    --This task assumes that no read-write database copies in a read-only scale-out system, 
    or stopped primary databases in a tenant mirroring system, exist on the server MYCLOUD-VMOO#2
    CALL DBCloud.LoadBalanceDatabases('all:','not name:"MYCLOUD-VM00#2"');
    -- Shut down server MYCLOUD-VM00#2
    CALL DBCloud.StopServer('MYCLOUD-VM00#2');
    -- Drop server MYCLOUD-VM00#2
    CALL DBCloud.DropServer('MYCLOUD-VM00#2');
  6. In the server_list field, specify the servers that you want to run the task on.

    For example, specify MYCLOUD-VM00#1.

  7. Click Finish.


The ExecuteTaskBatch task runs on the cloud server.


The following task batch starts all stopped databases and applies the tag country to the database mydatabase:

CALL DBCloud.StartDatabase ('status:stopped');
CALL DBCLoud.ApplyTag ( 'country', 'name:mydatabase and  type:database');