Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Tracing sessions - new sql_trace columns in v$session for 10.2
I figured it out.
At first, I had the same disappointing results with the new v$session.sql_trace column in 10.2.0.2 on AIX - as you can see below:
SQL> execute
dbms_monitor.session_trace_enable(726,147,true,true);
PL/SQL procedure successfully completed.
SQL> select distinct sql_trace, sql_trace_waits, sql_trace_binds from v$session;
SQL_TRAC SQL_T SQL_T -------- ----- ----- DISABLED FALSE FALSE
However, after I generated some activity in the traced session, then the ENABLED trace information appeared in v$session:
<In traced session, sid=726>
SQL> select count(*) from t;
COUNT(*)
9
<Back in sys session>
SQL> select sid, serial#, sql_trace, sql_trace_waits, sql_trace_binds from v$session where sql_trace = 'ENABLED';
SID SERIAL# SQL_TRAC SQL_T SQL_T ---------- ---------- -------- ----- -----
726 147 ENABLED TRUE TRUE
Also, according to this article
(http://www.oracle.com/technology/pub/articles/10gdba/nanda_10gr2dba_par
t3.html#check), the v$session.sql_trace columns are only populated by
the dbms_monitor.session_trace_enable procedure - not by sql_trace=true,
or event 10046.
Regards,
Brandon
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mladen Gogala
> Sent: Monday, October 30, 2006 7:08 PM
> On 10/30/2006 03:10:09 AM, Polarski, Bernard wrote:
> > I did find thing only in 10gR2, it is not in 10.1.0.4.
> >
> >
>
> Not only is it present only in 10.2.0, it doesn't work. I
> tried it on Linux, with different methods, from DBMS_MONITOR,
> set events to set sql_trace, I was always getting the value
> of 'DISABLED' in SQL_TRACE.
>
Privileged/Confidential Information may be contained in this message or attachments hereto. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of this company shall be understood as neither given nor endorsed by it.
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Nov 15 2006 - 14:26:26 CST
![]() |
![]() |