Updated on 2026-07-07 GMT+08:00

Adding SQL Statements to the Whitelist

You can add trusted SQL statements to the whitelist. Database audit will ignore whitelisted SQL statements.

Constraints and Limitations

The risky SQL statements can be added to the whitelist in data reports.

After the SQL whitelist is modified, the modification does not take effect on the audited data.

Adding Scanned SQL Statements

  1. Log in to the DBSS console.
  2. Click in the upper left corner on the displayed page and select a region.
  3. In the navigation tree on the left, choose Data Reports.
  4. In the Instance drop-down list, select the instance whose session information you want to view.
  5. Click the Statements tab to view risky SQL statements.
  6. Add SQL statements to the whitelist.

    • Add a single SQL statement.
      1. Click Add to Whitelist in the Operation column of an SQL statement.
      2. In the displayed dialog box, select the database and description of the SQL statement.
        Figure 1 Adding to the SQL whitelist
      3. Click OK.
    • Add SQL statements in batches.
      1. Select the target SQL statement and click One-Click Whitelisting.
        Figure 2 One-click whitelisting
      2. In the displayed dialog box, select the databases and descriptions of the SQL statements.
        Figure 3 Adding to the SQL whitelist
      3. Click OK.

Adding a Custom SQL Statement to the Whitelist

  1. Log in to the DBSS console.
  2. Click in the upper left corner on the displayed page and select a region.
  3. In the navigation tree on the left, choose Rules.
  4. In the Instance drop-down list, select an instance.
  5. Click the SQL Whitelist tab.
  6. Click Add.
  7. In the displayed dialog box, enter the SQL statement, applicable database, and description.

    Figure 4 Adding an SQL statement to the whitelist

  8. Confirm the information and click OK.

References

  • To mask sensitive information in entered SQL statements, you can enable the function of masking privacy data and configure masking rules to prevent sensitive information leakage. For details, see Configuring Privacy Data Protection Rules.