Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
lw1990
Yak Posting Veteran
85 Posts |
Posted - 2011-02-04 : 17:53:43
|
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 text reports"Folder:"C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG"File extension: txtChecked: "Delete files based on the age of the file at task run time"Set Delete files older than "4 Week(s)"All subplans are running successfuly, but the .txt files are NOT deleted in the ..\LOG folder.Can someone tell me why and how to setup to delete the .txt files?Thanks. |
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-02-04 : 19:43:05
|
is your file extension .txt or txt in the maintenance task? Poor planning on your part does not constitute an emergency on my part. |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2011-02-04 : 20:17:08
|
You should have txt not .txt as the file extention in the delete task.If that is correct, the fix is probably to upgrade to the latest SQL Server 2005 service pack. I think some early releases of SQL Server 2005 had this problem.What is your SQL Server version? You can find it with this query:select @@version CODO ERGO SUM |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-02-04 : 20:22:04
|
quote: Originally posted by Michael Valentine Jones You should have txt not .txt as the file extension in the delete task.
I know, but figured I would ask..sometimes it is the little things :)... Poor planning on your part does not constitute an emergency on my part. |
|
|
lw1990
Yak Posting Veteran
85 Posts |
Posted - 2011-02-07 : 12:23:10
|
Thank you dataguru1971 and Michael for your response.Yes the File extension was TXT, Without the dot as it was default setting when I setup the subplan. And the version of this SQL Server 2005 is 9.00.3042.00 (Build 3790: Service Pack 2) Maybe SP4 will fix this problem? |
|
|
lw1990
Yak Posting Veteran
85 Posts |
Posted - 2011-02-08 : 10:53:08
|
Yes, it works after I upgrade to SP4!I didn't change anything in the settings of the maintenance plan (and subplan), just installed the SP4 yesterday and this morning, all .txt files over 4 weeks in \LOG folder were deleted by the Maintenance Cleanup Task last night. Thanks again for your helps. |
|
|
|
|
|