Toad World® Forums

Trace Session (Session Browser)

I think I know the answer to this, but it’s not documented anywhere so I wanted to be sure. It appears that if you enable a trace on a shared server session, the resulting TKProf Wizard always fails. It seems that it doesn’t know to look for the sxxx file instead of the normal ora files generated by a dedicated server. Of course, it would be nice for this to be fixed!

What versions of Toad and Oracle are you using? I just tried this in the beta with Oracle 12 and it worked fine for me.

Toad 12.6 on Oracle Database 11g Enterprise Edition Release 11.1.0.7.0

Hm, it works for me in Oracle 11 also (with both shared and dedicated server connections). In Oracle 11 and newer, we get the filename for the trace file from V$PROCESS (you can find this column in the Session Browser, process tab). Does it not show the correct value there?

Prior to 11g, this column didn’t exist and I can reproduce your problem with 10gR2 and older. I’ll fix that, but I’m interested to know what’s in V$PROCESS.TRACEFILE for you.

Evening All,
On 03/04/15 16:22, John Dorlon wrote:

Hm, it works for me in Oracle 11 also (with both shared and dedicated
server connections). In Oracle 11 and newer, we get the filename for
the trace file from V$PROCESS (you can find this column in the Session
Browser, process tab). Does it not show the correct value there?

Prior to 11g, this column didn’t exist and I can reproduce your problem
with 10gR2 and older. I’ll fix that, but I’m interested to know what’s
in V$PROCESS.TRACEFILE for you.
If it makes any difference, I had a wee problem with some work I was doing recently which required the Trace Session retrieving the trace file.
It says on the popup that appears that you need SELECT on V$SESSION and V$PROCESS however, you also need SELECT on V$INSTANCE and READ privileges on an Oracle Directory Object named TOAD_TRACEFILE_DIR which must exist in the database and point at the location Oracle writes it’s *.trc and *.trm trace files.
As I said, I doubt it will help but you never know.
Happy Easter.
– Cheers,
Norm. [TeamT]

Thanks Norm. I’ll check on that too. Another thing that’s worth mentioning, is that the shared server trace files can contain multiple sessions worth of trace data, so they might be tricky to use, depending on what you are after. As I’m testing working on this in 10gR2, I notice that I’m using the same shared server process with each new connection I make, and even though I’ve disconnected and reconnected, all of my traces are getting appended into the same trace file.

Hi John,

As far as I remember the usual state of affairs with shared servers is having your trace Giles all over the place. There’s a utility that arrived with 10, trcsess I think, that helped gather y hem up into one.

If you are getting the same file each time, your luck is in, quick, go buy a lottery ticket! :slight_smile:

Cheers,

Norm [ TeamT ]

On 3 April 2015 17:43:41 BST, John Dorlon bounce-jdorlon@toadworld.com wrote:

RE: Trace Session (Session Browser)

Reply by John Dorlon
Thanks Norm. I’ll check on that too. Another thing that’s worth mentioning, is that the shared server trace files can contain multiple sessions worth of trace data, so they might be tricky to use, depending on what you are after. As I’m testing working on this in 10gR2, I notice that I’m using the same shared server process with each new connection I make, and even though I’ve disconnected and reconnected, all of my traces are getting appended into the same trace file.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - General notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

I forgot John, you need execute privs on UTL_FILE too.

Cheers,

Norm [ TeamT ]

Sent from my Android device with K-9 Mail. Please excuse my brevity.

Hey Norm,

If you are getting the same file each time, your luck is in, quick, go buy a lottery ticket! :slight_smile:

Well, I was the only one connected to the database at the time, maybe that had something to do with it…

-John

Another weird thing that happened with Toad’s transferring of the file via UTL_FILE - I had stopped tracing, but the trace continued, so as I tried to transfer the file, the file kept growing due to all those UTL_FILE commands, so it would never finish. It kinda made me question if I should even be going down this road in the first place.