Lesson Overview
In this lesson, you'll learn how to monitor the database sessions using the Sessions Card provided in the SAP BTP version of the SAP HANA cockpit.
You can monitor the database threads using the Threads Card provided in the SAP BTP version of the SAP HANA cockpit.
You can also use the SQL Statements app provided in the SAP BTP version of the SAP HANA cockpit.
Business Case
As a database administrator, you want to analyze the database sessions connected to identify which applications or which users are currently generating the workload.
SAP HANA Cockpit – Sessions Card

Analyzing the sessions connected to your SAP HANA database helps you identify which applications or which users are currently connected to your system, as well as what they're doing in terms of SQL execution.
In the SAP HANA cockpit Database Overview page, search for the Sessions card (1).
The Sessions card (2) shows an overview of the total and running sessions in your SAP HANA Cloud database instance.
Selecting the Sessions card title opens the Sessions app, which, by default, gives a detailed breakdown (3) of all session n your SAP HANA Cloud database instance. You can see the following information:
- Active/inactive sessions and their relation to applications
- Whether a session is blocked and, if so, which session is blocking it
- The number of transactions that are blocked by a blocking session
- Statistics such as average query runtime and the number of DML and DDL statements in a session
- The operator currently being processed by an active session

Use the filter (1) options to search for specific sessions. You can use the following filter options:
Connection Status:
- Running: A statement is executing.
- Idle: No statements are currently executing on this connection.
- Queuing: The connection is currently queued. The status changes to RUNNING when it is dequeued (this depends on the system's resource consumption).
- Empty: A historic connection that is removed after one hour.
Hint
The connection removal time can be configured in indexserver.ini [session] connection_history_lifetime = 60 # minutes.The Transaction Status column can show the following different states: INACTIVE, ACTIVE, PRECOMMITTED, ABORTING, PARTIAL_ABORTING, or ACTIVE_PREPARE_COMMIT depending on the state of the transaction.
You can also exclude your own transaction and/or filter on a specific application.
Select the Columns (2) button to add or remove columns to display only the information you require.
See the following video for selecting a specific session.