Wednesday, March 7, 2012

Log copy job using robocopy reports errors

Hi,
We are using a sql job to copy log files to a standby server using
robocopy. Often times the sql job status reports a failure however
robocopy itself reports the file copy was successful.
Has anyone run into this before. I would like to find out why these jobs
are reporting failures as they a sending out an aweful lot of notifications.
Thanks
Dilan
I assume you are using Agent and CmdExec jobsteps? Agent uses the return code from the process you
start to determine whether the execution was successful or not. If the process (RoboCopy) returns
anything different from 0, you will get failure of that job step. So you need to determine why
RoboCopy returns such a return code. I presume that RoboCopy returns proper error messages, so just
define an output file for the job step and check there for the error messages from RoboCopy.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Dilan A" <dilan.a@.youtelus.net> wrote in message news:GnXTf.8832$A4.8081@.clgrps12...
> Hi,
> We are using a sql job to copy log files to a standby server using robocopy. Often times the sql
> job status reports a failure however robocopy itself reports the file copy was successful.
> Has anyone run into this before. I would like to find out why these jobs are reporting failures as
> they a sending out an aweful lot of notifications.
> Thanks
> Dilan

No comments:

Post a Comment