Scheduled Job Failing to Copy a File n Remote Directory

  • Hi All,

    I have created a Stored Procedure and in that, I am creating a File on my local Machine, and then I am copying it to a Remote Directory. I have created a Job for this, and Scheduled it to execute at a particular time daily. My problem is, the procedure is executing fine - it is creating the file on my local machine. But it is not able to copy it to the remote folder. It gives the following error - 'The System Cannot Find The Drive Specified'. I have the Drive mapped to the right drive letter, and I am able to copy the file manually to the same Remote Folder.

    Any Help is Appreciated.

    Thanks in Advance,

    Amit.

  • Hi Amit,

    When you run the job yourself, it runs under your login, which has permissions to write to your drive.  When you schedule the job, it's running under the SQL Server Agent login, so make sure that login also has access to the drive.

    Cath

  • Also, you'd be better not using a drive. Use UNC mapping for the copy.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply