数据仓库服务 GAUSSDB(DWS)-ALTER SYSTEM KILL SESSION:示例

时间:2023-11-10 17:34:06

示例

查询会话信息:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
SELECT sid,serial#,username FROM V$SESSION;

       sid       | serial# | username 
-----------------+---------+----------
 140131075880720 |       0 | 
 140131025549072 |       0 | 
 140131073779472 |       0 | 
 140131071678224 |       0 | 
 140131125774096 |       0 | 
 140131127875344 |       0 | 
 140131113629456 |       0 | 
 140131094742800 |       0 | 
(8 rows)

结束SID为140131075880720的会话:

1
ALTER SYSTEM KILL SESSION '140131075880720,0' IMMEDIATE;
support.huaweicloud.com/sqlreference-dws/dws_06_0141.html