All Products
Search
Document Center

Data Management:Manage security rules

Last Updated:Feb 28, 2026

Security rules in Data Management (DMS) enforce fine-grained access control and governance for your databases. You can create rule sets, define policies using a domain-specific language (DSL), and apply them to database instances to control querying, exporting, data changes, approval workflows, and development processes.

Prerequisites

  • You have a DMS administrator or database administrator (DBA) role. For details, see View system roles.

  • Your database instance is managed in Security Collaboration mode.

    Note

    Instances managed in Flexible Management or Stable Change mode support only default security rules.

What security rules can do

Goal

How security rules help

Replace email and IM-based change requests with an online workflow

Integrate R&D processes, specifications, and approval flows so multiple developers collaboratively manage databases online

Maintain schema consistency across environments (dev, test, staging, production)

Enforce schema design standards

Block high-risk SQL statements

Apply tiered approval for data changes

Apply tiered approval for permission grants

Navigate to the security rules page

  1. Log on to the DMS console V5.0.

  2. Open the Security Rules page:

    • Compact mode: Hover over the icon in the upper-left corner and choose All functions > Security and Specifications > Security Rules.

    • Normal mode: In the top navigation bar, choose Security and Specifications > Security Rules.

Create a rule set

Create multiple rule sets to apply different security policies per database engine and environment.

  1. Log on to the DMS console V5.0.
  2. Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Security and disaster recovery (DBS) > Security Rules.

    Note

    If you use the DMS console in normal mode, choose Security and disaster recovery (DBS) > Security Rules in the top navigation bar.

  3. On the Security Rules page, click Create Rule Set in the upper-left corner.

  4. Configure the rule set:

    Parameter

    Description

    Engine Type

    The database engine this rule set applies to.

    Rule Set Name

    A descriptive name for the rule set.

    Remarks

    The applicable scope of the security rule set, such as the intended environment.

  5. Click Submit.

Configure rules in a rule set

After creating a rule set, open its Details page to modify default rules or add custom rules for specific checkpoints.

For example, you can disable the Whether the result set supports export rule on the SQL Console tab to prevent result set exports.

Note

When a task is submitted in DMS, the system validates the task against all related rules for the corresponding checkpoints. The task runs only after passing all validations.

Edit predefined rules

  1. Log on to the DMS console V5.0.
  2. Move the pointer over the 2023-01-28_15-57-17.png icon in the upper-left corner and choose All Features > Security and disaster recovery (DBS) > Security Rules.

    Note

    If you use the DMS console in normal mode, choose Security and disaster recovery (DBS) > Security Rules in the top navigation bar.

  3. On the Security Rules page, find the target rule set and click Edit in the Actions column.

    Note

    To create a new rule set, see Create security rules.

  4. In the left-side navigation pane of the Details page, select the checkpoint tab to configure.

  5. Modify predefined configurations and toggle rule states as needed.

Create a custom rule

If predefined rules do not meet your requirements, create a custom rule.

  1. On the Details page of the rule set, click Create Rule next to Actions.

  2. Set the following parameters:

    Parameter

    Description

    Checkpoints

    The checkpoint this rule applies to. You cannot create rules for the Basic Configuration Item checkpoint.

    Note

    You cannot add rules to basic configuration items.

    Template Database

    Optional. Click Load from Template Database to pre-populate a rule template. You can modify the DSL statement predefined in the template.

    Rule Name

    A descriptive name for the rule.

    Rule DSL

    The DSL statement that defines the rule logic. Use the factors, actions, functions, and operators listed on the right side of the editor. For syntax details, see DSL syntax for security rules.

  3. Click Submit.

  4. Navigate to the checkpoint tab, find the new rule, and click Enable in the Actions column. In the Prompt dialog, click OK.

    Note

    Rules are in the Disabled state by default after creation. You must enable them manually.

Checkpoint reference

Each tab on the rule set Details page corresponds to a checkpoint. The following table lists available checkpoints and their documentation.

CheckpointDocumentation
SQL Console for relational databasesSQL Console for relational databases
SQL Console for MongoDBSQL Console for MongoDB
SQL Console for RedisSQL Console for Redis
SQL CorrectSQL Correct
Permission applicationPermission application
Data ExportData Export
Schema DesignSchema Design
Synchronize databases and tablesSynchronize databases and tables
Data TrackingData Tracking
Sensitive Column ChangeSensitive Column Change
Test Data GenerateTest Data Generate
Database CloneDatabase Clone

Apply a rule set to instances

After configuring a rule set, apply it to one or more database instances. Two methods are available.

Batch apply (recommended)

Use this method to apply the same rule set to multiple instances at once.

  1. Log on to the DMS console V5.0.
  2. In the top navigation bar, click Data Assets. In the left-side navigation pane, click Instances.

  3. Click the Instance List tab.

  4. Select one or more instances and click Batch edit.

    Note

    All selected instances must use the same database engine.

  5. In the Edit instance information in batches dialog, set Control Mode to Security Collaboration.

  6. Select a rule set from the Security Rules drop-down list and click OK.

Apply to a single instance

  1. Log on to the DMS console V5.0.
  2. In the left-side instance list, right-click the target instance.

  3. Choose Control Mode > Security Collaboration and select a security rule set.

  4. In the Modify control mode dialog, click OK.