Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Robocopy false error code of 8 when executed from SQL Expand / Collapse
Author
Message
Posted Saturday, September 29, 2012 9:45 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 9:22 PM
Points: 8, Visits: 541
I am trying to call robocopy from a bat fie to move backups to a network server. This is working fine on several servers, but I have one that will not execute the code with a 0 return code. I know all about the other nonzero codes and am handling everything except and 8 and 16. The files are being copied, the log shows no issues (no fails) but the error code returned is an 8.

Whether I run this command directly from cmdline or through my bat file, the files are copied properly. I have no idea what could be causing a return code of 8 and I definitely don't want to ignore that error code.

I have looked for permission issues, files in use, etc. but haven't found a reason for the bad return code.

Has anyone else seeen this issue or have any advice for me?

Thanks in advance for your help.

Kim
Post #1366227
Posted Monday, October 1, 2012 7:04 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 12:11 AM
Points: 237, Visits: 2,665
You might want to try using powershell to complete the copy and examine the exit codes
Post #1366541
Posted Monday, October 1, 2012 8:43 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 6:01 AM
Points: 961, Visits: 4,996
The first thing I would do, on the problem system, is set Robocopy to keep a log file (/LOG:{Path and filename}) and review this. Looking over a document I have, code 8 indicates "Some files or directories could not be copied." I think the word "some" is going to be the important one.

Maybe there's a "hidden" file or folder that your batch is failing to copy.

Although, I just re-read your post, saw that you are logging your copies and not seeing any errors.

Maybe try pointing both your SQL backup and batch file to a different folder on the server? I've seen some weird permissions issues in the past where everything looks good, but the user would still get errors.

Jason
Post #1366602
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse