After a series of filters are used to auditing specific events, you can clean up the environment by clearing filter configurations, deleting filters, and clearing auditing logs.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the auditing feature.
Clear filter configurations
You can call the AUDIT_LOG_FILTER_REMOVE_USER function (expression) to remove a filter from a user.
Syntax
AUDIT_LOG_FILTER_REMOVE_USER('user_name');
The following table describes the fields in the statement.
| Field | Description |
|---|---|
| user_name | Specifies the user name.
NoteThe |
Example
Remove the filter from user user001.
obclient [test]> SELECT AUDIT_LOG_FILTER_REMOVE_USER('user001');
The result is as follows:
+-----------------------------------------+
| AUDIT_LOG_FILTER_REMOVE_USER('user001') |
+-----------------------------------------+
| OK |
+-----------------------------------------+
1 row in set
Delete a filter
You can call the AUDIT_LOG_FILTER_REMOVE_FILTER function (expression) to delete a filter.
Syntax
AUDIT_LOG_FILTER_REMOVE_FILTER('filter_name');
The following table describes the fields in the statement:
| Field | Description |
|---|---|
| filter_name | Specifies the filter name.
NoteThe |
Example
Delete the filter log_all.
obclient [test]> SELECT AUDIT_LOG_FILTER_REMOVE_FILTER('log_all');
The result is as follows:
+-------------------------------------------+
| AUDIT_LOG_FILTER_REMOVE_FILTER('log_all') |
+-------------------------------------------+
| OK |
+-------------------------------------------+
1 row in set