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: AFTER LOGON System Trigger

Re: AFTER LOGON System Trigger

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Mon, 12 Jul 2004 23:52:03 -0400
Message-ID: <20040713035203.GC1682@medo.noip.com>

On 07/12/2004 11:34:28 PM, Mladen Gogala wrote:
> > CREATE OR REPLACE TRIGGER SESS_JOB_QUEUE AFTER LOGON
> > ON DATABASE
> >
> > BEGIN
> >
> > IF sys.login_user = 'DISCO_SCH' THEN
> > do something;
> > end if;
> >
> > END;
Of course, checking the login user the way you do also makes sense if and only if you are checking for more then one user. Here is the proper syntax if you are checking for a single user only:  

  1 CREATE OR REPLACE TRIGGER TEST_USR AFTER LOGON

  2     ON SCOTT.SCHEMA
  3     BEGIN
  4     insert into logon_something
  5     values(user||'''s mama wears army boots!');
  6* END;
SQL> /   Trigger created.  
-- 
Mladen Gogala
Oracle DBA
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon Jul 12 2004 - 22:48:42 CDT

Original text of this message

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