The step was retried the requested number of times (5) without succeeding.

HP1979 26 Reputation points
2022-02-22T13:58:21.477+00:00

We have one schedule job which is copying the backup to the offsite server through xcopy. This job successfully run for 4-5 days in a week and failed for 1-2 days due to following error.

Executed as user: service_Account. The step was retried the requested number of times (5) without succeeding. The step failed.
Sharing violation.

Any help would be greatly appreciate!

Developer technologies | Transact-SQL
{count} votes

2 answers

Sort by: Most helpful
  1. Tom Phillips 17,771 Reputation points
    2022-02-22T15:54:14.237+00:00

    The error is "Sharing violation". The file appears to be in use by something and cannot be overwitten.

    0 comments No comments

  2. LiHong-MSFT 10,056 Reputation points
    2022-02-24T03:34:33.863+00:00

    Hi @HP1979
    Sharing violation happens when another other program has the file locked up (another program is currently using/accessing the file).
    Or maybe the directory on offsite server( copying to) had files which you could not write over.
    Here is a thread which may help you: False 'Sharing Violation' Xcopy error message

    Best regards,
    LiHong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.