Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Distribution Agent Fails - Cannot Create Temp Files in SQLServer\140\COM Folder

$
0
0

Hello.

I would like to kindly ask for your thoughts with the following:

1) I have a Transactional Replication (TR) with a remote Distributor (DIS), between the Source (PUB) and the Subscriber (SUB) Servers

2) There are 8 Databases being replicated

3) All three servers are on Azure VMs

4) I have not (intentionally :) ) changed any authorizations on any of the replication-related users (both local users and sql users)

From yesterday, as following the same cue, all of the replications started failing with the same error message:

...

2019-09-10 10:17:37.527 Connecting to Subscriber 'SUB'
2019-09-10 10:17:38.152 Initializing
2019-09-10 10:17:40.574 Agent message code 21100. The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\140\COM' directory. System returned errorcode 5.

When I went to see the state of the Jobs on DIS, I found that all of the Distribution Agents were retrying and retrying, always resulting in the same error.

Since the error message implied that the Agent was connecting to the SUB, I went there to see if the repl_distribution Account has the right permissions - and it did.

However, when I went to the DIS Server to check the same, I did not find that the repl_distribution Account was authorized for this Folder, and once I did this, the replication came back up.

Now I am a bit confused and have the following questions:

1) What is the 140\COM Folder used for in the first place?

2) Could it be that all of this time the Agent never needed to create anything on the DIS side (but only on the SUB side), but now all of a sudden it needs to create some temp files on the DIS Server?

3) On the other hand, if it was always enabled on the DIS side (since the replication was working for the past two months), how can it be that the Distribution Account was removed?

4) Can a restart of the VM hosting the DIS Server cause this? Can a change in Active Directory and/or an update of the DNS Server(s) cause this?

5) Have there been any updates on the SQL Server's (Transactional) Replication feature yesterday?

With thanks and kind regards,

Bogdan






Viewing all articles
Browse latest Browse all 4054

Trending Articles