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: Powell, Mark D <mark.powell_at_eds.com>
Date: Thu, 9 Jun 2005 16:06:55 -0400
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF41050395B919@usahm236.amer.corp.eds.com>


The initial post was about the fact the event trigger public variables like ORA_CLIENT_IP_ADDRESS were not producing results.

Test on 9.2.0.6
UT1 > select ORA_CLIENT_IP_ADDRESS, sys_context('USERENV','IP_ADDRESS') ip_addr
  2 from sys.dual
  3 /

ORA_CLIENT_IP_ADDRESS




IP_ADDR

xxx.103.x.141

While some of the event variables can be used in a select from dual and always seem to be populated others are populated only after certain events take place so where a sys_context or v$session.column exists I think it may be, at present, a better choice.

IMHO -- Mark D Powell --

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mercadante, Thomas F
(LABOR)
Sent: Thursday, June 09, 2005 3:21 PM
To: Rich.Jesse_at_quadtechworld.com; Oracle-L (E-mail) Subject: RE: Trigger not firing!!!!!!!!!!(URGENT)

Rich,

Ummm. I used sys_context in my example. He was asking for stuff that obviously was in v$sessions.

Oh SNAP!

Tom

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jesse, Rich
Sent: Thursday, June 09, 2005 3:15 PM
To: Oracle-L (E-mail)
Subject: RE: Trigger not firing!!!!!!!!!!(URGENT)

For much of that kinda stuff in 9i, you can try the ORA_ public synonyms (used as a function) like ORA_CLIENT_IP_ADDRESS or the SYS_CONTEXT function like SYS_CONTEXT('USERENV','OS_USER').

I would think these would probably be easier than spinning through v$session and probably more resistant to DB version changes.

Enjoy!
Rich

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mercadante, Thomas F
(LABOR)
Sent: Thursday, June 09, 2005 2:03 PM
To: rweiss_at_mt.gov; Oracle-L (E-mail)
Subject: RE: Trigger not firing!!!!!!!!!!(URGENT)

Rick,

You can always query from v$session to get the other stuff. I use the following in my login trigger and store the results in a login table.

    SELECT UPPER(program) program, username,

           osuser, terminal,
           sys_context('USERENV','IP_ADDRESS') ip_addr
      FROM V$SESSION
      WHERE AUDSID =3D3D3D3D USERENV('SESSIONID');

Tom

--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 09 2005 - 16:12:31 CDT

Original text of this message

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