All Products
Search
Document Center

Database Autonomy Service:Quick transaction analysis

Last Updated:Aug 08, 2024

You can use the quick transaction analysis feature of Database Autonomy Service (DAS) to check the start and end SQL statements of the transaction where the SQL statement to be analyzed is located. This way, you can obtain the commit or rollback status of the SQL statement.

Feature description

Based on the data of DAS Enterprise Edition V3 stored in hot storage mode, the quick transaction analysis feature of DAS checks the start and end SQL statements of the transaction where the SQL statement to be analyzed is located. This helps you obtain the commit or rollback status of the SQL statement.

Note
  • A quick transaction analysis task analyzes only the thread where the SQL statement to be analyzed is located.

  • Up to 10 minutes of data is supported for a single SQL statement to be analyzed. Specifically, the data that is generated 5 minutes before and that 5 minutes after the execution time of the SQL statement is supported.

  • A quick transaction analysis task analyzes only the transaction where the specified SQL statement is located and returns the following information: the transaction start statement (returned only if it is within the 5 minutes before the execution time of the SQL statement), the specified SQL statement, and the transaction end statement (returned only if it is within the 5 minutes after the execution time of the SQL statement).

Prerequisites

  • Your database instance runs one of the following database engines:

    • ApsaraDB RDS for MySQL

    • PolarDB for MySQL

  • The database instance is connected to DAS and is in the Accessed state.

  • The version and region of the database instance support DAS Enterprise Edition V3. For more information, see Editions and supported features.

  • DAS Enterprise Edition V3 is enabled for the database instance. For more information, see Overview of DAS Enterprise Edition.

Scenarios

Analyze the commit or rollback status of a SQL statement based on audit logs.

Limits

  • You can use the quick transaction analysis feature to analyze only the SQL data that is stored in hot storage of DAS Enterprise Edition V3.

    Note
    • To modify the storage period of such data, click Service Settings in the upper-right corner of the SQL Explorer and Audit page.

    • For information about the fees incurred by hot storage, see Billing details.

  • SQL statements that do not involve updates are not supported by the quick transaction analysis feature.

Procedure

  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. On the page that appears, you can click the Audit and SQL Explorer tabs.

    • Create a quick transaction analysis task

      On the Audit tab, specify search conditions in the Conditions section to search for the required log. In the Logs section, find the SQL statement that you want to analyze and click Quick Transaction Analysis in the Actions column.

    • View the quick transaction analysis results

      Wait for the quick transaction analysis task to return results. To view historical tasks and their results, go to the SQL Explorer > Transaction Analysis tab and view the information in the Quick Transaction Analysis section.