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: Mercadante, Thomas F (LABOR) <Thomas.Mercadante_at_labor.state.ny.us>
Date: Thu, 9 Jun 2005 08:00:21 -0400
Message-ID: <ABB9D76E187C5146AB5683F5A07336FF16E6A6@EXCNYSM0A1AJ.nysemail.nyenet>


Does the trigger exist and is it enabled? =20 Is the trigger name a reserved word?

I don't see anything wrong with your code. Check the basic things.=20

You can also used the following to debug the trigger firing. It will write stuff to the alert log file.

SQL> exec dbms_system.ksdwrt(1, 'From Kirti'); -- Write to trace file (1=3DTrace, 2=3Dalert, 3=3Dboth).

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Onkar N Tiwary Sent: Thursday, June 09, 2005 7:51 AM
To: rjamya; oracle-l_at_freelists.org
Subject: Re: Trigger not firing!!!!!!!!!!(URGENT)

Raj,
 The code for the trigger is :
CREATE OR REPLACE TRIGGER INFO=20
AFTER LOGON
ON DATABASE=20
begin
insert into info=20
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=20 called LOG but no record in the table. Moreover I tried the following sql on=20
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=20
the DB
 Any idea?????

 On 6/9/05, rjamya <rjamya_at_gmail.com> wrote:=20

>=20

> show us the real code and don't log in as SYS to test.
>=20

> Raj
>=20

> On 6/9/05, Onkar N Tiwary <onkarnath.tiwary_at_gmail.com> wrote:=20
> >=20
> > 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:=20
> > > > hi all,
> > > > I have created one trigger on LOGON event which is storing the
ip of=20
> > the
> > > > machine making the connection,current date n time and oracle=20
> > username in
> > > a
> > > > table with the following structure:=20
> > > > 16:15:31 SQL log_at_TEST35> > CREATE OR REPLACE TRIGGER INFO
> > > > BEFORE LOGOFF
> > > > ON DATABASE
> > > > begin
> > > > insert into info
> > > >
> > >=20
> >

values(ora_client_ip_address,to_char(sysdate,'dd-mm-yyyy:HH:MI:SS'),ora_ login_user);=20
> >=20
> > >
> >=20
> >=20
> >=20
> > --
> > Thanks & Regards,
> > T. Onkar Nath
> > Ph : +91-9826728111(Cell)
> > to_onkar_at_yahoo.com
> > onkarnath.tiwary_at_gmail.com=20
> >=20
> > --
> > http://www.freelists.org/webpage/oracle-l
> >=20
>=20
>=20
>=20

> --=20
> ------------------------------
> select standard_disclaimer from company_requirements where category =
=3D=20
> 'MANDATORY';=20

>=20

--=20
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
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 09 2005 - 08:05:31 CDT

Original text of this message

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