Managing Regulation Sets
CBH allows you to create regulation sets for quickly adding a large number of database rules, relieving you from complicated and repetitive workloads.
CBH has 29 common database operation commands preset, including ALTER, TRUNCATE, EXECUTE, INSERT, DELETE, UPDATE, SELECT, GRANT, REVOKE, HANDLER, DEALLOCATE, SET, COMMIT, ROLLBACK, PREPARE, CREATEINDEX, DROPINDEX, CREATEFUNCTION, DROPFUNCTION, CREATEVIEW, DROPVIEW, CREATEDATABASE, DROPDATABASE, CREATEPROCEDURE, DROPPROCEDURE, DROPPROCEDURE, CREATETABLE, DROPTABLE, CALL, and ACCESS.
This topic walks you through how to create, view, modify, and delete a regulation set.
Prerequisites
You have the operation permissions for the DB Rules module.
Creating a Regulation Set
- Log in to the CBH system.
- Choose Policy > Database Rules > RegSet to go to the DB rule list.
- Create a regulation set.
- In the upper right corner of the page, click New.
- Configure the RegSet name and specify a protocol.
- The RegSet Name must be unique in the CBH system.
- Currently, only MySQL, Oracle, PostgreSQL, and GaussDB are supported. The protocol type cannot be changed after being selected.
- Click OK. You can then view new regulation set on the list page.
- Add database rules.
- In the row of the command set you want to add rules, click Add regulation in the Operation column.
- Add libraries, tables, and commands for the regulation set.
Table 1 Parameters for adding regulation Parameter
Description
Lib
This parameter is optional. It can be set to a regular expression to match the library name.
By default, all SQL statements that use this command are intercepted.
Table
This parameter is optional. It can be set to a regular expression to match the table name.
By default, all SQL statements that use this command are intercepted.
Cmd
This parameter is mandatory. Select at least one preset command.
Currently, 29 commands are available. You can select multiple commands.
- Click OK.
Querying and Editing a Regulation Set
- Log in to the CBH system.
- Choose Policy > Database Rules > RegSet to go to the DB rule list.
- Query the regulation sets.
Quick search: Enter a keyword in the search box and search for regulation sets by regulation set name.
- Click the name of a regulation set you want to edit or click Manage in the row of the regulation set in the Operation column.
- View and edit basic information.
In the Basic Info area, click Edit. In the displayed dialog box, edit the basic information.
You can edit RegSet name. The Protocol and Department cannot be changed.
- Query and edit a regulation set in the Regulation area.
- To add a library, table, or command to a regulation set, click Add and then complete modifications in the displayed dialog box.
- To delete a regulation set, locate the row and click Remove.
Deleting a Regulation Set
- Log in to the CBH system.
- Choose Policy > Database Rules > RegSet to go to the DB rule list.
- To delete one regulation set, click Delete in the Operation column of the row where the regulation set locates to delete it.
- To delete multiple regulation sets together, select the ones you want to delete and click Delete at the bottom of the list to delete all selected regulation sets together.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot