Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to stop access to prod instance ...

RE: How to stop access to prod instance ...

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Tue, 08 Jan 2002 07:47:00 -0800
Message-ID: <F001.003E9824.20020108065029@fatcity.com>

Sam,

Thanks for the example. I tried it and it seems to be doing what I want it to do.

Thanks for getting back to me with the example!

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Tuesday, January 08, 2002 3:05 AM
To: Multiple recipients of list ORACLE-L

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: rabbit_at_emirates.net.ae

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: ListGuru_at_fatcity.com (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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
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: ListGuru_at_fatcity.com (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). Received on Tue Jan 08 2002 - 09:47:00 CST

Original text of this message

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