SQL Explorer and Audit

Updated at:

SQL Explorer and Audit gives you full visibility into SQL activity on your ApsaraDB RDS for SQL Server instance. With it, you can:

  • Retain a complete audit trail of SQL requests, including execution duration, database, and request status.

  • Search and export historical SQL statements for compliance reviews or incident investigation.

  • Analyze SQL health, diagnose performance issues, and understand business traffic patterns.

Prerequisites

Before you begin, ensure that you have:

Note

If DAS Enterprise Edition is already active on an instance, SQL Explorer and Audit is enabled automatically — no manual action needed.

Limitations

  • SQL Explorer and Audit is not available for serverless ApsaraDB RDS for SQL Server instances. See Overview.

  • Supported databases and regions vary by DAS Enterprise Edition version. See the "Supported databases and regions" section of DAS Editions and supported features.

Billing

SQL Explorer and Audit requires an active DAS Enterprise Edition subscription. For pricing details, see Billing overview.

Activate SQL Explorer and Audit

  1. Log on to the DAS console.

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

  3. Find the database instance and click its instance ID.

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

  5. Click Enable.

If DAS Enterprise Edition is not yet activated, follow the on-screen prompts to activate it. See Enable and manage DAS Economy Edition and DAS Enterprise Edition.

Use SQL Explorer and Audit

  1. Log on to the DAS console.

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

  3. Find the database instance and click its instance ID.

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

The page provides two features:

FeatureWhat it does
SearchQuery and export SQL statements along with related details: the database, request status, and execution duration. See Search (Audit).
SQL ExplorerDiagnose SQL health, troubleshoot performance issues, and analyze business traffic. See SQL Explorer.

Modify the storage duration

Warning

Reducing the storage duration immediately clears audit logs older than the new limit. Export your logs before making this change.

  1. Log on to the DAS console.

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

  3. Find the database instance and click its instance ID.

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

  5. Click the SQL Explorer tab, then click Service Settings.

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

Usage notes:

  • If DAS Enterprise Edition V3 is active, storage duration can be configured per sub-feature.

  • Storage duration can also be modified from the DAS Professional Edition Management page. See Enable and manage DAS Economy Edition and DAS Enterprise Edition.

  • Audit log storage is provided by DAS and does not consume your database instance's storage.

Disable SQL Explorer and Audit

Warning

Disabling SQL Explorer and Audit clears all audit logs. Your business is not affected, but the audit history is cleared. If you re-enable the feature later, logging restarts from that point.

Export your audit logs before disabling.

Step 1: Export audit logs

  1. Log on to the DAS console.

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

  3. Find the database instance and click its instance ID.

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

  5. On the Search tab, click Export in the Logs section.

  6. In the dialog box, configure Exported Fields and Export Time Range, then click OK.

  7. Download the exported file. The download location depends on your DAS Enterprise Edition version:

    • On the Search tab, click View Exported Logs.

    • On the Task list tab, download the file directly.

Step 2: Disable the feature

  1. Click Service Settings.

  2. In the panel that appears, disable SQL Explorer and Audit. If DAS Enterprise Edition V3 is active, select all sub-features to fully disable the module.

Note

Audit log storage is released one hour after the feature is disabled.

What's next