Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The partition containing my Oracle 11g installation began to fill up with trace files and when I went looking for what are these I've found this disturbing post about how to disable the trace file generation.

The two related questions I have are:

  1. Can I simply delete these trace files from my FS w/o consequence ? (I know, if they apeared one should probably look at them.. but won't happen and the database has no production use whatsoever. Going to have to happen another time.)
  2. What should be done to prevent it from appearing again?
share|improve this question

migrated from Jul 26 '12 at 12:48

This question came from our site for professional and enthusiast programmers.

  1. Yes, it's safe to delete them.

  2. If you're running on Linux, set up logrotate to compress & then delete after a set period of time. Examples of Oracle logrotate configuration can be found here.

share|improve this answer

One more comment. Some of trace files stay open as long the database is OPEN. When you delete them, the space is not freed. One of them is LMD trace file on RAC cluster

Then you must use oradebug as described here: or here:

SELECT s.sid, s.serial#, FROM v$session s, v$process p 
WHERE s.paddr=p.addr and s.program like '%LMD%';

SQL> oradebug setorapid 6
Unix process pid: 17652, image: oracle@labdb01 (LMD0)
SQL> oradebug close_trace
Statement processed.
SQL> oradebug flush
Statement processed.

You can also use Linux command lsof to list Oracle processes accessing deleted files. Then you can also truncate deleted file in Linux through /proc filesystem.

lsof -p <OSPID> | grep deleted
cd /proc/<OSPID>/fd/
echo -n > <file descriptor number>

Plus Oracle has it's own tool ADRCI for this purpose. Just beware this was quite buggy in early 11g releases.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.