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

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博客 ” ,链接:http://blog.itpub.net/24532903/viewspace-672996/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24532903/viewspace-672996/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值