Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Disconnecting session from an on logon trigger
The exception method is great, but only if the user does not have ADMINISTER
DATABASE TRIGGER granted somewhere like IMPORT FULL DATABASE.
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of Alberto Dell'Era
Sent: Monday, October 15, 2007 3:59 PM
To: oracle-l_at_freelists.org
Subject: Re: Disconnecting session from an on logon trigger
> I'd like to create an on logon trigger that will prevent the user from
> connecting in certain circumstances. I have one way of doing it which
would
> be to issue
> execute immediate ' alter system kill session 'session_id', 'serial#''
Just raise an exception from the logon trigger raise_application_error (-20001, 'logon denied because ...'); so your bad user will also have a nice error which clearly states the reason why the logon was denied - which is very nice.
-- Alberto Dell'Era "the more you know, the faster you go" -- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Tue Oct 16 2007 - 08:22:03 CDT
![]() |
![]() |