SHOW SQL_BLOCK_RULE
Descriptionβ
Displays the configured SQL blocking rules. If no rule name is specified, all rules will be displayed.
Syntaxβ
SHOW SQL_BLOCK_RULE [FOR <rule_name>];
Optional Parametersβ
<rule_name>
The name of the SQL blocking rule to display. If omitted, all rules will be shown. |
Access Control Requirementsβ
Users executing this command must have the following privileges:
Privilege | Object | Notes |
---|---|---|
ADMIN | User or Role | Required to perform this operation. |
Examplesβ
- Display all SQL blocking rules
SHOW SQL_BLOCK_RULE;
+------------+----------------------------+---------+-------------+------------+-------------+--------+--------+
| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |
+------------+----------------------------+---------+-------------+------------+-------------+--------+--------+
| test_rule | select * from order_analysis | NULL | 0 | 0 | 0 | true | true |
| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |
+------------+----------------------------+---------+-------------+------------+-------------+--------+--------+
- Display a specific SQL blocking rule
SHOW SQL_BLOCK_RULE FOR test_rule2;
+------------+------+---------+-------------+------------+-------------+--------+--------+
| Name | Sql | SqlHash | PartitionNum | TabletNum | Cardinality | Global | Enable |
+------------+------+---------+-------------+------------+-------------+--------+--------+
| test_rule2 | NULL | NULL | 30 | 0 | 10000000000 | false | true |
+------------+------+---------+-------------+------------+-------------+--------+--------+