Wednesday, March 21, 2012

purge .txt log files

SS2005, SP2
Anyone has a quick way of deleting log files for db maint. plans? By default
they are text files created under the LOG directory. Tired of googling for
it 'cause there arn't many posts...I believe this is in one of the maint tasks.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...seagreen">
> SS2005, SP2
> Anyone has a quick way of deleting log files for db maint. plans? By defau
lt
> they are text files created under the LOG directory. Tired of googling for
> it 'cause there arn't many posts...
>|||Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the
job. They simply cleanup the actual backup files, or the backup/restore
history tables in msdb. I want something to clean up the log files otherwise
they keep accumulating...
I can write a homegrown process to handle this. But I'd be amazed that
there isn't anything out of the SSIS box that can do this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...[vbcol=seagreen]
>I believe this is in one of the maint tasks.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...|||> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does t
he job.
I see, I though this was part of the "standard process". But Maint Cleanup T
ask isn't limited to
deletion of backup files. Did you try to add one more such task for deletion
of the .txt files?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...[vbco
l=seagreen]
> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does t
he job. They simply
> cleanup the actual backup files, or the backup/restore history tables in m
sdb. I want something to
> clean up the log files otherwise they keep accumulating...
> I can write a homegrown process to handle this. But I'd be amazed that th
ere isn't anything out
> of the SSIS box that can do this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>[/vbcol]|||Yes, I tried but it didn't work. I also tried to fool the manit plan to
purge regular text files that were renamed just like the backup files. It's
smart enough to know what files are real backup files and what are not, and
only delete REAL backup files. interesting! Fortunately those txt log files
are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a big
deal.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
> I see, I though this was part of the "standard process". But Maint Cleanup
> Task isn't limited to deletion of backup files. Did you try to add one
> more such task for deletion of the .txt files?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
>|||I'm a bit confused here. When I open the "Maintenance Cleanup Dialog", there
's an option to delete
"Maintenance Plan text reports". Perhaps this was introduced with sp2? Or di
d you try it and it
didn't work (of so, you should file a bug on http://connect.microsoft.com/sql[/u...ver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...seagreen">
> Yes, I tried but it didn't work. I also tried to fool the manit plan to pu
rge regular text files
> that were renamed just like the backup files. It's smart enough to know wh
at files are real backup
> files and what are not, and only delete REAL backup files. interesting! Fo
rtunately those txt log
> files are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a
big deal.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
>|||Tibor, that's a good catch. I overlooked it.
However, i still was unable to get it to work. I have tried it on one
default instance and two clustered instances, with a separate cleanup task
and proper length of days /weeks to purge - log files are not deleted.
A similar bug was logged in the Feedback list earlier this month and MS
marked it as resolved. The ticket wished to build both purging backups and
log files into one interface. So from the wording, it seems someone has
successfully gotten it worked.
I'll try more instances in case it's just a permission issue. Since I've
already had my purge routine in place, it won't be an issue any more even if
it doesn't work. but I'll try to send them a comment on this.
Thanks for your time on helping this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
> I'm a bit confused here. When I open the "Maintenance Cleanup Dialog",
> there's an option to delete "Maintenance Plan text reports". Perhaps this
> was introduced with sp2? Or did you try it and it didn't work (of so, you
> should file a bug on http://connect.microsoft.com/sql)?.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...
>|||> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even
if
> it doesn't work. but I'll try to send them a comment on this.
This is what I also tend to do. When Maint plans don't do what you want, do
it yourself... :-)
Let us know if you find out anything more about this... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eOtl7aDuHHA.1204@.TK2MSFTNGP03.phx.gbl...seagreen">
> Tibor, that's a good catch. I overlooked it.
> However, i still was unable to get it to work. I have tried it on one
> default instance and two clustered instances, with a separate cleanup task
> and proper length of days /weeks to purge - log files are not deleted.
> A similar bug was logged in the Feedback list earlier this month and MS
> marked it as resolved. The ticket wished to build both purging backups and
> log files into one interface. So from the wording, it seems someone has
> successfully gotten it worked.
> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even
if
> it doesn't work. but I'll try to send them a comment on this.
> Thanks for your time on helping this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
>sql

No comments:

Post a Comment