I ran into this little error yesterday when setting up transaction replication. The project wants to use the replicated database as a report server. Easy enough, after all I have setup up replication in the past. Much to my pain and suffering it had been, 3 or 4 years since and I completely forgot. I wanted to post this to help those that may be suffering as I did setting this all up.
This all revolves around the folder your snapshot resides in. It must be a shared drive. At first, due to the wording of the error I thought it was permissions. After doing permission checks and rechecking to make sure the user I have the replication agent running under I found the problem.
Here is the full error. See if you can figure out the error.
The replication agent failed to create the directory ‘\\PRWSQL60\ReplData\unc\PRWSQL60_PRW_Trainig_PRWTrain\20110831134016\’
You see it? Well neither did I at first. So a little searching, and reading, and some more searching I still could not figure it out. Then I thought, I work in a rather large environment. There are several other servers setup for replication so I went to compare notes. More specifically, I went to see how they had the snapshot folder setup
Once I logged it and found the screen, the answer was right in front of my face! There was one little character I missed and overlooked when I setup the replication.
So, there it is, one little $. Hopefully, if you are having the same error and you are out searching the Internets, you found this post before beating your head on the wall and stressing over something seemingly so simple to setup. The devil is in the details.