All Products
Search
Document Center

Database Autonomy Service:Use the features of DAS Enterprise Edition

Last Updated:Mar 01, 2024

When you need to monitor and manage SQL statements executed in database instances, you can use the SQL Explorer and Audit feature to record and analyze the execution status of SQL statements. To use the SQL Explorer and Audit feature, you must enable DAS Enterprise Edition. This topic describes how to enable and use DAS Enterprise Edition.

Overview of DAS Enterprise Edition

In addition to the features provided by DAS Basic Edition, DAS Enterprise Edition provides the SQL Explorer and Audit feature. You can use the SQL Explorer and Audit feature to query information about executed SQL statements, use the information to troubleshoot performance issues, and identify high-risk sources. You can also use the traffic playback and stress testing features to check whether you need to scale up your database instance to handle workloads during peak hours. The following section describes the features of DAS Enterprise Edition:

  • Search: This feature is used to query and export SQL statements and related information, such as the databases on which the SQL statements are executed, the status of SQL requests, and the execution duration of each SQL statement. For more information, see Search.

  • SQL Explorer: This feature is used to diagnose the health status of SQL statements, troubleshoot performance issues, and analyze business traffic. For more information, see SQL Explorer.

  • Security audit: This feature is used to automatically identify risks, such as high-risk SQL statements, SQL injection attacks, and new access sources. For more information, see Security audit.

  • Traffic playback and stress testing: These features are used to check whether you need to scale up your database instance to handle workloads during peak hours. For more information, see Traffic playback and stress testing.

Supported databases and regions

The SQL Explorer and Audit module is available in the new and previous versions:

  • New version: Compared with the SQL Explorer and Audit module of the previous version, the new version changes the underlying storage architecture to use a combination of hot storage and cold storage. This reduces costs and increases efficiency. For more information about the differences between the two versions, see the What are the differences between the new and previous versions of SQL Explorer and Audit? section of the "FAQ" topic.

  • Previous version: If your database instance and the region in which the database instance resides support the new version of the SQL Explorer and Audit module, you can manually migrate the data generated by the module to the new version. For more information, see the How do I migrate the data of SQL Explorer and Audit from the previous version to the new version? section of the "FAQ" topic.

    Important
    • Database instances in the China (Heyuan) and China (Ulanqab) regions do not support data migration from DAS Enterprise Edition V1 to DAS Enterprise Edition V2.

    • Database instances in the China (Qingdao), China (Guangzhou), China (Zhangjiakou), China (Hong Kong), and Singapore regions support data migration from DAS Enterprise Edition V1 to DAS Enterprise Edition V2 only for data that is stored no more than 30 days. To migrate data that is stored for more than 30 days from DAS Enterprise Edition V1 to DAS Enterprise Edition V2, you must modify the data storage duration before the migration. For more information, see the Modify the storage duration of data generated by SQL Explorer and Audit section of the "Overview" topic. If you reduce the storage duration of data generated by SQL Explorer and Audit, DAS immediately clears the data that is stored for a period longer than the specified storage duration. Proceed with caution.

The following table describes the databases and regions supported by the two versions.

Version

Database

Region

New version

  • ApsaraDB RDS for MySQL

  • PolarDB for MySQL

China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), China (Guangzhou), China (Heyuan), China (Zhangjiakou), China (Ulanqab), China (Hong Kong), and Singapore

Previous version

  • ApsaraDB RDS for MySQL

  • ApsaraDB RDS for SQL Server

  • PolarDB for MySQL

Note

ApsaraDB RDS for SQL Server 2008 R2 High-availability Edition is not supported.

China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), China (Zhangjiakou), China (Hohhot), China (Chengdu), China (Guangzhou), China (Heyuan), China (Ulanqab), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta)

ApsaraDB RDS for PostgreSQL

China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Zhangjiakou), Singapore, Malaysia (Kuala Lumpur), and Indonesia (Jakarta)

PolarDB-X 2.0

China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), and Singapore

Billing

You are charged if you use the features of the SQL Explorer and Audit module. For more information, see Billing overview.

Enable SQL Explorer and Audit

Note

If you have enabled DAS Professional Edition for a database instance, the SQL Explorer and Audit module is automatically enabled for the database instance. You do not need to manually enable this module. For more information, see Purchase DAS Professional Edition.

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

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

  5. On the SQL Explorer and Audit page, click Enable.

    If DAS Professional Edition is not purchased within your Alibaba Cloud account, follow the instructions to purchase DAS Professional Edition. For more information, see Purchase DAS Professional Edition.

    Note

    It takes 10 to 20 minutes to enable the SQL Explorer and Audit module.

Modify the storage duration of data generated by SQL Explorer and Audit

Warning

If you reduce the storage duration of data generated by the SQL Explorer and Audit module, DAS immediately clears the SQL audit logs that are stored for a period longer than the specified storage duration. We recommend that you export and save SQL audit logs to your computer before you reduce the storage duration.

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

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

  5. On the SQL Explorer and Audit page, click the SQL Explorer tab. On this tab, click Service Settings.

  6. In the dialog box that appears, modify the storage duration and click OK.

    Note
    • The default storage duration of data generated by the SQL Explorer and Audit module is 30 days. The SQL audit logs that are stored for a period longer than the specified storage duration are deleted.

    • You can also specify the storage duration of data generated by the SQL Explorer and Audit module for your database instance on the DAS Professional Edition Management page. For more information, see Purchase DAS Professional Edition.

    • The storage space that is occupied by the data generated by the SQL Explorer and Audit module is provided by DAS and does not consume the storage of your database instance.

Disable SQL Explorer and Audit

Warning

After you disable the SQL Explorer and Audit module, your business is not affected. However, SQL audit logs are cleared. Before you disable the SQL Explorer and Audit module, we recommend that you export the SQL audit logs as a file and download the file to your computer. If you enable the SQL Explorer and Audit module again, SQL audit logs are generated from the point in time when the SQL Explorer and Audit module is enabled.

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

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

  5. On the SQL Explorer and Audit page, click the Search tab.

  6. In the Logs section of the Search tab, click Export.

    导出日志

  7. In the dialog box that appears, configure the Exported Fields and Export Time Range parameters, and then click OK.

  8. Download the exported file to your computer and keep the file safe.

    • If SQL Explorer and Audit of the new version is enabled for your database instance, you can download the exported log file on the Task list tab.

    • If SQL Explorer and Audit of the previous version is enabled for your database instance, you can click View Exported Logs on the Search tab to download the exported log file.

  9. Click Service Settings. In the dialog box that appears, turn off the switch and click OK.

Note

The storage space that is occupied by the data generated by the SQL Explorer and Audit module is released one hour after the SQL Explorer and Audit module is disabled.

Migrate the data of SQL Explorer and Audit from the previous version to the new version

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

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

  5. On the page that appears, click Migrate to a new version.

  6. In the Migrate to a new version dialog box, configure the Data Storage Duration parameter and click OK.

Warning

The migration operation cannot be terminated or rolled back. Carefully read the migration instructions before you migrate data.

References

Overview of DAS Enterprise Edition

Enable and manage DAS Cost-efficient Edition and DAS Enterprise Edition

Disable DAS Cost-efficient Edition and DAS Enterprise Edition