Skip navigation.

Killing my Oracle sessions

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

AttachmentSize
KillingMySessions.txt8.65 KB

It is definitely an useful

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

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

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

Grant execute on the procedure to developers

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