Quick transaction analysis

更新时间:
复制 MD 格式

The quick transaction analysis feature helps you find the start and end statements of the transaction containing a target SQL statement. This reveals whether the transaction was committed or rolled back.

How it works

Based on the data in the hot storage of DAS Enterprise Edition V3 or Compliance Edition, quick transaction analysis identifies the start and end statements of the transaction containing your target SQL statement. This reveals whether the transaction was committed or rolled back.

Note
  • A single quick transaction analysis task analyzes only the thread where the target SQL statement was executed.

  • The analysis covers a 10-minute window, which includes 5 minutes before and 5 minutes after the target SQL statement was executed.

  • The analysis results show only the transaction that contains the target SQL statement. The results include the transaction start statement (if within the first five minutes), the target SQL statement, and the transaction end statement (if within the last five minutes).

Prerequisites

  • The target database engine is one of the following:

    • ApsaraDB RDS for MySQL

    • PolarDB for MySQL

  • The database instance is connected to DAS and shows a status of Normal Connection.

  • The database version and region support DAS Enterprise Edition V3 or Compliance Audit Edition. For more information, see Editions and supported features.

  • The instance must have DAS Enterprise Edition V3 or Compliance Audit Edition enabled. For more information, see Introduction to DAS audit logs.

Use cases

Use quick transaction analysis with audit logs to determine whether a target SQL statement was committed or rolled back.

Limitations

  • The analysis is limited to SQL data within the hot storage period of DAS Enterprise Edition V3 or Compliance Edition.

    Note
    • You can change the hot storage duration for DAS Enterprise Edition V3 or Compliance Edition on the SQL Explorer and Audit page by clicking Service Settings in the upper-right corner.

    • Hot storage incurs fees. For more information about billing, see Billing details.

  • Quick transaction analysis does not support read-only SQL statements, such as SELECT statements.

Procedure

  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, and then click the Audit tab.

    • Create a quick transaction analysis task

      In the log list, find the target SQL statement and click Quick Transaction Analysis in the Actions column.

    • View the analysis results

      The analysis results appear on the current page. You can also view historical tasks and results on the SQL Explorer > Transaction Analysis page, in the Quick Transaction Analysis tab.