February 12, 2008 at 1:37 pm
I set up a maintenance plan that is supposed to run once per week and it is not working, meaning files are not being deleted.
Here is the tsql for the cleanup task:
declare @dt datetime select @dt = cast(N'2008-02-05T13:27:54' as datetime) exec msdb.dbo.sp_delete_backuphistory @dt
GO
EXEC msdb.dbo.sp_purge_jobhistory @oldest_date='2008-02-05T13:27:54'
The History Cleanup task window shows backup and restore history, sql server agent job history and maintenance plan history checked and it says remove historical data older than 1 week. The connection is 'local server connection'.
All BAK files are still there. All log files, such as error and some kind of backup related txt files, as well as the .trc files.
February 12, 2008 at 1:48 pm
What build are you running? There are a number of issues out there surrounding the cleanup task. i.e.
http://support.microsoft.com/kb/933508/en-us
You might want to take a look at -
http://support.microsoft.com/kb/937137
or consider using a script task in SSIS to delete the files.
Tommy
Follow @sqlscribeFebruary 12, 2008 at 1:54 pm
Thanks for the info. i'll take a look. I'm using SQL Server 2005, 9.0.2050
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply