OceanBase AI Database allows you to terminate tenant sessions by using the KILL statement.
The syntax of the SQL statement is as follows:
KILL [CONNECTION] 'session_id';
The rules for using the statement are as follows:
You can execute the
KILLstatement to terminate only one session at a time.A normal user can view all sessions if they have the
PROCESSprivilege. If they have theSUPERprivilege, they can terminate all sessions and statements one by one. Otherwise, a normal user can only view and terminate their own sessions and statements. A tenant administrator can terminate all sessions and statements one by one.For information about how to view your privileges, see View user privileges. If you do not have the required privileges, contact the administrator to obtain the privileges. For more information, see Grant privileges directly.
The syntax for terminating a specified session is as follows:
KILL session_id;
Alternatively, use the following syntax:
KILL CONNECTION session_id;
You need to replace session_id with the corresponding session ID, which can be obtained by using the SHOW PROCESSLIST or SHOW FULL PROCESSLIST statement. For more information about how to obtain the session ID, see View tenant sessions.
For more information about the KILL statement, see KILL.