Skip to content
Developer Edition runs on one host and does not require a product license file. Need multi-host deployment or performance testing at scale? Explore Enterprise Edition

SHOW SESSIONS command

The SHOW SESSIONS command returns information about all sessions that are active for the user in the current Graph service.

The following table describes the returned columns:

Column Description
id The unique ID of the session.
username The name of the user who owns the session.
client The IP address of the client that initiated the session.
schema The path of the schema in the current session. The default is /default_schema.
graph The schema path and name of the graph or temporary graph in the current session. If no graph or temporary graph is set for the current session, the value is either empty or corresponds to the schema path and name of the home graph set for the current user.
timezone The time zone set in the session. The default is UTC.
active_query The query that is currently running in the session.
start_time The time when the session was started.
update_time The time when the session was last modified. You can use SESSION SET and SESSION RESET to modify the session.

Prerequisites

Only the user with the role ADMIN can view all the active sessions for all users in the current Graph service. Other users can view only their own sessions that are active. For more information about roles, see Roles and privileges.

Syntax

show_sessions_command
SHOW SESSIONS

show_sessions_command ::=
    'SHOW' 'SESSIONS'

Examples

Show all active sessions

SHOW SESSIONS

Return:

+---------------------+----------+-----------------------------------------------------------------+-----------------+-----------------------+----------+---------------+-----------------------------+-----------------------------+
| id                  | username | client                                                          | schema          | graph                 | timezone | active_query  | start_time                  | update_time                 |
+---------------------+----------+-----------------------------------------------------------------+-----------------+-----------------------+----------+---------------+-----------------------------+-----------------------------+
| 5205985221035598119 | root     | 127.0.0.1:38100/GO/5.0.0/v5.0.0-20250826075917-508a2bc033f7     | /default_schema |                       | UTC      | show sessions | 2025-09-29T06:46:07.159000Z | 2025-09-29T06:46:07.159000Z |
| 5144571693254518393 | user1    | 127.0.0.1:39420/GO/5.0.0/v5.0.0-20250826075917-508a2bc033f7     | /my_schema      |                       | UTC      |               | 2025-09-29T06:33:06.963000Z | 2025-09-29T06:33:06.963000Z |
+---------------------+----------+-----------------------------------------------------------------+-----------------+-----------------------+----------+---------------+-----------------------------+-----------------------------+