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 -> Automize SQL TRACE OPERATION

Automize SQL TRACE OPERATION

From: BSena <bill_sena_at_hotmail.com>
Date: 8 Mar 2004 20:40:39 -0800
Message-ID: <2ceca914.0403082040.40fefdff@posting.google.com>


Hi,

Should I automize the process of SQL Tracing for a particular session of our choice?

Let&#8217;s say when there are several sessions, and we want to select the particular session for SQL TRACING, then the SQL tracing for that session enable via running a routine.

I used AFTER LOGON trigger for enabling SQL trace, but using this approach enable SQL TRACING all the sessions.

My Logon Trigger for enabling SQL Tracing:

create or replace trigger LOGON_SQL_TRACE after logon on database
begin
execute immediate
'alter session set sql_trace=true';
end;
/

I want to use a perfect routine that first get the sid, serial# or username etc. from V$session, V$process or else, and then enable the SQL TRACING for the selected session.

Like SYS.DBMS.SYSTEM.SET_SQL_TRACE_IN_SESSION package is available for doing that or may be some others as well. But how should we use these packages or other SQL tracing commands in a routine, which we can use for, enable SQL Tracing implicitly. Any ideas will be great.

Bill Received on Mon Mar 08 2004 - 22:40:39 CST

Original text of this message

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