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.