snippetMinor
The distribution agent failed to create temporary files
Viewed 0 times
thecreatetemporaryagentfilesfaileddistribution
Problem
I'm testing transactional replication between 4 databases, 2 in one machine(Virtual) and 2 in other(also virtual). None of my virtual machines is running an anti-virus.
It's all working as expected, unless I try to insert a blob of considerable size (65mb in this case) if I insert a blob of 3kb works just fine.
I'm having the following error "The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 5".
This problem is documented here.And I already changed the settings of that folder so that is not read-only anymore (right click on the folder->properties and changed the read only-attribute) I'm not sure if this is the right way to grant permissions to do it.
The reason I say I have no anti-virus running is because I also read that was one source for this problem, as the antivirus might block the folder while inspecting it.
Also tried to change Distribution Profile for OLEDB streaming, that also didn't work..
What else can I do to solve this problem?
It's all working as expected, unless I try to insert a blob of considerable size (65mb in this case) if I insert a blob of 3kb works just fine.
I'm having the following error "The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 5".
This problem is documented here.And I already changed the settings of that folder so that is not read-only anymore (right click on the folder->properties and changed the read only-attribute) I'm not sure if this is the right way to grant permissions to do it.
The reason I say I have no anti-virus running is because I also read that was one source for this problem, as the antivirus might block the folder while inspecting it.
Also tried to change Distribution Profile for OLEDB streaming, that also didn't work..
What else can I do to solve this problem?
Solution
The error was caused because the SQL Server service could not write to
Changing the service account to
There is no problem using
C:\Program Files\Microsoft SQL Server\100\COM. Changing the service account to
Local System will solve this issue but also give too much un-needed rights to SQL Server, so you should set the service to run using a user account (either local or domain), put this account into the SQLServerMSSQLUser group, and give this group WRITE permissions on this folder (it is not the same as unticking "read-only" on folder properties).There is no problem using
Local System for development/tests environments, but please consider a more secure option on production servers.Context
StackExchange Database Administrators Q#8379, answer score: 4
Revisions (0)
No revisions yet.