Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Logon Trigger for SQL TRACING
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