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: Oracle Trace

Re: Oracle Trace

From: rama rao <rama76_at_streamyx.com>
Date: Sat, 15 Jul 2006 11:33:14 +0800
Message-ID: <44b862ee$1_2@news.tm.net.my>

"Paul Murphy" <paul_at_nntp.com> wrote in message news:qvktg.56257$W97.34232_at_twister.nyroc.rr.com...
> The database in question is Oracle 8.1.7.4 on Solaris 8.
>
> I've been reading a bit about Oracle Trace and tkprof and I think this is
> the route to go, but I want to see if there is a better way to accomplish
> what I need.
>
> I want to see all the SQL being run by a single user, no matter how that
> SQL was sent to the server (SQL*PLus, a stored procedure call, etc.). I
> want to send the user's queries out to a text file where I can review the
> individual queries in a readable format.
>
> Part of what the user is running is a report that calls a stored procedure
> that has been wrapped/encrypted. Although I can't see the source code
> directly, can I see the actual SQL that is being run against the database?
>
> Am I on the right path with Trace and tkprof or is there a better way?
> Anyone know of a good tutorial on how to do this?
>
>
> Thanks!
> Paul

Hi Paul,

If I want to trace a session, I always do this:

sys.dbms_system.set_ev(sid,serial#,10046,12,''); to start level 12 tracing sys.dbms_system.set_ev(sid,serial#,10046,0,''); to stop the tracing.

Be cautious when you using the above statement. If you replaced the '10046' with any other numbers intentionally or unintentionally might cause your database to malfunction and I was told this method not recommend by Oracle Corp, but it works perfect to me.

rgds.
Rama. Received on Fri Jul 14 2006 - 22:33:14 CDT

Original text of this message

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