Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Help with my logon trigger
I was trying to create a logon trigger that prevent certain people from
using sqlplus
create or replace trigger connect_restriction after logon on database when (user in ('test')) declare v_username number ; Begin select count(*) into v_username from v$session where username='test' and program = 'SQLPLUSW.EXE'; if v_username > 0 then raise_application_error(-20002,'no sqlplus please'); end if;
the trigger can only be created in sys, if I try to create it in
system, oracle will complain
PLS-00201: identifier 'SYS.V_$SESSION' must be declared, why?
Even though the trigger can be created in sys, it will prevent user test connect to database in any application, not only sqlplus, what is wrong with my trigger?
Thanks for you help.
-- Sent by dbadba62 from hotmail subpart of com This is a spam protected message. Please answer with reference header. Posted via http://www.usenet-replayer.com/cgi/content/newReceived on Fri Feb 15 2002 - 12:05:06 CST