SQL Server xp_delete_file not deleting files

前端 未结 8 1812
孤城傲影
孤城傲影 2020-12-15 08:47

I\'m trying to write some SQL that will delete files of type \'.7z\' that are older than 7 days.

Here\'s what I\'ve got that\'s not working:

DECLARE         


        
8条回答
  •  情深已故
    2020-12-15 09:42

    I know this is a little old but I wanted to share my frustrations with you all. I was having the same problem as a lot of these posts but nothing seemed to work. I then remembered that we have an encryption layer on the database called NetLib. This means that the backups are encrypted and as such, xp_delete_file cannot read the headers. I now use a batch file in the OS and call it from an agent job. Hope this helps someone.

提交回复
热议问题