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