All Products
Search
Document Center

PolarDB:️SQL Explorer

Last Updated:Jul 31, 2024

The SQL Explorer feature provides value-added services for your databases, such as security audit and performance diagnostics.

Billing

  • The trial edition of PolarDB is available for free. In the trial edition, audit logs are retained for only one day. You can query only data that is stored in the retained audit logs. The trial edition does not support advanced features. For example, data cannot be exported, and data integrity cannot be ensured.

  • If you want to retain the audit logs for 30 days or longer, you can view the pricing details in Pricing of SQL Explorer (optional).

Features

  • SQL audit logging

    You can record all the operations that are performed on your databases. You can use SQL audit logs to perform operations such as fault analysis, behavior analysis, and security audit.

  • Enhanced search

    This feature allows you to search data by using multiple conditions, such as the database, user, client IP, thread ID, execution duration, and execution status. It also allows you to export and download the results.

Enable the SQL Explorer feature

  1. Log on to the PolarDB console.

  2. In the upper-left corner of the console, select the region where your cluster is deployed.

  3. Click the ID of the cluster.

  4. In the left-side navigation pane, choose Log and Audit > SQL Explorer.

  5. Click Official Edition.

  6. Set the retention period of SQL audit logs and click OK.

Modify the retention period of SQL logs

  1. Log on to the PolarDB console.

  2. In the upper-left corner of the console, select the region where your cluster is deployed.

  3. Click the ID of the cluster.

  4. In the left-side navigation pane, choose Log and Audit > SQL Explorer.

  5. In the upper-right corner of the SQL Explorer page, click Service Settings.

  6. Modify the storage duration and click OK.

Export SQL log entries

  1. Log on to the PolarDB console.

  2. In the upper-left corner of the console, select the region where your cluster is deployed.

  3. Click the ID of the cluster.

  4. In the left-side navigation pane, choose Log and Audit > SQL Explorer.

  5. Click Export on the right.

  6. In the dialog box that appears, set Export Field and Time Range, and then click OK.

  7. After the export is complete, download the exported file in the Export SQL Log Records dialog box, and save it properly.

Disable the SQL Explorer feature

Note

After you disable the SQL Explorer feature, all SQL audit logs are deleted. Export SQL audit logs before you disable SQL Explorer.

  1. Log on to the PolarDB console.

  2. In the upper-left corner of the console, select the region where your cluster is deployed.

  3. Click the ID of the cluster.

  4. In the left-side navigation pane, choose Log and Audit > SQL Explorer.

  5. In the upper-right corner of the SQL Explorer page, click Service Settings.

  6. Modify the storage duration and click OK.

  7. Turn off the SQL Explorer switch.

View the size and consumption details of audit logs

  1. Log on to the Alibaba Cloud Management Console.

  2. In the upper-right corner of the page, choose Expenses > User Center.

  3. In the left-side navigation pane, choose Spending Summary > Spending Summary.

  4. On the Bills page, click the Details tab. In the search bar, select Instance ID from the drop-down list and enter the ID of the cluster for which you want to query the details.

    费用账单

  5. View the billing details in the data entries in which the value in the Billing Item column is sql_explorer.