I've got a strange error. We have a network share we back up our servers to. About a month ago we got an error because the drive was full. Taking a look at it, none of the backup files had been deleted since we upgraded to 2005.
After manually deleting enough files to get everything running smoothly i took a look at the maintenance plan and before the back up operation begins it is supposed to delete all jobs and backup files older than 4 days.
So I continued to watch as the job ran nightly, but no physical files have been deleted.
So I manually ran on one of the servers,
declare @oldestDate datetime
set @oldestDate = cast(dateadd(dd, -4,CURRENT_TIMESTAMP) as datetime)
exec msdb.dbo.sp_delete_backuphistory @oldest_date=@oldestDate
it deleted the backup history but of course not the physical files, i was debating writing a script that would delete them but figured i'd ask for help before I do, as I would prefer not to have to do this manually.