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: Is there a way to do this?

Re: Is there a way to do this?

From: FC <flavio_at_tin.it>
Date: Fri, 09 May 2003 09:03:09 GMT
Message-ID: <h9Kua.66220$3M4.1599946@news1.tin.it>

There is the possibility of using a database event trigger (LOGON) in conjuction with V$SESSION, a view that holds information like the name of the executable program currently connected as demonstrated below:

CREATE OR REPLACE Trigger WatchDog after logon on database

declare

num_sid v$session.sid%type;

num_serial# v$session.serial#%type;

var_program v$session.program%type;

begin

select sid, serial#, program

into num_sid, num_serial#, var_program

from v$session

where audsid = sys_context('USERENV', 'SESSIONID');

If lower(var_program) = 'ciccio.exe' then

Raise_application_error(-20999, 'Cannot logon using this application');

End if;

end;

This must be compiled as user SYS.

In this fashion, a client user running ciccio.exe, will receive an error upon connecting.

You may want to build a list of allowed programs instead, so you won't have to know in advance the name of the forbidden application, the example given is just to test the functionality of the trigger.

Bye,
Flavio Received on Fri May 09 2003 - 04:03:09 CDT

Original text of this message

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