AnalyticDB for PostgreSQL provides the SQL audit feature for you to view SQL details and audit SQL activities on a regular basis. Enabling SQL audit does not affect instance performance.
SQL audit records all DML and DDL operations. The system captures such operations by analyzing data transmitted through network protocols. A few records may be lost when a large number of SQL queries are sent to database instances.
- SQL audit records are saved for 30 days.
- By default, SQL audit is disabled for instances. When this feature is enabled for instances, additional fees will be incurred. For more information, see AnalyticDB for PostgreSQL pricing.
- Log on to the AnalyticDB for PostgreSQL console.
- Select the region where an instance is located from the Region drop-down list.
- Click the instance ID to go into its Basic Information page.
- In the left-side navigation pane, click Security.
- Click the SQL Audit tab, and click Enable.
- In the message that appears, click OK to enable SQL audit.
- After enabling SQL audit, you can query SQL information based on conditions such as Select Time Range, DB, User, and Keyword.
- To disable SQL audit, click Disable SQL Audit on the SQL Audit tab.
Related API operations
|ModifySQLCollectorPolicy||You can call this operation to enable or disable the SQL collection feature for a specified instance.|