Hi Tom
Raise an error :
Here is an example
CREATE OR REPLACE TRIGGER SAMLOG
after LOGON ON DATABASE
DECLARE
 v_error   EXCEPTION;
 PRAGMA EXCEPTION_INIT( v_error, -1031 );
 T_SESSIONID VARCHAR2(30);
 T_USERNAME  VARCHAR2(20);
 T_OSUSER    VARCHAR2(20);
 T_PROGRAM   VARCHAR2(48);
 BEGIN
 SELECT user into t_username from dual;
 If t_username!='SYS' 
  THEN
 SELECT USERENV('SESSIONID')
        INTO T_SESSIONID FROM DUAL;
 SELECT PROGRAM,USERNAME,OSUSER
        INTO T_PROGRAM,T_USERNAME,T_OSUSER FROM V$SESSION WHERE
AUDSID=T_SESSIONID;
 IF T_PROGRAM IN ('MSACCESS.EXE','sqlnav3.exe','SQLNAV3.EXE','SQLTALK.EXE')
THEN
    INSERT INTO
maximo.DBATRACK(LOGINPROG,LOGINUSERname,loginosuser,LOGINDATE)
    VALUES (T_PROGRAM ,T_USERNAME,T_OSUSER,sysdate);
    COMMIT;
 END IF;
 IF T_PROGRAM in ('MSACCESS.EXE','sqlnav3.exe','SQLNAV3.EXE','SQLTALK.EXE')

    AND T_USERNAME NOT IN
('ASANDERS','MAHA','AMMAR','ADNAN','JAFAR','FAYEZ','VELJKO','HSSAMERI',   
  'MAXIMO','DJSLITER' )
 THEN
    RAISE v_error;
 END IF;
END IF;

This can be broken,and I can reveal later, but it will get rid off most of
your problems



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to