This topic describes the solutions to some common errors that occur when you submit data change tickets.

According to the configured security rules, the XXXX statement is prohibited from being executed or from being submitted.

Example of an error message:
Failed to pass the SQL statement type check. According to security rules, forbid execute directly, command type:INSERT, please contact DBA or administrator adjust! To modify the rule, choose Security and Specifications > Security Rules > Edit > SQL Correct > SQL Execution Rules., Not matched any rules of the command type, default forbid execute.

Reason: The security rule bound to a database managed in Secure Collaboration mode prohibits the SQL statement from being executed or submitted. Therefore, the statement is blocked.

Solution: The statements that are prohibited from being executed or submitted include KNOWN statements (SQL statements that can be identified by DMS) and UNKNOWN statements (SQL statements that cannot be identified by DMS). You can select a solution based on your business requirements.
  • KNOWN statements

    DMS identifies the statement indicated in an error message as a KNOWN statement. However, the current security rule prohibits the execution of the statement by default. Contact the DBA or DMS administrator to modify the security rule. The following steps describe how to modify a security rule.

    1. View the name of a security rule set.

      Go to the Data Change Ticket Details page, and click Operation Logs in the upper-right corner to view the name of the security rule set.

    2. Modify a security rule.
      1. Log on to the DMS console V5.0.
      2. In the top navigation bar, choose Security and Specifications > Security Rules.
      3. On the Security Rules tab, find the security rule set that you want to manage and click Edit in the Actions column.
      4. In the left-side navigation pane, click SQL Correct.
      5. Select an option for Checkpoints based on the error message that is displayed. For the preceding example of an error message, select SQL execution rules for Checkpoints.
      6. Find the security rule that you want to modify and click Edit in the Actions column.
        Note Select the security rule that you want to modify based on the SQL language type of the statement indicated in the error message. For example, if the statement type indicated in the error message is CREATE_INDEX, you must select a DDL-related security rule.
      7. Add the SQL statement type indicated in the error message to the DSL syntax for the security rule.

        For example, if the error message indicates that the CREATE_INDEX statement is prohibited from being executed, you must add the statement to the DDL syntax for the rule, as shown in the following figure.

        SQLchange-intl
      8. Click Submit.
    3. After you modify the security rule, click Retry in the Precheck section on the ticket details page. Then, DMS checks the statement type again.
  • UNKNOWN statements
    1. Check whether the SQL statement you submit is correct. If the SQL statement is incorrect, click Modify SQL in the Precheck section. After you confirm the modification, click Retry to check the statement type again.
    2. If the SQL statement is correct, click View Details in the Precheck section to filter and view the SQL statement identified as UNKNOWN. Then, contact the DBA or the DMS administrator to add the SQL statement identified as UNKNOWN to the security rule and allow DMS to execute the statement. After you submit the modification, click Retry. For more information about how to modify a security rule, see Modify a security rule.

Failed to check the number of affected rows. Syntax check failed.

Example of an error message:
Failed to check the number of affected rows. Syntax check failed. Error message: ERROR. pos 37, line 1, column 31, token WHERE.

Reason: In the Precheck step when you submit a data change ticket, DMS checks the number of scanned rows to check again whether the syntax of the SQL statement is correct.

Solution: Check whether the syntax of the SQL statement that you submit is correct.
  • If the syntax is incorrect, click Retry in the Precheck section after you modify the syntax. Then, DMS checks the number of scanned rows again.
  • If the syntax is correct, click Skip on the right of Check the number of scanned rows in the Precheck section to ignore the error.