KILL SESSION command¶
The KILL SESSION command terminates a session that is running in the Graph service and then returns the ID of the terminated session.
Your current session cannot be terminated with this command.
Syntax¶
- kill_session_command
kill_session_command ::=
'KILL' 'SESSION' session_id
Parameters¶
session_id¶
The ID of the session to be terminated. Only a single session ID can be specified at a time. You can use SHOW CURRENT_SESSION to obtain the current session ID or SHOW SESSIONS to obtain the IDs of all the sessions in the current Graph service.
Examples¶
Kill a session¶
KILL SESSION 1228399980662537
1228399980662537 is the ID of the session to be terminated.
Return:
+------------------+
| session_id |
+------------------+
| 1228399980662537 |
+------------------+
Kill all sessions except for the current session¶
Your current session cannot be terminated with KILL SESSION. To kill all other sessions, execute:
'''
CALL show_sessions() RETURN id
NEXT
CALL kill_session(id, false) FINISH
'''