Sql-server – SQL Server 2012 replication permissions with virtual user and agent credentials

replicationsql serversql-server-2012

For development/testing I set up replication in SQL Server 2012 RC0 (11.0.1750) using the default permissions on the agent, and I'm getting this error:

Message: Access to the path 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\ReplData\unc\WKSTATION$SQL2012_DB7_DB7\20120104171149\' is denied.

I'm having trouble figuring out what MS wants me to do in this case since I want to use the agent credentials. How do I give permissions to that folder if I can't see the virtual user (Nt Service\SQLAgent$SQL2012) in my local machine's user list?

Best Answer

IT kind of seems like the Agent account didn't have access to that filepath. On our network permissions to the Program Files directory are very restricted. When you created the new folder you probably changed the security on the new folder, whether realizing it or not, and that allowed the account for the replication to reach that folder.