This topic describes how to use the SQL Explorer and Audit feature on an ApsaraDB RDS for PostgreSQL instance. The SQL Explorer and Audit feature is based on the full request analysis and security audit capabilities of Database Autonomy Service (DAS) and is integrated with the SQL statement search feature and the SQL Explorer feature. You can query information about executed SQL statements. Then, you can use the information to troubleshoot various performance issues.

Prerequisites

  • DAS Professional Edition is purchased within your Alibaba Cloud account. For more information about how to purchase DAS Professional Edition, see Purchase DAS Professional Edition.
  • The RDS instance runs RDS High-availability Edition.
  • If you log on to the RDS instance by using the credentials of a RAM user, the RAM user must be granted the read and write permissions such as AliyunRDSFullAccess on the RDS instance. For more information about how to grant permissions to RAM users, see Use RAM to manage ApsaraDB RDS permissions.

Billing

You are charged for DAS Professional Edition. For more information, see Pricing of DAS Professional Edition.

Note After the SQL Explorer and Audit feature is enabled, ApsaraDB RDS stops billing the Use the SQL Audit feature on an ApsaraDB RDS for PostgreSQL instance feature. The pricing of the SQL Explorer and Audit feature is based on the pricing of DAS Professional Edition.

Overview

  • The SQL statement search feature is used to query and export the SQL statements that are executed and the information about the SQL statements. The information includes the database, status, and execution duration of each SQL statement. For more information, see Search.
  • The SQL Explorer feature is used to perform health diagnoses on SQL statements, troubleshoot performance issues, and analyze business traffic. For more information, see SQL Explorer.

Enable the SQL Explorer and Audit feature

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, choose Autonomy Service > SQL Explorer and Audit.
  3. If the SQL Explorer and Audit feature is not enabled, click Enable on the page that appears. In the dialog box that appears, click Enable Professional Edition.
    Note If the page that appears contains the Search and SQL Explorer tabs, the SQL Explorer and Audit feature is enabled.

Query information on the Search tab

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, choose Autonomy Service > SQL Explorer and Audit.
  3. On the page that appears, click the Search tab. Then, specify the search conditions based on which you want to query the relevant information. For more information about the Search tab, see Search.

Query information on the SQL Explorer tab

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, choose Autonomy Service > SQL Explorer and Audit.
  3. On the page that appears, click the SQL Explorer tab. Then, view the relevant information of the RDS instance. For more information about the SQL Explorer tab, see SQL Explorer.