Step 5: Enable Database Audit
By default, database audit complies with a full audit rule, which is used to audit all databases that are connected to the database audit instance. You can enable audit and check audit results. For details, see Viewing the Audit Dashboard.
Prerequisites
- You have added and installed an agent, and the agent status is Running.
- A security group rule has been configured for the database audit instance.
Enabling Database Audit
- Log in to the management console.
- Select a region, click , and choose . The Dashboard page is displayed.
- In the navigation tree on the left, choose Databases.
Figure 1 Going to the Databases page
- Select a database audit instance from the Instance drop-down list.
- In the database list, click Enable in the Operation column of the database you want to audit.
The Audit Status of the database is Enabled. You do not need to restart the database.
Figure 2 Enabling database audit
Verifying Audit Results
- Run an SQL statement (for example, show databases) in the target database.
- Log in to the management console.
- Select a region, click , and choose . The Dashboard page is displayed.
- In the navigation tree on the left, choose Data Reports. The Data Reports page is displayed.
- In the Instance drop-down list, select the instance that audits the target database.
- Click the Statements tab.
- Click next to Time to set the start and end time, and click Submit. The SQL statements entered in 1 will be displayed.
Figure 3 Viewing SQL statements
- If the entered SQL statement is not displayed, the connection between the agent and the database audit instance is abnormal. Rectify the fault by following the instructions in What Do I Do If the Communication Between the Agent and Database Audit Instance Is Abnormal?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.