DMC supports submitting SQL change tickets for performing data change operations in a database. The supported SQL statements for data changes include CREATE, INSERT, UPDATE, DELETE, and TRUNCATE.
Operation Process
The data change process is as follows:
1. Create a ticket: Select the target instance and database, choose the execution method, input SQL statements manually or upload an SQL file.
2. Syntax analysis: Once the ticket is submitted, the system automatically performs SQL syntax analysis check. After the check passes, the process proceeds to the semantic analysis phase. If the check fails, the SQL statements should be modified.
3. Semantic analysis: After the syntax analysis check passes, the system will perform semantic analysis. After the check passes, the ticket proceeds to the approval phase. If the check fails, the SQL statements should be modified.
4. Approval: After the SQL check is completed, conduct manual approval.
5. Enter Execution Queue: Once approved, the ticket is automatically added to the execution queue.
6. Executing: The SQL statements are executed either automatically or manually after being added to the execution queue.
7. Completion: Once execution is completed, users can view the execution results and details.
Use Limits
SQL changes are only supported for MySQL and TDSQL-C databases.
Prerequisites
The sub-account has the necessary access permissions for DMC-related feature pages. For details and operations, see DMC User Permission Settings. The root account has full permissions by default. Directions
2. In the left sidebar, select Secure Release > Creation Process > SQL Execution.
3. On the Create SQL Change Ticket page, configure the ticket parameters.
The main configuration parameters are described as follows:
|
Instance | Select the database instance for the change. The list displays the data source name and ID. |
Database | Select the database to be changed. |
Execution Mode | Select the execution mode, including: Manually Execute: After the ticket is approved, SQL statements should be manually triggered for execution. Automatic Execution: After the ticket is approved, it automatically enters the execution queue, executing the SQL changes. Scheduled Execution: Select the execution time. After approval, the ticket enters the execution queue at the scheduled time to execute the SQL changes. |
Execute SQL | Online compliation: Enter SQL statements directly in the text box. Separate multiple SQL statements using a semicolon (;). Upload SQL File: Click Click to Upload to upload an SQL file or drag an SQL file into the designated area. Only .sql files are supported, with a maximum size of 20 MB. |
Reason | Provide a reason for the SQL change request to facilitate faster approval. |
4. After you complete the configuration, click Submit Ticket.
Once the ticket is submitted, the system will automatically perform syntax analysis and semantic analysis.
5. View the ticket status and ticket details.
After submission, the system automatically redirects to the ticket details page, displaying the ticket details, ticket status, and parsing result.
Alternatively, select the My Request tab on the Process Management > Ticket List page to view the ticket status and ticket details. For details, see View and Inquire the Ticket List. Both grammar and semantics checks succeeded
If the parsing results indicate success, the ticket status updates to Reviewing. You can directly proceed to the next step.
Syntax check failed
Click Edit SQL Changes to modify the SQL statement, and click OK. Repeat the process until the ticket status updates to Reviewing, and then proceed to the next step.
Syntax check succeeded but semantics check failed
Click Edit SQL Changes to modify the SQL statement, and click OK. Repeat the process until the ticket status updates to Reviewing, and then proceed to the next step.
6. Wait for the approval result.
Select Process Management > Ticket List in the left sidebar, choose the My Request tab, and view the ticket status in the ticket list.
Reviewing: The ticket is under review. Once approved, the status updates to Waiting for queue..., and then you can proceed to the next step.
Waiting for queue...: The ticket has been approved and is now queued for execution. You can proceed to the next step.
Rejected: The ticket has been rejected. Click the ticket ID or select View in the Operation column to check the rejection reasons.
7. Execute the SQL statements.
Manually Execute:
Method 1: In the left sidebar, select Process Management > Ticket List, choose the My To Do or My Request tab, click To Execute in the corresponding Operation column of the ticket, go to the execution details page, and click To Execute at the top of the page to execute immediately.
Method 2: In the left sidebar, select Process Management > Execution List, choose the To be executed tab, click Execute in the corresponding Operation column of the ticket, and click OK in the pop-up dialog box to execute immediately.
Automatic Execution: If automatic execution is selected, the ticket will be executed automatically once approved. You can check the status on Ticket List > My Request page.
Scheduled Execution: If scheduled execution was selected, the ticket will be executed at the specified time after approval. You can check the status on the Ticket List > My Request page.
8. View the execution result.
Select Process Management > Execution List in the left sidebar and choose the Execution History tab, or select Process Management > Ticket List in the left sidebar and choose the My Request tab, to view the ticket status.
Executing: The execution is ongoing. Wait for the result, which may be Failed or Completed.
Execution failed: You can click the execution ID on the Execution History page or click View in the Operation column to check SQL details, failure reasons, and historical monitoring data.
Completed: The execution is successful. Click the execution ID on the Execution History page or select View in the Operation column to view execution details and historical monitoring data.