Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: AFTER LOGON System Trigger
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;
-- 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
![]() |
![]() |