dbTalk Databases Forums  

allowing a user to kill his own connections

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss allowing a user to kill his own connections in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mh@pixar.com
 
Posts: n/a

Default allowing a user to kill his own connections - 05-05-2008 , 03:53 PM






I would like to allow developers to kill their own sessions, e.g.

alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? If not, what's the
best way to handle this?

TIA!
Mark

--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #2  
Old   
Ana C. Dent
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-05-2008 , 10:00 PM






mh (AT) pixar (DOT) com wrote in news:NsKTj.1754$ah4.1745 (AT) flpi148 (DOT) ffdc.sbc.com:

Quote:
I would like to allow developers to kill their own sessions, e.g.

alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? If not, what's the
best way to handle this?

You can write a procedure owned by SYS which can issue the ALTER SYSTEM;
using owner's rights not invoker's rights.


Reply With Quote
  #3  
Old   
Ana C. Dent
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-05-2008 , 10:00 PM



mh (AT) pixar (DOT) com wrote in news:NsKTj.1754$ah4.1745 (AT) flpi148 (DOT) ffdc.sbc.com:

Quote:
I would like to allow developers to kill their own sessions, e.g.

alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? If not, what's the
best way to handle this?

You can write a procedure owned by SYS which can issue the ALTER SYSTEM;
using owner's rights not invoker's rights.


Reply With Quote
  #4  
Old   
Ana C. Dent
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-05-2008 , 10:00 PM



mh (AT) pixar (DOT) com wrote in news:NsKTj.1754$ah4.1745 (AT) flpi148 (DOT) ffdc.sbc.com:

Quote:
I would like to allow developers to kill their own sessions, e.g.

alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? If not, what's the
best way to handle this?

You can write a procedure owned by SYS which can issue the ALTER SYSTEM;
using owner's rights not invoker's rights.


Reply With Quote
  #5  
Old   
Ana C. Dent
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-05-2008 , 10:00 PM



mh (AT) pixar (DOT) com wrote in news:NsKTj.1754$ah4.1745 (AT) flpi148 (DOT) ffdc.sbc.com:

Quote:
I would like to allow developers to kill their own sessions, e.g.

alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? If not, what's the
best way to handle this?

You can write a procedure owned by SYS which can issue the ALTER SYSTEM;
using owner's rights not invoker's rights.


Reply With Quote
  #6  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-06-2008 , 07:21 AM



On May 5, 3:53*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I would like to allow developers to kill their own sessions, e.g.

* * alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? *If not, what's the
best way to handle this?

TIA!
Mark

--
Mark Harrison
Pixar Animation Studios
I agree with the stored procedure route, as that's the only way you
could restrict the action to sessions associated with the invoking
user.


David Fitzjarrell


Reply With Quote
  #7  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-06-2008 , 07:21 AM



On May 5, 3:53*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I would like to allow developers to kill their own sessions, e.g.

* * alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? *If not, what's the
best way to handle this?

TIA!
Mark

--
Mark Harrison
Pixar Animation Studios
I agree with the stored procedure route, as that's the only way you
could restrict the action to sessions associated with the invoking
user.


David Fitzjarrell


Reply With Quote
  #8  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-06-2008 , 07:21 AM



On May 5, 3:53*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I would like to allow developers to kill their own sessions, e.g.

* * alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? *If not, what's the
best way to handle this?

TIA!
Mark

--
Mark Harrison
Pixar Animation Studios
I agree with the stored procedure route, as that's the only way you
could restrict the action to sessions associated with the invoking
user.


David Fitzjarrell


Reply With Quote
  #9  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-06-2008 , 07:21 AM



On May 5, 3:53*pm, m... (AT) pixar (DOT) com wrote:
Quote:
I would like to allow developers to kill their own sessions, e.g.

* * alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? *If not, what's the
best way to handle this?

TIA!
Mark

--
Mark Harrison
Pixar Animation Studios
I agree with the stored procedure route, as that's the only way you
could restrict the action to sessions associated with the invoking
user.


David Fitzjarrell


Reply With Quote
  #10  
Old   
Mark D Powell
 
Posts: n/a

Default Re: allowing a user to kill his own connections - 05-06-2008 , 07:33 AM



On May 5, 11:00*pm, "Ana C. Dent" <anaced... (AT) hotmail (DOT) com> wrote:
Quote:
m... (AT) pixar (DOT) com wrote innews:NsKTj.1754$ah4.1745 (AT) flpi148 (DOT) ffdc.sbc.com:

I would like to allow developers to kill their own sessions, e.g.

* * alter system kill session '$sid,$serial#'

but only for sessions which are theirs.

Is there a grant which can handle this? *If not, what's the
best way to handle this?

You can write a procedure owned by SYS which can issue the ALTER SYSTEM;
using owner's rights not invoker's rights.
I also agree with the stored procedure route; however, the owner does
not need to be SYS and probably should not be SYS. I created a DBA
privileged account to own special purpose routines like this. Using a
non-SYS owner makes keeping track of the special purpose routines,
database event triggers, and like easier.

IMHO -- Mark D Powell --




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.