Error message that is seen in the distributor-to-subscriber history:
Attempted command: if @ @trancount > 0 rollback TRAN (transaction sequence number: 0x00014f30000020d9010700000000, command id:667)
Error message: The Distribution Agent failed to create temporary files in ' C:\Program Files\Microsoft SQL server\100\com ' directory . System returned ErrorCode 5. (Source: MSSQL_REPL, Error number: mssql_repl21100) Get help: http://help/MSSQL_REPL21100
Messages read in the error log:
error:14151, Severity:18, State:1.
Replication-replication distribution Subsystem:agent XXXX failed. The Distribution Agent failed to create temporary files in ' C:\Program Files\Microsoft SQL server\100\com ' directory. System returned ErrorCode 5.
Solution:
Grants Write permission to the C:\Program Files\Microsoft SQL Server\100\com folder that runs the SQL Server Agent service account.
Reference http://support.microsoft.com/kb/956032
A mistake encountered by a thing copy