Toad World® Forums

Bug Report: Trace File Browser fails with trace lines > 4k


Symptom: After running certain queries, Trace File Browser only reads the tracefile up to a particular point and then stops reading the tracefile. It then only parses the trace data up to the point of failure, which omits:

  1. All the trace information pertaining to the query that was run
  2. Any trace data of subsequent queries within that same session.

This is a nasty “quiet” bug: with no error message displayed, user is left wondering, “Where’s my SQL? Did I trace the right session? What’s going on here? Am I even in Kansas any longer???” :slight_smile:

One might wonder, who on earth would write a single SQL query in one line > 4k characters. Answer: Oracle, when using dynamic_sampling, will generate the dynamic-sampling queries that show up in trace files as VERY long (14,500 characters in my case) single-line entries. It was one of these that caused me problems.

Far easier than simulating the dynamic_sampling behavior, just run this query and try to view trace results with the trace-file-browser:
select /* xxxxxxxx…(repeat 4k times)…xxxxx */ * from dual;



what is the meaning of query

select * from dual?

It doesn’t produce any output?


Thanks, and sorry I didn’t notice this bug report when you first made it Kevin. We declared a max line length of 4000 characters when using UTL_FILE to pull the file from the database to your client pc. I guess I thought that would be long enough!

As a workaround, copy or FTP the trace file from the database server to your PC where Toad is running, and then it should work fine with the Trace File Browser.



OK, long lines (up to 32k) shouldn’t be a problem starting with Toad 12.1. I don’t think I’ll be able to fetch anything longer than 32k.