Home » Infrastructure » Windows » Scheduled Removing of Trm and Trn files from Dump Area (Oracle 11g (11.1.0.6) and windows 2003)
Scheduled Removing of Trm and Trn files from Dump Area [message #523586] Mon, 19 September 2011 07:27 Go to next message
pradies
Messages: 250
Registered: May 2008
Senior Member
Hi,

As I was observing the space issus on my db server. I found that there is lots of Trm and Trc file which is being created very much freequently. Due to this its consuming lots of space even the size of each files is not more than 1Mb.

For cleaning I am deleting all the trm and trc files mannully using DEL command Os level.

I also googled for this but didn't get more help.

So is there any solution for this. Can some one tell me how can i schedule the purging of trm and trc files.


Thanks

Pradeep S
Re: Scheduled Removing of Trm and Trn files from Dump Area [message #523603 is a reply to message #523586] Mon, 19 September 2011 09:02 Go to previous messageGo to next message
BlackSwan
Messages: 26763
Registered: January 2009
Location: SoCal
Senior Member
use OS AT command
Re: Scheduled Removing of Trm and Trn files from Dump Area [message #523695 is a reply to message #523603] Mon, 19 September 2011 23:48 Go to previous messageGo to next message
pradies
Messages: 250
Registered: May 2008
Senior Member
Hi Swan,

Thanks for your response. Can you tell me more in this. I searched for AT commands. like my folder location is d:\app\administrator\diag\rdbms\orcl\orcl\trace and all the files *.trm and *.trc is there.


thanks

Pradeep
Re: Scheduled Removing of Trm and Trn files from Dump Area [message #523705 is a reply to message #523695] Tue, 20 September 2011 01:09 Go to previous message
Littlefoot
Messages: 21670
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is the AT command:
M:\>at /?
The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername     Specifies a remote computer. Commands are scheduled on the
                   local computer if this parameter is omitted.
...


However, you'd probably rather use your Windows' Task Scheduler (Accessories - System Tools). Write a simple batch program that will delete files you don't need (you'd use the DEL command):
M:\>del /?
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

  names         Specifies a list of one or more files ...
It is a simple command, but - if you never used it - test it on unimportant files because you probably don't wont to delete the other files too. Batch file could look like this:
del *.trc
del *.trm
There are many examples available online, just search for them.

Schedule that batch file to run daily (or as frequently as you wish).
Previous Topic: oradim service executable path wrong
Next Topic: calling stored procedure with input and output parameters from batch file
Goto Forum:
  


Current Time: Fri May 07 05:09:16 CDT 2021