SQL Server Agent Job -


i have powershell script finds latest sql backup mapped drive z secondary hard drive on server named j.

gci "z:\company\full" | select -last 1 | copy-item -destination     "j:\company\backup.bak" 

the script runs fine if run powershell. when add sql server agent job, error:

invalid path "j:\company\backup.bak".

i have made sure sql server agent account has access both file locations, still error.

you need grant account runs sql agent service, permissions access company folder j: drive. based on comments account doesn't have access.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -