declare @dt datetime select @dt = cast(N'2008-02-05T13:27:54' as datetime) exec msdb.dbo.sp_delete_backuphistory @dt
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.
I know what the issue is now. There is actually a History Cleanup and Maintenance Clean up. I was doing the History cleanup, but that one doesn't delete the .bak files the Maintenance Clean up does though.