ITPub博客

首页 > Linux操作系统 > Linux操作系统 > alter system kill session sid serirl#和kill -9 spid的结果比较

alter system kill session sid serirl#和kill -9 spid的结果比较

原创 Linux操作系统 作者:mitable_tom 时间:2010-09-08 18:45:47 0 删除 编辑

C:\WINDOWS\ADAM>sqlplus system/oracle@dhk

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 9月 8 15:44:20 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> create table tt2 (id numbet,varchar(40));


SQL> insert into tt2 values(1,'tt');

已创建 1 行。

SQL> commit;

提交完成。

这里开另外的SHELL kill 使用alter system kill session '314,31133';

SQL>
SQL> exit
ERROR:
ORA-00028: 您的会话己被终止


从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options(情况复杂) 断开

C:\WINDOWS\ADAM>sqlplus system/oracle@dhk

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 9月 8 17:44:14 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> update tt2 set value='cc' where id=2;

已更新 1 行。

SQL>

这里开另外的SHELL kill 使用kill -9 22841


SQL>
SQL> select * from tab;
select * from tab
*
第 1 行出现错误:
ORA-03113: 通信通道的文件结束


SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options 断开

C:\WINDOWS\ADAM>sqlplus system/oracle@dhk

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 9月 8 17:50:56 2010

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> update tt2 set value='cc' where id=2;

已更新 1 行。

SQL>

这里开另外的SHELL kill 使用alter system kill session '331,33482';


SQL>
SQL>
SQL> select * from tab;
select * from tab
*
第 1 行出现错误:
ORA-00028: 您的会话己被终止


SQL>

 

 

当用alter system kill session '331,33482'杀进程时v$session中status列为killed,仅仅是会话被终止,需要客户端退出,才会清空.但相关的操作系统进程已经没有了.

当用kill -9 22841杀操作系统进程后,过几秒钟,v$session中即会清空被杀的进程.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24532903/viewspace-672996/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-09-01

  • 博文量
    9
  • 访问量
    10902