﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server Newbies  / Maintenance Cleanup Task can't delete trc files / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 17 Jun 2013 22:35:59 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Maintenance Cleanup Task can't delete trc files</title><link>http://www.sqlservercentral.com/Forums/Topic1175224-1291-1.aspx</link><description>Hello Gail,  I know this post is old but what you mentioned relates directly to our issue.  This isn't a major issue, just annoying.  My customer has SQL 2005 SP4 Enterprise.  As you said, the default .trc files total as 5 and rollover as designed.  Back in August, for an unknown reason, two of the log files log_5194.trc and log_5195.trc stuck around and fell out of the 5 file cycle.  So right now, we have the 5 default .trc files working as designed, but we have two extra .trc files from 22-Aug just sitting there.  It won't let me delete because is says "file in use".  I looked at sys.trace and it shows the only running trace as the current default trace file.I'm guessing SQL service will have to be stopped in order to delete, but curious if you have any ideas.  Thanks.</description><pubDate>Thu, 13 Sep 2012 07:02:28 GMT</pubDate><dc:creator>louislamour2673</dc:creator></item><item><title>RE: Maintenance Cleanup Task can't delete trc files</title><link>http://www.sqlservercentral.com/Forums/Topic1175224-1291-1.aspx</link><description>Both answers are correct, Gails is the most important in that there are only those files and they reused.  If you are not at SP2 or higher you would see an issue with deleting backups files.  You should at the very least be at SP3 even though SP4 is the last available update for 2005</description><pubDate>Thu, 15 Sep 2011 12:48:30 GMT</pubDate><dc:creator>Meet George Jetson</dc:creator></item><item><title>RE: Maintenance Cleanup Task can't delete trc files</title><link>http://www.sqlservercentral.com/Forums/Topic1175224-1291-1.aspx</link><description>There is a bug with the code that implmenets the maintenance plan task to delete files.  You need to install the update to correct the bug.</description><pubDate>Wed, 14 Sep 2011 21:47:55 GMT</pubDate><dc:creator>happycat59</dc:creator></item><item><title>RE: Maintenance Cleanup Task can't delete trc files</title><link>http://www.sqlservercentral.com/Forums/Topic1175224-1291-1.aspx</link><description>If you're talking about the 5 files of the default trace, there will only ever be 5. When SQL creates a new one, it deletes the oldest, so there's no need for any manual cleanup task.</description><pubDate>Wed, 14 Sep 2011 13:51:17 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Maintenance Cleanup Task can't delete trc files</title><link>http://www.sqlservercentral.com/Forums/Topic1175224-1291-1.aspx</link><description>Hi, I've created a maintenance plan with a Maintenance Cleanup Task as a subplan. In this Maintenance Cleanup Task :I setup to delete "Maintenance Plan trace reports"Folder:"C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG"File extension: trcChecked: "Delete files based on the age of the file at task run time"Set Delete files older than "2 Week(s)"Looking at different articles some one suggested to upgrade to sp4 but if the functionlaity is built in why do you have to upgrade or apply a apatch ??????All subplans are running successfuly, but the .trc  files are NOT deleted in the ..\LOG folder.Can someone tell me why and how to setup to delete the .trc files?Thanks</description><pubDate>Wed, 14 Sep 2011 13:01:45 GMT</pubDate><dc:creator>allamiro</dc:creator></item></channel></rss>