Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The distribution agent failed to create temporary files


The distribution agent failed to create temporary files

Author
Message
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3396 Visits: 1552
Hi

I'm getting this error with a transactional replication setup on SQL 2008R2 Standard (SP1):

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)

I've been to http://support.microsoft.com/kb/956032/en-us amongst other places, and as a result given full control to Everyone on the C:\Program Files\Microsoft SQL Server\100\COM folder (I tried the SQL Agent and Distribution agent accounts first). I've also disabled on-access scanning for the anti-virus software. It's a 2-node cluster so I've done this for both nodes.

Is there anything else I can try in order to troubleshoot further? - only this one has got me completely stumped.

Thanks everyone,

Duncan
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3396 Visits: 1552
Hi all

I managed to fix it. Confusingly, although the error message was on the publisher/distributor, the folder it was referring to was on the subscriber. I gave the distribution agent account write access to the folder and disabled on-access scanning for the folder (as I had done at the publisher/distributor), and lo-and-behold it works!

Live and learn.

Duncan
pcwik
pcwik
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 172
I setup replication using the impersonate settings, so it's using the SQL Agent account which is domain and is an Admin on both boxes. I'm still getting the error.



Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3396 Visits: 1552
pcwik (3/14/2013)
I setup replication using the impersonate settings, so it's using the SQL Agent account which is domain and is an Admin on both boxes. I'm still getting the error.


Sorry to hear that. You can try using Process Monitor to find out a bit more about the accounts and access requests involved - that's what I did which enabled me to work out I was looking at the wrong box.

You will need to check the exact permissions on the folder involved as well. Even an admin account can be denied access to folders.
pcwik
pcwik
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 172
Thanks, I'll give process monitor a try. As far as the permissions I even created a share and granted full control to everyone, same thing. The real stupid part of this is that is does breath every ten minutes or so. If I keep refreshing replication monitor, it shows error, error, error, transactions delivered, error...



Andrew G
Andrew G
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2010 Visits: 2228
Just wanted to add that I also encountered this issue today. Also on SQL2008R2 SP1.

Very weird, the error is reported on the publisher but is referring to a failure of the distribution agent running on the subscriber.
The microsoft support article says this only occurs when "You use the "Distribution Profile for OLEDB streaming" profile for the Distribution Agent", however I am not using this profile. I'm using a custom profile which does not include any of the OLEdb profile settings.

Also the error just started out of nowhere, no changes, replication has been working fine for over a year. I added the permission to the folder to fix it, but would like to know why it started only now.
Duncan Pryde
Duncan Pryde
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3396 Visits: 1552
Andrew G (7/11/2013)
Just wanted to add that I also encountered this issue today. Also on SQL2008R2 SP1.

Very weird, the error is reported on the publisher but is referring to a failure of the distribution agent running on the subscriber.
The microsoft support article says this only occurs when "You use the "Distribution Profile for OLEDB streaming" profile for the Distribution Agent", however I am not using this profile. I'm using a custom profile which does not include any of the OLEdb profile settings.

Also the error just started out of nowhere, no changes, replication has been working fine for over a year. I added the permission to the folder to fix it, but would like to know why it started only now.




Have you checked things like antivirus software? Has anything else changed recently?

Try using process monitor as I mentioned above. That was the only way I could properly troubleshoot it in the end. It will tell you exactly what processes are trying to access what and will give you an idea of the error.

Hope you get it solved.

Duncan
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search