I have a SQL job, written in VBScript, that generates a text file with data from a database.
The job executes without errors as long as the file is saved to the local disk. But when trying to save it to another server within the same domain it fails, not giving any specific errors of why.
So I let the job save the file to the local disk, and created a second step, Cmd Exec type, to move the file to the other server. This also fails, reporting “Access Denied” for the local file.
The administrator account is set as the Owner of the job and when using Windows Explorer there are no problems copying files between the two servers.
Why am I getting the “Access Denied” error, and how can the task be achieved?