Q) I am getting an error when running my snapshot saying "Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\ReplData\unc\MyServerName_PublicationDatabase_PublicationName\20101213082819\' is denied."
A) You are likely running Windows 7 or Windows 2008 server. These OSs have blocked access to the repldata directory - they restrict rights to these directories. To fix it, either change your snapshot location to a directory other than within the program files directory. Or give the account that your snapshot agent runs under read, write, and list files and folders permissions.
To change the snapshot folder location do the following:
To change the snapshot folder location do the following:
- Connect to your publisher using SQL Server Management Studio
- Expand your Replication folder
- Expand your Location Publication Folder
- Locate your publication and right click on it and select properties
- In the snapshot tab, notice a check box labeled Location of Snapshot Files. Uncheck Put files in the default folder, and select Put Files in the following folder. Choose a folder which is not a subdirectory of the Windows, Program Files, or Progam Files (x86) directories.
- Ensure that this folder has the following rights granted to the snapshot job account.