Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

The distribution agent failed to create temporary files Expand / Collapse
Author
Message
Posted Wednesday, September 26, 2012 10:42 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 6:56 AM
Points: 3,352, Visits: 1,487
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
Post #1364832
Posted Thursday, September 27, 2012 2:50 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 6:56 AM
Points: 3,352, Visits: 1,487
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
Post #1365096
Posted Thursday, March 14, 2013 5:01 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 23, 2013 4:54 PM
Points: 12, Visits: 162
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.


Post #1431296
Posted Friday, March 15, 2013 5:32 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 6:56 AM
Points: 3,352, Visits: 1,487
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.
Post #1431471
Posted Friday, March 15, 2013 7:49 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, July 23, 2013 4:54 PM
Points: 12, Visits: 162
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...


Post #1431540
Posted Thursday, July 11, 2013 7:57 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, October 23, 2014 2:02 AM
Points: 1,252, Visits: 1,737
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.


Post #1472841
Posted Friday, July 12, 2013 2:17 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 6:56 AM
Points: 3,352, Visits: 1,487
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
Post #1472898
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse