码迷,mamicode.com
首页 > 数据库 > 详细

Oracle inactive session (last_call_et)

时间:2015-07-29 17:07:04      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:

注意last_call_et的值,

select s.status,s.last_call_et,s.* from v$session s where username=‘DDD‘;

在本例中,开了个sqlplus,然后对一张大表进行select * from big_table;

可以开到一直有结果显示出来。

但当查看v$session可以看到status一直是INACTIVE.

同时开另一个session,不做任何事。(last_call_et一直在增加)

而在query的session,last_call_et只是在0,1之间变化。

技术分享

oracle doc:

LAST_CALL_ET NUMBER If the session STATUS is currently ACTIVE, then the value represents the elapsed time in seconds since the session has become active.

If the session STATUS is currently INACTIVE, then the value represents the elapsed time in seconds since the session has become inactive.

综上,在判断session为inactive时,要观察一下last_call_et的值,否则有可能误杀。

Oracle inactive session (last_call_et)

标签:

原文地址:http://www.cnblogs.com/which/p/4686415.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!