Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cancelling User sessions

Re: Cancelling User sessions

From: Bhooshan Prabhu <bhooshan.prabhu_at_citicorp.com>
Date: Fri, 02 Jul 1999 15:55:16 +0530
Message-ID: <377C938C.23D3FDF6@citicorp.com>


Hi Nigel,

A session is killed by issuing command "ALTER SYSTEM KILL SESSION 'x,n'". For a user with non-dba privileges to achive this, each such user will have to have a ALTER SYSTEM privilege granted to her / him. I don't think, your DBA will agree to that.

Your DBA can write a piece of code, which can look for sessions, that have been inactive for a acceptable time limit i.e. 30 minutes or so and issue statements to kill these sessions. This piece of code, can then be submitted as a dbms_job so that Oracle will execute it, at intervals as specified during job submission.

Regards
Bhooshan


Nigel bruno wrote:

> We have a problem at the moment were sessions are left hanging and
> causing other sessions to lock out. Because we don't have the privileges
> to kill sessions we currently have to contact the DBAs to do this for
> us, which obviously takes too much time.
>
> Is it possible to create a procedure that will allow a user to cancel
> sessions with the same user id as the user executing the command. This
> will allow us to cancel our own sessions without causing a security
> breach.
>
> I think I know how to code it but could someone confirm the theory is
> OK. I'm assuming as long as the owner of the procedure has kill session
> privilege then users who have access to the procedure will be able to
> kill the sessions belonging to them. The procedure will check that the
> user id of the session to be canceled is the same as the user id of the
> user running the procedure before the session is killed.
>
> Hope this make sense.
>
> PS Any ideas why debugging VB and stopping the program causes sessions
> to be left open.
Received on Fri Jul 02 1999 - 05:25:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US