This content has been marked as final. Show 3 replies
I think a better question would be : "why do I ever need to do that?"
What problem are you trying to address? Why do you have blocking sessions and why are they problematic?
In our experience, automate killing will cause various problems.
Anyway, I have implemented it by Shell script.
Check V$LOCK & V$SESSION -> alter system kill session...
See MAX_IDLE_BLOCKER_TIME (dbms_resource_manager.create_plan_directive) - the maximum amount of time in seconds that a session can be idle while blocking another session's acquisition of a resource. Default is NULL, which implies unlimited.
Edited by: stefan nebesnak on Feb 4, 2013 11:49 AM
--Creating plan directive exec dbms_resource_manager.create_plan_directive ( plan=>'prod_plan', group_or_subgroup=>'dss_group', comment=>'Limit idle time', max_idle_time=>900, max_idle_blocker_time=>300); --http://www.datadisk.co.uk/html_docs/oracle/resource_manager.htm