Creating a Database Audit Task
Scenarios
You want to check whether database objects for audit meet specifications and affect performance
Prerequisites
A data source has been created and connected successfully.
Constraints
- The audited database objects can only be tables, views, sequences, indexes, functions, procedures, triggers, or packages.
- A maximum of 10,000 schemas can be audited at a time.
- During the database audit, do not delete database objects that are being audited, or audit results may be affected.
- If a system template is used, the audit results before and after a version upgrade will be inconsistent. You are advised to use a custom template.
Procedure
- Log in to the UGO console.
- In the navigation pane, choose SQL Audit > Database Audit.
- Click Create Audit Task.
Figure 1 Creating a Database Audit Task
Table 1 Parameter description Parameter
Example Value
Description
Task Name
db_audit_01
Enter a task name, which is mandatory.
The value is a string of 5 to 50 characters, including letters, digits, underscores (_), and hyphens (-). It must start with a letter (case-insensitive) and end with a digit or letter.
Database Type
GaussDB
Select a database type. Currently, only GaussDB is supported. This parameter is mandatory.
Data Source
app_db_01
Select a data source. Currently, only GaussDB is supported. This parameter is mandatory.
If there is no available data source, click Create Data Source.
Schema
demo_schema_01
Select a schema. This parameter is optional and only available for GaussDB databases.
- If this parameter is not specified, all schemas are audited by default. However, up to 10,000 schemas can be audited.
- If the parameter is specified, you can select up to 10,000 schemas.
Rule Template
baseline_template_01
Select a template based on the selected database type.
You can set the template information by referring to Adding a Rule Template.
Description
Audit task for service database objects
Enter a task description, which contains up to 100 characters. This parameter is optional.
- Click OK. The task is displayed in the list.
If a running task is terminated due to a database exception, you can click Retry.
- If the task is terminated during object collection, delete the collected objects and reconnect to the database to collect objects after the retry.
- If the task is terminated during an audit, the audit will be resumed after the retry.
Figure 2 Audit task listThe task status can be:
- Pending: The database audit task is to be scheduled.
- Collecting objects: DDL statements in the schema of a specified database.
- Auditing SQL statements: The database is being audited.
- Audit completed: The database audit is complete only after all database objects are audited.
- Audit failed: An exception occurred during the audit.
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