Use the SQL Explorer and Audit feature to monitor, manage, and analyze the execution of SQL statements on your database instances. After this feature is enabled, it automatically captures SQL statements from the database kernel, along with information such as the execution account, IP address, and execution details, without affecting instance performance. It also provides the Traffic Playback and Stress Test feature, to help you determine whether to upgrade your instance type for peak business traffic.
Supported databases and regions
The SQL Explorer and Audit feature is available only after you enable DAS Enterprise Edition. The supported databases and regions vary by edition. For a list of the databases and regions supported by each edition, see Supported databases and regions for each edition.
Features
-
Search: Query and export SQL statements and related information, such as the database, status, and execution time. For more information, see Audit.
-
️SQL Explorer: Diagnose SQL health, troubleshoot performance issues, and analyze business traffic. For more information, see SQL Explorer.
-
Security Audit: Automatically identify risks such as high-risk SQL statements, SQL injection, and new access sources. For more information, see Security Audit (Old Version).
-
Traffic Playback and Stress Test: Helps you determine if your instance type requires an upgrade for peak business traffic. For more information, see Traffic Playback and Stress Test.
-
SQL Review: Provides global SQL workload analysis to help you quickly identify and analyze suspicious SQL in a database instance and get optimization suggestions. For more information, see SQL Review.
-
Transaction Analysis: View the transaction type, number of transactions, and transaction details of a specific thread within a specified time frame. This helps you understand, analyze, and optimize database performance at the transaction level. For more information, see Transaction Analysis.
-
Quick Transaction Analysis: Identify the start and end statements of the transaction that contains the target SQL. This allows you to determine the commit or rollback status of the transaction. For more information, see Quick Transaction Analysis.
Billing
You can use the SQL Explorer and Audit feature only after you enable DAS Enterprise Edition. For information about the billing of different editions, see Product billing.
Enable SQL Explorer and Audit
If you have already enabled DAS Enterprise Edition for a database instance, the SQL Explorer and Audit feature is enabled automatically. For more information, see Enable DAS Enterprise Edition.
Log on to the DAS console.
In the navigation pane on the left, click .
Find the target instance and click the instance ID to open the instance details page.
-
In the left-side navigation pane, click Request Analysis > SQL Explorer and Audit.
-
On the SQL Explorer and Audit page, enable the SQL Explorer and Audit feature.
If DAS Enterprise Edition is not enabled for your Alibaba Cloud account, follow the on-screen instructions to enable it. For more information, see Enable DAS Enterprise Edition.
Change the data retention period
If you reduce the data retention period, DAS immediately deletes all sql audit logs older than the new period. We recommend that you export and save the sql audit logs to a local device before you reduce the data retention period.
Log on to the DAS console.
In the navigation pane on the left, click .
Find the target instance and click the instance ID to open the instance details page.
-
In the left-side navigation pane, click Request Analysis > SQL Explorer and Audit.
-
On the SQL Explorer and Audit page, click Service Settings.
-
Change the retention period and click Submit.
If you have enabled DAS Enterprise Edition V3, you can change the data retention period for different sub-features.
Note-
You can also set the Data Storage Duration for SQL Explorer and Audit on the DAS Professional Edition Management page. For more information, see Manage DAS Enterprise Edition.
-
The storage space for SQL Explorer and Audit data is provided by DAS and does not use your database instance's storage space.
-
Disable SQL Explorer and Audit
Disabling the SQL Explorer and Audit feature does not affect your services, but it deletes all sql audit logs. We recommend that you export and save the sql audit logs to a local device before you disable this feature. If you enable the feature again, sql audit logs will be recorded from the time of re-enablement.
Log on to the DAS console.
In the navigation pane on the left, click .
Find the target instance and click the instance ID to open the instance details page.
-
In the left-side navigation pane, click Request Analysis > SQL Explorer and Audit.
-
On the SQL Explorer and Audit page, click Search.
-
In the log list area of the Search tab, click Export.
-
In the dialog box that appears, select the fields to export and the time range.
-
Download the exported file and save it to a secure location.
The data download process varies by DAS Enterprise Edition.
-
On the Search tab, download the exported file from the View Exported Logs.
-
On the Task list tab, download the exported file.
-
-
Click Service Settings to disable SQL Explorer and Audit.
If you have enabled DAS Enterprise Edition V3, deselect all features for SQL Explorer and Audit, and then click Submit.
NoteApproximately one hour after you disable the SQL Explorer and Audit feature, the system releases the storage space used for its data.
Migrate data between editions
Compared to V1, DAS Enterprise Edition V2 uses a different underlying storage architecture that employs hybrid storage to reduce costs and improve efficiency. Building on this hybrid storage, V3 provides more flexible billing by itemizing charges for each feature.