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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -