I have a transactional replication publication / subscription set up but am receiving errors in the Log Reader Agent:
2022-10-03 18:41:45.133 OLE DB Publisher '<SERVER>': exec sp_replcounters N'<DATABASE>'
2022-10-03 18:42:04.556 Status: 2, code: 20011, text: 'The process could not execute 'sp_repldone/sp_replcounters' on '<SERVER>'.'.
2022-10-03 18:42:04.556 The process could not execute 'sp_repldone/sp_replcounters' on '<SERVER>'.
2022-10-03 18:42:04.556 Status: 2, code: 64, text: 'TCP Provider: The specified network name is no longer available.'.
2022-10-03 18:42:04.556 Status: 2, code: 64, text: 'Communication link failure'.
The distributor is co-located with the subscriber, across a WAN from the publisher.
This appears to be due to a misconfiguration of the SQL replication and not transient network issues because I am able to query the replication status from the publisher and query the publication database from the distributor but am unable to execute the sp_replcounters
successfully from the distributor. Whenever EXEC sp_replcounters
is run from the distributor it give the following error (matching the error in replication agent history):
Msg 64, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
However, I am able to select data from the publisher database without issue and run the same EXEC sp_replcounters
from the publication server. Also, both servers have the appropriate IP addresses configured in the C:\Windows\System32\drivers\etc\hosts
file, so DNS should not be a factor.
What steps does sp_replcounters
perform that could cause an network issue?