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 |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2005-05-23 : 08:47:35
|
| I'm manually deleting old transaction logs shipped to the target server.Is there a way to schedule a command to delete all log files over a specified number of days old? |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-05-23 : 09:28:45
|
| Depends on the files but the bit at the bottom of this will delete old fileshttp://www.mindsdoor.net/SQLAdmin/BackupAllDatabases.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. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-05-23 : 09:40:07
|
| Tara also has a script for this Sam.http://weblogs.sqlteam.com/taradIf you're using the maintenance plans in SQL Server, there is an option to delete old files as well.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-05-26 : 01:39:33
|
| If you're using maintenance plans and have set, for example, Transaction backups on "all user databases", and you have one [or more] Recovery = SIMPLE databases, then the Maint Plan will fail just at the point where it does the deletion of stale transaction logs - so they don't get cleared down.Those pesy Summer Students again ...Kristen |
 |
|
|
|
|
|