Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help me to create a kill session procedure

rafadbaDec 4 2017 — edited Dec 4 2017

I have a problem in my production database, while I don't find a solution, I need a help to create a workaround. A procedure that kill session that satisfy this query:

SELECT s.sid,

         s.serial#

    FROM v$session s,

         v$process p

   WHERE s.paddr       = p.addr

     AND s.username = 'NAGIOS'

     AND s.status      = 'ACTIVE'

AND s.module = 'SQL*PLUS'

and s.machine = 'MMM'

and s.last_call_et > 400;

So, my job will execute this procedure to kill this sessions. The procedure cannot have parameters. Someone can help me?

I found out some like that in ask tom, but this procedure won't work for me.

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:226613885088

This post has been answered by Franky Weber Faust on Dec 4 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 1 2018
Added on Dec 4 2017
5 comments
174 views