All Products
Search
Document Center

Data Management:Manage tasks

Last Updated:Jan 03, 2024

Data Management (DMS) allows you to create and manage SQL tasks. You can use these tasks to manage SQL statements for features such as normal data change, schema design, and database and table synchronization. However, you cannot use them for SQL statements that are executed on the SQLConsole tab. This topic describes how to create and manage SQL tasks.

Prerequisites

You are a DMS administrator or database administrator (DBA). For information about user roles, see System roles.

Procedure

  1. Log on to the DMS console V5.0.
  2. In the top navigation bar, choose O&M > Task.
  3. On the Task page, create an SQL task or manage existing SQL tasks.
    • Create an SQL task
      1. Click Add SQL task. In the dialog box that appears, set the parameters that are described in the following table
        ParameterDescription
        Remarks

        The purposes or objectives of the data change. This reduces unnecessary communication.

        DatabaseThe database whose data you want to change. You can select one or more databases.
        Note If the database is managed in a database instance in Stable Change or Flexible Management mode, make sure that you have logged on to the database. For more information about control modes, see Control modes.
        Change SQLThe SQL statements for the data change. You can submit all SQL statements that can be executed. One or more SQL statements are supported and separated by semicolons (;).
        Planned execution timeSpecifies whether to run the task immediately or run the task at the specified point in time. Valid values:
        • ON: You can specify a point in time to run the task.
        • OFF: The task is immediately run after you submit it. This is the default value.
        TransactionSpecifies whether to enable the transaction mode. This parameter takes effect only when you select a single database. Valid values:
        • ON: If an SQL statement fails to be executed, all the other executed SQL statements in the same transaction are rolled back.
        • OFF: One SQL statement is executed at a time. This is the default value.
        Concurrent execution of group tasksSpecifies whether to execute SQL statements in all databases. This parameter takes effect only when you select multiple databases. Valid values:
        • ON: The SQL statements can be executed in all databases.
        • OFF: The SQL statements can be executed in the first database you select. If the execution succeeds, the SQL statements can be executed in other databases in sequence. This is the default value.
        Ignore execution errorsSpecifies whether to skip errors when SQL statements are being executed. Valid values:
        • ON: If an error occurs when an SQL statement is being executed, DMS skips the error and continues to execute subsequent SQL statements until all remaining statements are executed.
        • OFF: If an error occurs when an SQL statement is being executed, DMS stops executing the current and subsequent SQL statements. This is the default value.
        Logical table expression validationSpecifies whether to verify the logical expression. This parameter takes effect only when you select a logical database. Valid values:
        • ON: DMS checks whether the logical expression is valid. This is the default value. For more information, see Logical table.
        • OFF: We recommend that you do not set this parameter to OFF.
        Note After you complete the configurations, click Preview/convert SQL. In the message that appears, you can preview the SQL statements.
      2. Click Submit Task.
    • Manage SQL tasks
      • Pause a task

        On the Task page, find the task that you want to pause and click Pause in the Operation bar column.

      • Retry a task

        On the Task page, find the task that is in the Failure state and click Retry in the Operation bar column.

      • View logs

        On the Task page, find the task whose scheduling logs you want to view and click Log in the Operation bar column.

      • Delete a task

        On the Task page, find the task whose scheduling logs you want to view and click Delete in the Operation bar column. The task is in the Delete state and can no longer be run.