SQL Explorer and Audit

更新时间:
复制 MD 格式

SQL Explorer and Audit records and analyzes SQL statements executed on your database instances, including execution accounts, IP addresses, and details, with zero impact on instance performance. You can also use traffic playback and stress testing to evaluate whether to scale up for peak workloads.

Supported databases and regions

DAS Enterprise Edition is required. Supported databases and regions vary by edition, as listed in the Supported databases and regions section of the "DAS editions and supported features" topic.

Features

  • Search: Query and export SQL statements with details such as target database, request status, and execution duration. Search (Audit).

  • SQL Explorer: Diagnose SQL health, troubleshoot performance issues, and analyze business traffic. SQL Explorer.

  • Security audit: Automatically identify risks such as high-risk SQL statements, SQL injection attacks, and new access sources. Security audit.

  • Traffic playback and stress testing: Evaluate whether to scale up database instances for peak workloads. Traffic playback and stress testing.

  • SQL Review: Analyze SQL workloads globally, locate suspicious SQL statements, and get optimization suggestions. SQL Review.

  • Transaction analysis: View transaction types, counts, and details for a thread within a specified period to optimize database performance at the transaction level. Transaction analysis.

  • Quick transaction analysis: Check the start and end SQL statements of a transaction to determine its commit or rollback status. Quick transaction analysis.

Billing

DAS Enterprise Edition is required. Billing rules vary by edition — see Billing overview.

Enable SQL Explorer and Audit

Note

If DAS Enterprise Edition is already enabled for your instance, SQL Explorer and Audit is automatically enabled. No manual action is required. Enable DAS Enterprise Edition.

  1. Log on to the DAS console.

  2. In the navigation pane on the left, click Intelligent O&M Center > Instance Monitoring .

  3. Find the target instance and click the instance ID to open the instance details page.

  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 Enterprise Edition is not enabled, follow the on-screen instructions. Enable DAS Enterprise Edition.

Change the storage duration

Warning

If you reduce the storage duration, DAS immediately clears SQL audit logs older than the new limit. Export and save your logs before making this change.

  1. Log on to the DAS console.

  2. In the navigation pane on the left, click Intelligent O&M Center > Instance Monitoring .

  3. Find the target instance and click the instance ID to open the instance details page.

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

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

  6. In the panel that appears, modify the storage duration and click Submit.

    With DAS Enterprise V3, you can set different storage durations for each subfeature.

    Note

Disable SQL Explorer and Audit

Warning

Disabling SQL Explorer and Audit does not affect your business, but all SQL audit logs are cleared. Export and download your logs before disabling. If you re-enable the feature, logging resumes from that point.

  1. Log on to the DAS console.

  2. In the navigation pane on the left, click Intelligent O&M Center > Instance Monitoring .

  3. Find the target instance and click the instance ID to open the instance details page.

  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 Search section, click Export.

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

  8. Download and save the exported file.

    The download location varies by DAS Enterprise Edition version:

    • On the Search tab, click View Exported Logs to download the exported file.

    • Download the exported file on the Task list tab.

  9. Click Service Settings to disable the SQL Explorer and Audit feature.

    For DAS Enterprise V3, select all subfeatures of SQL Explorer and Audit.

    Note

    Storage occupied by SQL Explorer and Audit data is released one hour after the feature is disabled.

Migrate SQL Explorer and Audit data between DAS Enterprise Edition versions

DAS Enterprise V2 introduced hot-cold hybrid storage for better performance at lower cost. V3 further separates billing by feature for more flexible, cost-effective pricing.

If your instance supports V3, migrate from V1 or V2 to benefit from lower pricing. How do I migrate data between different versions of DAS Enterprise Edition?