电脑技术学习

SQL server 2005自动备份文件删除

dn001
Code
declare @d Nvarchar(64);
set @d = convert(varchar,dateadd(day,-5,getdate()),120);
EXECUTE master.dbo.xp_delete_file 0,N'D:databackGFSM',N'bak',@d;
EXECUTE master.dbo.xp_delete_file 0,N'D:databackGFSM_KEY',N'bak',@d