SQL tasks in Data Management (DMS) let you create, schedule, and track SQL operations for data changes, schema design, and database and table synchronization. Unlike ad-hoc queries run in the SQLConsole tab, SQL tasks persist on the Task page — so you can pause, retry, monitor logs, and delete them after submission.
Prerequisites
Before you begin, ensure that you have:
The DMS administrator or database administrator (DBA) role. For role details, see System roles.
Create an SQL task
Log on to the DMS console V5.0.
In the top navigation bar, choose O&M > Task.
On the Task page, click Add SQL task.
In the dialog box, configure the parameters described in the following tables, then click Submit Task.
After setting the parameters, click Preview/convert SQL to review the SQL statements before submitting.
General parameters
| Parameter | Description |
|---|---|
| Remarks | The purpose or objective of the data change. Filling this in reduces back-and-forth communication with reviewers. |
| Database | The database whose data you want to change. One or more databases can be selected. If the database is managed in Stable Change or Flexible Management mode, log on to the database first. For details, see Control modes. |
| Change SQL | The SQL statements for the data change. One or more SQL statements are supported and separated by semicolons (;). |
| Planned execution time | Controls when the task runs. Set to ON to specify a scheduled time, or leave it OFF (default) to run the task immediately after submission. |
| Ignore execution errors | Controls what happens when a statement fails. ON: DMS skips the error and continues executing remaining statements. OFF (default): DMS stops on the first error. |
Parameters for a single database
These parameters take effect only when you select a single database.
| Parameter | Description |
|---|---|
| Transaction | ON: if any statement fails, all statements executed in the same transaction are rolled back. OFF (default): statements run one at a time, with no rollback. |
Parameters for multiple databases
These parameters take effect only when you select multiple databases.
| Parameter | Description |
|---|---|
| Concurrent execution of group tasks | ON: statements run in all selected databases at the same time. OFF (default): statements run in the first selected database; if that succeeds, they run in the remaining databases in sequence. Use OFF when you need to validate the change in one database before rolling it out to others. |
Parameters for logical databases
These parameters take effect only when you select a logical database.
| Parameter | Description |
|---|---|
| Logical table expression validation | ON (default): DMS validates the logical expression before execution. See Logical table. We recommend that you do not set this parameter to OFF. |
Manage SQL tasks
On the Task page, find the task you want to manage and use the corresponding action in the Operation bar column.
| Action | When to use | What happens |
|---|---|---|
| Pause | The task is running and you need to stop it temporarily. | The task pauses. |
| Retry | The task is in the Failure state. | DMS re-executes the task. |
| Log | Any time you want to inspect execution details. | Opens the scheduling logs for the task. |
| Delete | You no longer need the task. | The task moves to the Delete state and can no longer be run. |