All Products
Search
Document Center

Database Autonomy Service:Session management

Last Updated:Aug 22, 2023

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

Prerequisites

Your database instance is connected to DAS and is in the Normal Access state.

Procedure

In this topic, an ApsaraDB RDS for MySQL instance is used to show how to use the session management feature.

  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, click Instance Sessions.

  5. On the Session Management tab, view the session information of the database instance in the Instance Sessions and Session Statistics sections.

    • In the Instance Sessions section, you can perform the following operations:

      • View information such as exceptional sessions, active sessions, the longest execution duration, CPU utilization, and connection usage.

      • Click 10s SQL Analysis in the upper-right corner of the section. In the dialog box that appears, view the information about queries within 10 seconds, such as summary information, slow query logs, and SQL overview. For more information, see 10-second SQL analysis.

      • Click SQL Throttling. In the SQL Throttling dialog box, configure the parameters to enable threshold-based SQL throttling on sessions. For more information, see SQL throttling.

      • Select sessions and click Optimize to optimize the sessions. For more information, see SQL optimization.

      • Export active sessions.

      • Terminate sessions.

        To terminate a session, you must enter the account and password of the database in which the session is created. You can also use a database account that has the permissions to terminate the sessions that are created by using other database accounts. For example, you can use a privileged account.

        Note
        • In the User column of a session, you can view the database account that is used to create the session.

        • You can click End Session History to view the records of terminated sessions.

    • In the Session Statistics section, you can perform the following operations:

      • View summary information and session statistics by user, access source, or database. The summary information includes the total number of sessions, the total number of running sessions, and the longest session duration.

      • Export summary information and session statistics by user, access source, or database.