0

I've got an SQL Server Agent job that runs an SSIS job on server X every night. The SSIS job copies from files on server Y which works just fine just that I need to delete the files every now and then.

I've bit of code that I run in a .bat file that works just fine if I run it on server Y. However, if the SSIS package on server X runs it it doesn't seem to have sufficient rights to execute it.

forfiles /p "\\NetworkPathBlaBla" /s /d -30 /c "cmd /c del @file : date >= 30 days >NUL" 

The SQL Server Agent is using a proxy to run the SSIS. How can I add these credentials to the bat file on server Y?

Thomas S
  • 21
  • 1
  • 1
  • 5

1 Answers1

0

Why not create another SSIS package and write a little script to automate it? Since you do not have any issues running an SSIS package on server X you shouldn't have any problem with this package running to delete/archive files.

However, here's an answer to your original question.

Hope this helps.

Community
  • 1
  • 1
Salman Syed
  • 568
  • 5
  • 9