This topic describes how to enable the SQL audit and analysis feature in the PolarDB-X 1.0 console.
Prerequisites
- Log Service is activated.
- A PolarDB-X 1.0 instance is purchased.
- A database is created.
Procedure
Important Before you can use a RAM user to enable the SQL audit and analysis feature, you must grant the required permissions to the RAM user. For more information, see Authorize a RAM user to use the access log feature.
- Log on to the PolarDB-X 1.0 console.
- In the upper-left corner of the page, select the region where the instance resides.
- On the Instance List page, click the name of the instance.
- In the left-side navigation pane, choose .
- Authorize PolarDB-X 1.0 as prompted to assume the AliyunDRDSDefaultRole role to access Log Service.This operation is required only when you enable the SQL audit and analysis feature for the first time. You must complete the authorization by using your Alibaba Cloud account.Warning To ensure that PolarDB-X 1.0 SQL audit logs can be sent to Log Service, do not revoke the permissions from the AliyunDRDSDefaultRole role or delete the RAliyunDRDSDefaultRole role.
- Enable the SQL audit and analysis feature.