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 -> Logon Trigger for SQL TRACING using (Third party tool)

Logon Trigger for SQL TRACING using (Third party tool)

From: BSena <bill_sena_at_hotmail.com>
Date: 11 Mar 2004 08:09:52 -0800
Message-ID: <2ceca914.0403110809.3531d772@posting.google.com>


Hi Pete,

I like to ask you, should we use the Logon trigger for SQL TRACING, for the third party tool.
How should we manage SQL tracing and then read this trace file using TKPROF for that specific session that is using the third party tool? Any ideas will be great.

Thanks

Bill

Pete Finnigan <plsql_at_petefinnigan.com> wrote in message news:<F7rB2yA5o1TARxZq_at_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
Received on Thu Mar 11 2004 - 10:09:52 CST

Original text of this message

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