Hello,
I have a job where in one of the steps I'm coping a
database backup file from one server to the other using
an operating system command xcopy. The command I'm using
is below, but the job keeps failing on this step. The
error I get is "The job failed. The Job was invoked by
User TST-SQL\VDURAN. The last step to run was step 3
(copyfile).".
The command works fine if I execute from the actual
command prompt of the source server. My destination
server directory is shared and I have set my permssions
to full control for everyone. Please help.
xcopy d:\backups\TestBackup\OrdersDB.bak
\\duran\DBBackups\
TIA,
VicWhat is the exact error for step 3 ? Is this using a CmdExec job step ?
If you look at the step history you should see the exit code for the step
and the error.
If the file exists you will want to use the /Y switch for xcopy to allow
overwring of the file although this would generally hang the step if this
was the issue. How about just using copy /Y does this work ?
I take it that the SQLService account is running under a domain account ?
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Vic" <vduran@.specpro-inc.com> wrote in message
news:009c01c3d535$d23fb7c0$a101280a@.phx.gbl...
> Hello,
> I have a job where in one of the steps I'm coping a
> database backup file from one server to the other using
> an operating system command xcopy. The command I'm using
> is below, but the job keeps failing on this step. The
> error I get is "The job failed. The Job was invoked by
> User TST-SQL\VDURAN. The last step to run was step 3
> (copyfile).".
> The command works fine if I execute from the actual
> command prompt of the source server. My destination
> server directory is shared and I have set my permssions
> to full control for everyone. Please help.
> xcopy d:\backups\TestBackup\OrdersDB.bak
> \\duran\DBBackups\
>
> TIA,
> Vic|||Is it possible that you need to supply the actual path of
the xcopy command? Also, you may want to create the job
step to execute a command (.cmd) file rather than the
command itself. This would allow you to do some type of
eror code processing. It's been a long time since I've
done that in DOS batch files, but it should be doable.
Most likely you either have a path problem or a
permissions problem though.
I know this is a rather vague response, but hopefully it
will lead to something.
Matthew Bando
BandoM@.CSCTGI(remove).com
>--Original Message--
>Hello,
> I have a job where in one of the steps I'm coping a
>database backup file from one server to the other using
>an operating system command xcopy. The command I'm
using
>is below, but the job keeps failing on this step. The
>error I get is "The job failed. The Job was invoked by
>User TST-SQL\VDURAN. The last step to run was step 3
>(copyfile).".
> The command works fine if I execute from the actual
>command prompt of the source server. My destination
>server directory is shared and I have set my permssions
>to full control for everyone. Please help.
>xcopy d:\backups\TestBackup\OrdersDB.bak
>\\duran\DBBackups\
>
>TIA,
>Vic
>.
>|||Hello there.
I got kind of a similar issue with few jobs. To pin point
to the culprit, I set the DTS package to log the whole
process.
I found out which steps in my DTS package were failing and
not the generic SQL message from the job history, which
never says exactly what happened.
I have quite a few stpes in each job that uses windows
tasks. Two of those needs some time to be completed.
The first one, unzips a daily file to be run by other
steps to copy or update some tables.
The second step, copies the unzipped files to a different
server.
I applied two solutions for those command steps.
1. For the unzip command, I added an activeX step, which
loops while the file is being used by the DTS. Problem
solved here.
2. For the copy unzipped files to a different server (I
had to copy instead of moving files due to some internal
applications), I did take the step off the DTS and
schedule it to run a few minutes after the main job is
completed. Problem solved! for good.
Set the DTS log first to see exactly where your DTS is
failing, I bet is the move step (same thing happened to
me) I hope this helps. Good luck
>--Original Message--
>Hello,
> I have a job where in one of the steps I'm coping a
>database backup file from one server to the other using
>an operating system command xcopy. The command I'm using
>is below, but the job keeps failing on this step. The
>error I get is "The job failed. The Job was invoked by
>User TST-SQL\VDURAN. The last step to run was step 3
>(copyfile).".
> The command works fine if I execute from the actual
>command prompt of the source server. My destination
>server directory is shared and I have set my permssions
>to full control for everyone. Please help.
>xcopy d:\backups\TestBackup\OrdersDB.bak
>\\duran\DBBackups\
>
>TIA,
>Vic
>.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment