codecamp

OceanBase SESSION

描述

该语句用来强制结束 session。

格式

session_stmt:
    KILL [CONNECTION] session_id;

session_id:
    INT_VALUE

参数解释

参数

描述

session_id

要结束 session 的编号

示例

  • 强制结束编号为 3221502221 和 3221750376 的 session。
OceanBase(admin@test)>show processlist;
+------------+-------+---------------------+------+---------+------+--------+----------------------------------+
| Id         | User  | Host                | db   | Command | Time | State  | Info                             |
+------------+-------+---------------------+------+---------+------+--------+----------------------------------+
| 3221502221 | admin | 100.xx.xx.xx:44775  | test | Sleep   |   10 | SLEEP  | NULL                             |
| 3221502083 | admin | 100.xx.xx.xx:44720  | test | Query   |    0 | ACTIVE | show processlist                 |
| 3221502317 | NULL  | 100.xx.xx.xx:41414  | test | Query   |    0 | ACTIVE | REMOTE/DISTRIBUTE PLAN EXECUTING |
| 3221750377 | NULL  | 100.xx.xx.xx:41414  | test | Query   |    0 | ACTIVE | REMOTE/DISTRIBUTE PLAN EXECUTING |
| 3221750376 | admin | 100.xx.xx.xx:43783  | test | Sleep   |    4 | SLEEP  | NULL                             |
+------------+-------+---------------------+------+---------+------+--------+----------------------------------+
5 rows in set (0.04 sec)

OceanBase(admin@test)>kill 3221502221;
Query OK, 0 rows affected (0.00 sec)

OceanBase(admin@test)>kill connection 3221750376;
Query OK, 0 rows affected (0.05 sec)


OceanBase SELECT
OceanBase SET PASSWORD
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

OceanBase 控制台指南

OceanBase ODC 使用指南

OceanBase Web 版 ODC

OceanBase 客户端版 ODC

OceanBase Connector/J 开发者指南

OceanBase 什么是OceanBase Connector/J

OceanBase SQL 参考(MySQL 模式)

OceanBase SQL 参考(Oracle 模式)

OceanBase 基本元素

OceanBase 数据库对象

OceanBase 函数

OceanBase 单行函数

OceanBase 返回数字的字符串函数

OceanBase 通用比较函数

OceanBase 编码解码函数

OceanBase SQL 调优指南

OceanBase 相关协议

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }