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
 General SQL Server Forums
 New to SQL Server Programming
 Maintenance Plan not working...

Author  Topic 

BadSectorGR
Starting Member

6 Posts

Posted - 2007-03-13 : 06:22:25
Hi all,

I have installed SQL Server 2005 on Windows 2003 Server with windows regional settings Greek. I created a maintenance plan (History Cleanup Plan) to delete all the backup files older than one month. This is the T-SQL statement that it is created automatically:

declare @dt datetime select @dt = cast(N'02/13/2007 12:19:03' as datetime) exec msdb.dbo.sp_delete_backuphistory @dt
GO
EXEC msdb.dbo.sp_purge_jobhistory @oldest_date='02/13/2007 12:19:03'
GO
EXECUTE msdb..sp_maintplan_delete_log null,null,'02/13/2007 12:19:03'



When i execute it, i receive a success message but the old files before 13/02/2007 are not deleted from the backup folder. I noticed that the dates of the T-SQL statement are in a mm/dd/yyyy format (USA) so i changed my regional settings to USA but i had the same result.


Any ideas?
Thanx
   

- Advertisement -