Updated on 2026-04-13 GMT+08:00

Exporting SQL Statements

After connecting the database to the database audit instance, export SQL statements of the database in CSV format.

Prerequisites

  • You have purchased a database audit instance and its Status is Running.
  • You have enabled database audit. For details, see Enable Database Audit.
  • A security group rule has been configured for the database audit instance.

Procedure

  1. Click in the upper left corner on the displayed page and select a region.
  2. In the navigation tree on the left, choose Data Reports.
  3. In the Instance drop-down list, select the instance whose SQL statement information you want to export.
  4. Click the Statements tab.
  5. To export a specified SQL statement, perform the following steps:

    • Select the time range ( All time, 30 minutes, 1 hour, 24 hours, 7 days, or 30 days), or customize the start time and end time. The SQL statements in the time period are displayed in the list.
    • Click and select a filter or enter a keyword.

  6. Click Export.
  7. In the displayed dialog box, click Figure 1 to export the SQL statements.

    A maximum of 10,000 records can be exported at a time.

    Figure 1 Exporting SQL Statements