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: Trigger not firing!!!!!!!!!!(URGENT)

Re: Trigger not firing!!!!!!!!!!(URGENT)

From: Onkar N Tiwary <onkarnath.tiwary_at_gmail.com>
Date: Thu, 9 Jun 2005 17:21:00 +0530
Message-ID: <a144e52105060904513a16b6d0@mail.gmail.com>


Raj,
 The code for the trigger is :
CREATE OR REPLACE TRIGGER INFO
AFTER LOGON
ON DATABASE
begin
insert into info
values(ora_client_ip_address,to_char(sysdate,'dd-mm-yyyy:HH:MI:SS'),ora_login_user); end;
 And I test it by logging into the DB with another user also say a user called LOG but no record in the table. Moreover I tried the following sql on the prompt also:
 SELECT ORA_CLIENT_IP_ADDRESS FROM DUAL; -- no output  But when I issued :
 SELECT ORA_LOGIN_USER FROM DUAL; -- gives me the current username logged in the DB
 Any idea?????

 On 6/9/05, rjamya <rjamya_at_gmail.com> wrote:
>
> show us the real code and don't log in as SYS to test.
>
> Raj
>
> On 6/9/05, Onkar N Tiwary <onkarnath.tiwary_at_gmail.com> wrote:
> >
> > Sorry David,
> > Its a typo error...its not LOGOFF its LOGON... I checked it once again
> > also.
> > On 6/9/05, David Sharples <davidsharples_at_gmail.com> wrote:
> > >
> > > You say its a logon trigger, but it it written as a LOGOFF - try
> > > logging off first
> > >
> > > On 6/9/05, Onkar N Tiwary <onkarnath.tiwary_at_gmail.com> wrote:
> > > > hi all,
> > > > I have created one trigger on LOGON event which is storing the ip of
> > the
> > > > machine making the connection,current date n time and oracle
> > username in
> > > a
> > > > table with the following structure:
> > > > 16:15:31 SQL log_at_TEST35> > CREATE OR REPLACE TRIGGER INFO
> > > > BEFORE LOGOFF
> > > > ON DATABASE
> > > > begin
> > > > insert into info
> > > >
> > >
> > values(ora_client_ip_address,to_char(sysdate,'dd-mm-yyyy:HH:MI:SS'),ora_login_user);
> >
> > >
> >
> >
> >
> > --
> > Thanks & Regards,
> > T. Onkar Nath
> > Ph : +91-9826728111(Cell)
> > to_onkar_at_yahoo.com
> > onkarnath.tiwary_at_gmail.com
> >
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
>
>
>
> --
> ------------------------------
> select standard_disclaimer from company_requirements where category =
> 'MANDATORY';
>

-- 
Thanks & Regards,
T. Onkar Nath
Ph : +91-9826728111(Cell)
to_onkar_at_yahoo.com
onkarnath.tiwary_at_gmail.com

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 09 2005 - 07:56:01 CDT

Original text of this message

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