views:

125

answers:

2

I have job that runs every 15 minutes that uses robocopy to copy a backup of the tranaction logs to a different server. This job is failing USER has full access rights to both home folder and the destination folder.

JOB SQL:

robocopy "e:\Backup\SQL02$PROD" "\SERVER\DRIVE$\prod\sql\backup\" /MIR /E /Z /NS /NFL /NDL /NJH /NP /R:10 /W:30 if %errorlevel% LSS 8 set errorlevel=0

Error Log:

Date 22/06/2010 09:05:00 Log Job History (Sync Production backup to app040)

Step ID 1 Server NDAHHSQL02\PRODUCTION Job Name Sync Production backup to app040 Step Name robocopy production Duration 00:00:00 Sql Severity 0 Sql Message ID 0 Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message Executed as user: DOMAIN\USER. 2010/06/22 09:05:00

ERROR 5 (0x00000005) Getting File System Type of Destination \\SERVER\DRIVE$\prod\sql\backup\ Access is denied.

2010/06/22 09:05:00 ERROR 5 (0x00000005) Creating Destination Directory \\SERVER\DRIVE$\prod\sql\backup\ Access is denied. Process Exit Code 16. The step failed.

A: 

The user does not have access to write the backup file to \SERVER\DRIVE$\prod\sql\backup\.

  • Should it read \\SERVER?
  • You could use NET USE to first mount the server location as a drive and then write to it.
  • You could test with some small file instead of a backup
Sjoerd
Sorry that was my editing. I have to use robocoy as the Job used to work but now failing.I will try a test.
andy
+1  A: 

I have solved the issue Although the folder had permissions for the account to copy files accross it did not have share permissions set on the root drive.

Link to share permissions tutorial

andy