This topic describes how to customize system database filtering for an instance in DMS using security rules.
Background
After you add an instance to DMS, the service automatically collects metadata from its databases. To protect system databases, reduce visual clutter, or hide databases that contain sensitive business data, you can configure DMS to filter specific system databases, such as the MySQL information_schema database. After you apply a filter, DMS stops collecting metadata for the specified databases, making them no longer visible or searchable in DMS.
For PostgreSQL instances, this filtering applies to a schema instead of an entire database.
Prerequisites
The instance is managed in Security Collaboration mode.
Notes
When you enable the filter system databases switch, DMS filters the system databases that you specify. If you disable the switch, DMS does not filter any system databases by default.
Procedure
Log in to DMS 5.0.
-
Move the pointer over the
icon in the upper-left corner and choose . NoteIf you use the DMS console in normal mode, choose in the top navigation bar.
Find the target rule set and click Edit in the Actions column.
-
In the navigation pane on the left, click Others>Metadata Synchronization.
-
Find the Filter System Database Configurations rule and click Edit.
-
In the Edit Configuration Item panel, enable the Filter System Databases switch.
-
Specify the system databases to filter. You can use the following methods:
-
Enter the full names of databases
In the Databases to Filter list, enter the full names of the databases to filter.
-
Use a regular expression to match databases
In the Regex to Filter Databases field, enter a regular expression. For example,
test_\w+filters all system databases whose names start withtest_.NoteYou can use both the database list and regular expression options at the same time.
-
-
Click Submit.
-
Apply the filter settings. You can apply the settings manually or wait for them to be applied automatically.
-
Manually apply the settings
-
In the navigation pane on the left, click Database Instances and find the target instance.
-
Right-click the instance name and select Refresh/Sync Dictionary.
-
-
Automatically apply the settings
DMS synchronizes metadata every day at 18:00:00.
-