关于 kill session

今天发生了好几次,杀进程不释放锁的情况。大部分是由于使用 alter system kill session 命令杀不干净导致的,这种情况对于生产库危害很大,锁的长期持有会严重影响业务正常运行。为此问题也曾不止一次开SR,但都没有得到满意的结果。最近在DSI上面看到了关于这方面的一些内部解释,留此备忘:

[@more@]Note: When a session is marked for kill (alter session), PMON rolls back that transaction a
number of undo entries at a time (determined by _CLEANUP_ROLLBACK_ENTRIES). After
that, PMON continues with its regular cycle to poll other processes and goes to sleep on pmon
timer (20 seconds). In addition, if it encounters any locks or latches during the rollback, it gives
up and tries again later. (As of Oracle8i PMON defers transaction recovery of "killed" sessions
to SMON when the number of transactions to recover is greater than a defined maximum. This
allows the use of fast start parallel rollback if necessary, and frees up locks held by the killed
process immediately.)
When you kill a process from the operating system, it becomes a dedicated job for PMON and it
rolls it back immediately until it is finished. The NT platform is different, because there are no
operating system processes that you can kill. On all Unix platforms, it is usually better to just
kill the Oracle process and let PMON clean it up. On NT, everything is thread-based and there is
only one Oracle process. However, there is a utility on NT to let you kill the thread
(killora.exe).

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

转载于:http://blog.itpub.net/19015/viewspace-995627/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值