Database Autonomy Service (DAS) provides the session management feature that allows you to view or terminate the sessions of a database instance. You can also export statistics of the sessions or perform 10-second SQL analysis, SQL throttling, or SQL optimization. This topic describes how to use the session management feature.

Prerequisites

  • Your ApsaraDB RDS for MySQL instance is of High-availability Edition or Enterprise Edition.
    Note ApsaraDB RDS for MySQL instances of Basic Edition do not support the session management feature. In the DAS console, ignore the pages related to the feature. For more information about the database engines and features that are supported by DAS, see Database engines and features supported by DAS.
  • The ApsaraDB RDS for MySQL instance is connected to DAS and is in the Accessed state.

Procedure

  1. Log on to the DAS console.
  2. In the left-side navigation pane, click Instance Monitoring.
  3. 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, click Instance Sessions.
  5. On the Session Management page, view the session information of the instance in the Instance Sessions and Session Statistics sections.
    • You can perform the following operations in the Instance Sessions section:
      • View information such as exceptions, active sessions, longest execution duration, CPU utilization, and connection usage.
      • Click 10s SQL Analysis in the upper-right corner of the page. In the dialog box that appears, view the information of queries within 10 seconds, such as summary statistics, slow logs, and SQL overview. For more information, see 10-second SQL analysis.
      • Click SQL Throttling. In the dialog box that appears, configure the parameters to enable threshold-based SQL throttling on instance sessions. For more information, see SQL throttling.
      • Click Optimize to optimize instance sessions. For more information, see SQL Optimization.
      • Export active sessions.
      • Terminate sessions.
    • You can perform the following operations in the Session Statistics section:
      • View summary statistics and session statistics, such as the total number of sessions and the number of active sessions, categorized by users, access sources, and databases. The summary statistics include the total number of sessions, the number of running sessions, and the longest session runtime.
      • Export summary statistics and session statistics categorized by users, access sources, and databases.