Step 2: 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.
Enabling Database Audit¶
Log in to the management console.
Select a region, click , and choose Security > Database Security Service. The Dashboard page is displayed.
In the navigation tree on the left, choose Databases.
Select a database audit instance from the Instance drop-down list.
In the database list, click Enable in the Operation column of the database to be audited.
The Audit Status of the database is Enabled. You do not need to restart the database.
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 Security > Database Security Service. The database audit service page is displayed.
In the left navigation pane, choose Dashboard.
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.