Error 21 on replication across 2 servers on the same domain

  • Hello,

    I have been searching for an answer why I cannot get replication services to work on my 2 machines.

    I have setup snapshots to be pulled from the publisher to the subscriber. Every time I try to synchronize them I get an error:

    The process could not read file 'D:\SQLProgramFiles\MSSQL10.STD08\MSSQL\ReplData\unc\[INSTANCE_NAME]\[DATE]\FILE_5.pre' due to OS error 21. (Source: MSSQL_REPL, Error number: MSSQL_REPL20024)

    Get help: http://help/MSSQL_REPL20024

    The device is not ready.

    (Source: MSSQL_REPL, Error number: MSSQL_REPL21)

    Get help: http://help/MSSQL_REPL21%5B/quote%5D

    I have checked and the subscriber machine has access to the folder on the publisher where the files live. The snapshot agent HAS completed it's job too.

    I can't find much information about this error. Anyone run into this before?

  • I believe that you are seeing this error because you have not specified the share for the snapshot directory correctly. The error is indicating a local path ('D:\SQLProgramFiles\MSSQL10.STD08\MSSQL\ReplData\unc\[INSTANCE_NAME]\[DATE]\FILE_5.pre). You can change this by going into the properties of the publication, selecting “Snapshot” and making sure that “Put files in the following folder:” is checked and the correct share location is in the text box below.

  • Thanks for the reply. Here is the default location of the file I am putting the files in:

    "D:\SQLProgramFiles\MSSQL10.STD08\MSSQL\ReplData"

    The box has been checked and that folder is shared. Still no luck.

    I even tried checking both boxes and using both locations. I then generated a new snapshot (which completed successfully) but still get the same error.

    Thanks.

  • The folder might be shared, but you need to put the path to the shared folder in the form of \\<ServerName>\<Sharename> in the path for the snapshot directory.

  • Ahhhh yes. I should have thought of that.

    Thanks a lot. I got it working.

  • Cool, glad you got it working.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply