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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 how to programmaticaly delete log files?

Author  Topic 

sa
Yak Posting Veteran

77 Posts

Posted - 2004-07-04 : 08:23:07
guys,

anyone here knows how to delete log files using transact sql statements and perhaps associate it in a job so that i can schedule it.

thanks,
sean

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-04 : 10:22:09
Do you want to delete log files as in .ldf files, or do you want to delete the log backup files?? There's a HUUUUUUUUUUUGE difference. Look at Tara's blog at http://weblogs.sqlteam.com/tarad and see if that gives you what you need. If not, explain a tad better what you're trying to achieve.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-07-04 : 12:11:09
Have a look at
http://www.nigelrivett.net/BackupAllDatabases.html

Creates backups and deletes old versions

For the .ldf see
http://www.nigelrivett.net/TransactionLogFileGrows_1.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

sa
Yak Posting Veteran

77 Posts

Posted - 2004-07-05 : 19:19:20
thanks for the links. that really solves the issue.
Go to Top of Page
   

- Advertisement -