0

While doing replication I received the following error message in Replication monitorAgents

Access to the path 'D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\repldata\unc\_DEMO_SAMPLE\20160602154451\' is denied.

If the folder is manually created, then the error is solved for some time. However, after some time the error occurs again because the timestamp (20160602154451) has changed. How can I create a folder dynamically? Or can anyone suggest another solution to this problem?

Siyual
  • 16,415
  • 8
  • 44
  • 58
  • Have you seen this post? I think it could help. https://sqldbpool.com/2011/07/06/t-sql-script-to-checkcreate-directory/ – S3S Jun 02 '16 at 18:25
  • This does not solve the problem. The problem seems to be with the DB installation or replication set up. The creation of the folder dynamically should be taken care by MS SQL server and should not be done manually. Can you please try installing the relevant SPs? – Arun Thundyill Saseendran Jun 03 '16 at 06:42

1 Answers1

0

When installing sql server I always make the UNC folder a shared folder. You either make it RW available to everyone, not big deal for security. Or identify the network login on which the replication agent is using and give it modify access to that folder. This login was set during the sql server install.

Felix S.
  • 91
  • 6