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. In this topic, a PolarDB-X cluster is used to demonstrate the session management feature.

Prerequisites

  • Your PolarDB-X cluster is a PolarDB-X V2.0 cluster.
  • The PolarDB cluster 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 cluster in the Instance Sessions and Session Statistics sections. p2022010506
    • You can perform the following operations in the Instance Sessions section:
      • View information such as exceptions, active sessions, and longest execution duration.
      • 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 query 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 sessions. For more information, see SQL throttling.
      • Click Optimize to optimize 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.