You are on page 1of 2

Page 1 of 2

How To Truncate a Background Trace File Without Bouncing the Database [ID
564989.1]

Modified 12-SEP-2008 Type HOWTO Status MODERATED

In this Document
Goal
Solution

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has
not been subject to an independent technical review.

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1


Information in this document applies to any platform.

Goal

This article outlines how to truncate a trace file generated by a background process without restarting the
database and without breaking the logging mechanism.

In the first place you should investigate why this tracing is being written. If it is due to an event setting then this
event needs to be disabled otherwise the tracing will just restart after the file has been truncated.

Solution

1. First identify the process id of the background process in question, in this example I will use LGWR
background process:

SQL> select pid, program from v$process where program like '%LGWR%';

PID PROGRAM
---------- ------------------------------------------------
6 oracle@besun21 (LGWR)

2. Secondly, use oradebug to set the orapid and therby attach to the background process

SQL> oradebug setorapid 6


Unix process pid: 21955, image: oracle@besun21 (LGWR)

3. Rename the trace file at the Operating System level

4. Next close the trace file:

SQL> oradebug close_trace

When the background process needs to write to the trace file again it will create a new logfile.

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=564989.1 13/08/2010
Page 2 of 2

Related

Products

Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition

Back to top

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=564989.1 13/08/2010

You might also like