Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting TRACEFILE_IDENTIFIER causes trc file to be written immediately?

ArpodMay 28 2014 — edited May 29 2014

We are using Oracle Database 10g Enterprise Edition Release 10.2.0.3.0, running some rather complex things involving in-database java packages. Those packages tend to do their output to System.out, which redirects to the standard trace file for the session. Reading and debugging that output is hard, especially after user logs off, since default trace file name indicates only session SPID.

To remedy this I tried setting TRACEFILE_IDENTIFIER to username + sid in "AFTER LOGON" trigger. That worked fine, and files became much easier to identify; however, there seems to be a strange side effect. If we don't set TRACEFILE_IDENTIFIER, then .trc file is not written until there's some actual output. However, if we set it, .trc file is created immediately on logon, containing nothing but its own full pathname inside.That results in hundreds of near-empty trace files, which are created on every logon of every user, even if they do literally nothing, arguably making things worse than they were before.

Two questions:

1) Is that intended behavior or a bug?

2) Is there any workaround for it?

Any solution to change trace file names to something more informative without setting trace_identifier would also be welcome.

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2014
Added on May 28 2014
11 comments
7,409 views