The Instance Sessions feature of Database Autonomy Service (DAS) lets you view, export, and terminate sessions on a target instance, and perform 10-second SQL analysis, sql throttling, and sql optimization.
Prerequisites
-
If the target database instance is a PolarDB-X instance, only PolarDB-X 2.0 is supported.
-
The target database instance must be connected to DAS with a status of Normal Access.
Procedure
Log on to the DAS console.
In the navigation pane on the left, click .
Find the target instance and click the instance ID to open the instance details page.
In the navigation pane on the left, click Instance Sessions.
-
On the Session Management page, you can view detailed information, such as Instance Sessions and Session Statistics, for the target instance. The Instance Sessions section displays the number of exceptional sessions, the number of active sessions, and the maximum execution time, and includes action buttons such as SQL Throttling, Optimize, and Terminate Session. The Session Statistics section shows session distribution by summary, user, access source, and database.
In the Instance Sessions section, you can perform the following operations:
View instance session information, including details such as exceptional sessions, active sessions, maximum execution time, CPU utilization, and connection utilization.
10-second SQL analysis: Click 10s SQL Analysis in the upper-right corner of the page. The resulting dialog box shows information such as SQL statistics, the slow query log, and an SQL overview for a 10-second interval. For more information, see 10-second SQL analysis.
SQL throttling: Click SQL Throttling. In the SQL Throttling dialog box, configure parameters to throttle sessions that meet the specified conditions. For more information, see sql throttling.
Optimization: Click Optimize to optimize sessions on the instance. For more information, see sql optimization.
Export active sessions.
Terminate sessions.
To terminate a session, you must provide the credentials for the database account that created it. Alternatively, use a privileged account, which can terminate sessions created by other accounts.
NoteThe User column in the session list shows the database account that created the session.
Click End Session History to view the history of terminated sessions.
In the Session Statistics section, you can perform the following operations:
View session statistics: Review the session summary, which includes the total number of sessions, the total number of running sessions, and the longest duration of a running session. You can also view the total and active session counts grouped by user, access source, and database.
Export session statistics: Export session statistics organized by summary, user, access source, or database.