Tuesday, March 27, 2012

Copy files from one server to another

hi,
I have a sql box under diff domain. I login as sqladmin mapped a network
drive pointed to the dir that I need to copy the files.
I created a job under command prompt--copy /Y z:\*'* \\server2\myfoleder\
If I run it under ms dos --OK, but running it through sql server job, got
this error:
The system cannot find the drive specified.
Any ideas
ThanksdOk, it is all a matter of security contexts:
WHO are you when you run from the command line?
WHO are you when you run a SQL Server Job:
If job runs as system administrator?
If job runs as a non-system administrator?
Does whatever account is actually running the job actually have rights to
the drive? Apparently not.
Also, FWIW, it is usually better not to use drive letters. Make a share and
use it with the standard non-dos notation.
RLF
"mecn" <mecn2002@.yahoo.com> wrote in message
news:%23THGzfPTGHA.4752@.TK2MSFTNGP10.phx.gbl...
> hi,
> I have a sql box under diff domain. I login as sqladmin mapped a network
> drive pointed to the dir that I need to copy the files.
> I created a job under command prompt--copy /Y z:\*'* \\server2\myfoleder\
> If I run it under ms dos --OK, but running it through sql server job,
> got this error:
> The system cannot find the drive specified.
>
> Any ideas
> Thanksd
>

No comments:

Post a Comment