Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Logon Trigger for SQL TRACING

Re: Logon Trigger for SQL TRACING

From: Pete Finnigan <plsql_at_petefinnigan.com>
Date: Wed, 10 Mar 2004 18:11:05 +0000
Message-ID: <F7rB2yA5o1TARxZq@peterfinnigan.demon.co.uk>


Hi Bill

What you need to do is select the SID and SERIAL# when the logon trigger executes. You can use the following select statement in your trigger and then use the SID and SERIAL# for setting the event:

  1 select s.sid,s.serial#
  2 from v$session s
  3* where sys_context('userenv','SESSIONID')=s.audsid SQL> /        SID SERIAL#
---------- ----------

        10 393

SQL> You could also consider using an on schema trigger instead of the database logon trigger. You could combine the above with a simple table that contains a trace flag for each user that you can set remotely to control whether trace is on or not. Update the value for a user before they login and your trigger would get the username with the sid and serial#,

hth

kind regards

Pete

-- 
Pete Finnigan
email:pete_at_petefinnigan.com
Web site: http://www.petefinnigan.com - Oracle security audit specialists
Book:Oracle security step-by-step Guide - see http://store.sans.org for details.
Received on Wed Mar 10 2004 - 12:11:05 CST

Original text of this message

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