Skip to content

KILL_SESSION_TRANS

接口/方法功能

终止指定会话上的事务。

接口/方法声明

PROCEDURE KILL_SESSION_TRANS(NODEID INTEGER,SESSID INTEGER);

参数说明

参数名称参数类型参数解释默认值
NODEIDINTEGER节点号
SESSIDINTEGER会话号

操作示例

SQL> SELECT nodeid,session_id,ip,user_name,db_name,start_t,status,curr_tid,auto_commit,trans_start_t FROM sys_sessions;

NODEID | SESSION_ID | IP | USER_NAME | DB_NAME | START_T | STATUS | CURR_TID | AUTO_COMMIT | TRANS_START_T | 
------------------------------------------------------------------------------
1 | 230493 | 127.0.0.1| SYSDBA| SYSTEM| 2015-05-13 17:26:52.000 AD | 114 | 717726 | T | 2022-05-13 17:49:32.000 AD |
1 | 230494 | 127.0.0.1| SYSDBA| SYSTEM| 2015-05-13 17:44:29.000 AD | 112 | 717719 | F | 2022-05-13 17:45:35.000 AD |

Total 2 records.

Use time:0 ms.     

SQL> EXEC DBMS_DBA.KILL_SESSION_TRANS(1,230494);