Killing my Oracle sessions

AttachmentSize
Plain text icon KillingMySessions.txt8.65 KB
articles: 

Many a time, developers ask for procedures to kill there own sessions in the oracle db.
Many of our developers are scattered around the globe in different time zones.
During on-call rotation, developers will be calling me, round the clock, to kill their sessions.

To resolve this issue, I came up with this package, consisting of a pipelined function
and a procedure. The pipelined function, displays the users' sessions in the db.
The procedure kills the developer's session only. With the exception, not to kill
-the users' current session
-other users' sessions
-backgroung processes

Comments

It is definitely an useful script to have especially if you are lazy dba like me to offload repetitive work.

Vijai, I went through your code. My understanding is, whenever developer calls, we can use this procedure to kill the session. Still we have to kill the session every time.. Is that correct? Can't we give this procedure to developers? Since they can not kill others session/backgound process etc.. Is that the purpose it is created??? Please let me know.

Hi,

I had created the public synonym and granted execute permissions to the public.

create public synonym myDemoPack for sys.myDemoPack;

grant execute on myDemoPack to public;

So the developers can can kill their sessions.
Thanks
JP

Execute permission on the procedure can be granted to developers.
The procedure only kills the users own (NON-CURRENT) session only.
Thanks
JP