Home » SQL Server

Agent message code 20084. The process could not connect to Distributor

Several subscriptions that were on a subscriber server that have the distribution job fired off on a scheduled basis (3-4a in the morning spaced out).

Were working fine as of yesterday but we had to remove the publications and subscribers (after scripting them out) from the server that acts as the Publisher/Distributor (due to data file moves needed on some of the DBs which were moved to larger SAN volumes).

Rebuilt the publications and subscriber from the scripts generated above.

Now on the subscriber server the scheduled distribution jobs are failing with the following error:

--First step history messages say (with success) ...

The replication agent has been successfully started. See the Replication Monitor for more information.

-- Second step message:

2010-03-28 14:42:16.346 The timestamps prepended to the output lines are expressed in terms of UTC time.
2010-03-28 14:42:16.346 User-specified agent parameter values:
   -Publisher MyPublisher
   -PublisherDB MyDB
   -Publication MyPublication
   -Distributor BURDC-SQL02P
   -SubscriptionType 1
   -Subscriber MySubscriber
   -SubscriberSecurityMode 1
   -SubscriberDB MySubscriberDB
   -XJOBID 0x58211FA1C93D8C4299028A3EA3A44895
   -XJOBNAME MyJobName
   -XSUBSYSTEM Distribution
   -XSERVER MyServer
   -XCancelEventHandle 0000000000000A18
   -XParentProcessHandle 0000000000000A30
2010-03-28 14:42:16.346 Startup Delay: 8299 (msecs)
2010-03-28 14:42:24.643 Connecting to Subscriber 'MyServer'
2010-03-28 14:42:24.721 Connecting to Distributor 'MyDistributor'
2010-03-28 14:42:24.721 Agent message code 20084. The process could not connect to Distributor 'MyDistributor'.

I am able to connect from the subscriber server to the Pub\Dist server via Mgt Sutdio.

I have set the job to use a domain admin account that is for all of our SQL Server services across the environment

The distribution jobs on the Pub\Dist server are there and can be started just fine for each of the publications that are failing

Any help would be great - THANKS!


4 Answers Found


Answer 1

Sounds like the distribution login account does not have rights on the distributor. You will need to address this problem.

Answer 2


Please check the account under which the Distribution Agent runs by using the following steps:
1. Connect to the Publisher in Management Studio, and then expand the server node.
2. Expand the Replication folder, and then expand the Local Publications folder.
3. Expand the appropriate publication, right-click a subscription, and then click Properties.
4. Click the properties button (...) in the Agent process  account row to open Distribution Agent Security dialog box.
5. Enter a Windows account or select run under the SQL Server Agent service account:
    For push subscriptions, the account must:
      1. At minimum be a member of the db_owner fixed database role in the distribution database.
      2. Be a member of the publication access list (PAL).
      3. Have read permissions on the snapshot share.
    For pull subscriptions, the account must at minimum be a member of the db_owner fixed database role in the subscription database.

For more information, please see:

If there are any more questions, please let me know.

***Xiao Min Tan***Microsoft Online Community***

Answer 3

Neither of those responses were helpful.  Could someone who has actually encountered this error please post something?  I'm tired of trying solutions only to find that the steps involved do not exist as described.....

Answer 4

What version of SQL Management Studio are you using?

I have tried MULTIPLE versions, 2005, 2008, etc and your instructions do not make sense at step 4.  Maybe you should state the version you have in your answer, rather than post something that just doesnt work for most versions




Hi experts,

I am using SQL Server 2000 Merge Replication. I have multiple replications in my SQL Server and they are still running properly even after quite a long time. However I have encountered the above error when I am creating a new snapshot. Therefore the old ones works, but new ones cannot be created.

Could you please kindly verify if my security settings is correct? Or could you please kindly advise me where else I should be looking at or try?

* The Distributor and Publisher are both local.

* 'Publisher and Distributor Properties' UI --> Distributor Tab --> 'Administrator link password' --> Password = <Same as sa pwd>

* 'Publisher and Distributor Properties' UI --> Publishers Tab --> 'Publisher Properties' UI --> 'Replication agent connection to the Publisher' = 'Impersonate the SQL Server Agent account on [SERVER] (trusted connection)'

* SQL Server Agent Server Startup Account = 'System account'

* I connect to the SQL Server with the sa account.

* DistributorSecurityMode = 1 in the command line of snapshot agent

Thank you very much in advance.


I'm trying to execute automated tests in lab management but deployment keeps timing out.  The following is in my tfs event log:

(QTController.exe, PID 2340, Thread 34) ControllerConfiguration: Agent 'Lab Management Agent' attempted to connect but failed: Microsoft.VisualStudio.TestTools.Exceptions.EqtException: The agent can connect to the controller but the controller cannot connect to the agent because of following reason: The write operation failed, see inner exception.

An existing connection was forcibly closed by the remote host

   at Microsoft.VisualStudio.TestTools.Controller.AgentMachine.VerifyAgentConnection(Int32 timeout)

   at Microsoft.VisualStudio.TestTools.Controller.AgentManager.BeforeConnectAgent(String agentName, String machineName, Boolean canPerformUITesting, IAgentService agentService, WindowsIdentity remoteIdentity)

   at Microsoft.VisualStudio.TestTools.Controller.ControllerConfiguration.ConnectAgent(String agentName, String machineName, Boolean canPerformUITesting, IAgentService agentService, WindowsIdentity remoteIdentity)


Any ideas as to what may be causing this?


Initially i had replication and then i have deleted the replication.When i redo the replication ,distributor agent is not starting.i got following error

SQLServerAgent Error: Request to run job FED-DB1-XXXX-XXXX_Pulbi-FED-DB2-19(From User sa) refused because the job is already running from a request by user sa.
Changed database context to 'XXXXXX'.(Microsoft SQL Server,Error:22022)'.

I have select the distributor agent in same publisher server.Please help me out of this.

Can we Restart  SQL Server Agent on Distributor during the transactional replication?
Will the replication pick it up once the SQL Servernt agent service is brought up?


I amended a process template to have a new sharepoint directory structure and contain files within these directories and sub directories. When reloading the template, I get the error:



There was a problem loading the process template:


Specified folder: xxx/xxx/xxx.ppt is not found


See the event log for further details



However, this error is not valid - the files do exist where they need to be. I can get passed the error by commenting out the XML in the WssTasks.XML file. However, when I reconfigure everything, save and close the editor, then reload, the same error message appears.


Please help! Thanks.



I am working to setup merge replication over HTTPS.

The setup is

1) SQL Enterprise server 2005

2) IIS Server 6

3) Remote PC over the internet running Sql Server Express 2005

4) Firewall betwen IIS6 and SQL Enterprise - port 1433 open into Enter Sql, IIS6 has ports open to SQL enterprise to enable SQL enterprise to access network drive (to put snapshots) 

5) Firewall between IIS6 and Internet / Remote PC -- FTp, http and https open

The setup tasks include:

- built the publisher using the wizard.

- Added users to the Publishing SQL server and granted them authority to the Publication

- setup the web sync using the wizard running SQL Management Studio on IIS

- Modified the replisapi website to run under a custom application pool that runs over a custom user and did other user profile setup tasks in instructions (http://msdn.microsoft.com/en-us/library/ms152511%28SQL.90%29.aspx)

- Setup SSL

- Testing the replisapi ?Diag and it works

- Setup the subscription using SQL on the SQL Express using sp_addmergepullsubscription 

- Declared the subscription using sql on SQL enterprise using exec sp_addmergesubscription

- Setup a batch file on SQL Exprss (windows 7) using "REPLMERG.EXE -publisher [] -FileTransferType [1]  -FtpAddress [] -FtpPassword [] -FtpUserName []  -publisherdb [] -publication []  -SubscriptionType 1 -subscriber [] -SubscriberSecurityMode 1 -subscriberdb [] -InternetURL [] -InternetLogin [] -InternetPassword [] -distributor []

I get an error - can not connect to the distributor from the ReplMerg.exe. I see this error in the log file in the directory with the REplisapi.dll.


I am off to Latin America on Sunday for relief work and really could use help in getting this towork so I can use this application while down there.






I am not able to connect to Remote Distributor from Publisher using Administrative Link Password. I have configured the Distributor on 1 m/c and Publisher on another m/c. When i use the wizard to configure the publisher using remote distributor. I have also specified the same Admin Password link (distributor_admin) in the distributor m/c.

I am getting the following message:

TITLE: New Publication Wizard

SQL Server could not connect to the Distributor using the specified password.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=CantConnectAdminPassword&LinkId=20476


Connection to server [SANMENON] failed.
OLE DB provider "SQLNCLI" for linked server "D956CF83-AE2E-4FC5-83DD-BE90D84A3950" returned message "Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "D956CF83-AE2E-4FC5-83DD-BE90D84A3950" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". (Microsoft SQL Server, Error: 21670)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21670&LinkId=20476




I have a distributor that I need to be able to connect to, the problem here is that the server is on a different domain which has a trust relationship setup.


our domain is DOMAIN_A

the domain where the DB server/distributor/publisher is: DOMAIN_B and server is called SERVER1

If I want to connect to the SERVER1, I can use the IP address which resolves ok, but to use a domain name, I need to use the naming SERVER1.domain_b.local

The problem here is that trying to use replication monitor, I get the error

Replication monitor could not connect to distributor SERVER1.domain_b.local\NODE_A

SQL server replication requires the actual server name to make a connection to the server, connections through a server alias, IP address or any other alternate name are not supported. Specify the actual server name SERVER1\NODE_A

The only way that I know in which I can specify the server name is if I RDP onto the actual server itself, this is not possible at the moment. Is there any other way around the problem ?


case WM_QUIT :

 // show message box or do something elsebreak ;

The code segment inside case WM_QUIT doesn't seem to execute. Please explain why.
I'm hoping to connect an SQL CE file (main.dat) to an Access DB so I can run some vba code which:

1. Uses DAO to open a recordset (a table in the SQL CE DB)
2. Uses a field containing paths to mp3 files to extract the id3 tag data
3. Update an existing field from the same table/Same SQL CE DB

I've looked around and can't seem to find any ODBC driver(s) for SQL CE.  Got some info from Erik who suggested I post here.

Thanks in advance!

EDIT:  I just now was able to get Erik's code to work in Excel from my DB.  But I'm not sure how to send it back to the SQL CE DB from VBA... Is it possible?



I'm integrating four systems. There are entities that need to synchronize, and these entities have values which can be choosed from picklists. So, I need to synchronize these dictionaries either. The problem is when new item is added to the dictionary, it must be passed to another systems to be stored there, and I can't use these new values in the further messages, because I'm not sure that they are already stored in another systems and can be used as entity field values. I want to lock further messages till "new-picklist-value" message is processed. How I can achieve that?

Thanx in advance.

Can someone tell me what this means?  I am trying to execute a simple unit test from the Test List Editor.

Error 11/24/2009 3:11:47 PM Test host process exited unexpectedly. foo-PC
Error 11/24/2009 3:11:48 PM Failed to queue test run 'foo@foo-PC 2009-11-24 15:11:47': Agent service cannot start the agent process on agent 'foo-PC'.  foo-PC

I am using transactional replication on 2 test instances MS SQL 2005 9.0.4035 SP3 after starting snapshot agent it stops on 99%

with message  the process is running and is waiting for a response from the server . I Used sp_who2 and dbcc inputbuffer and tried to increase timeouts but it didn't help. What should i do? Help is very preciated




Version: SQL Server 2008 R2

The same XMLA Script runs fine when run manually in SSMS.

But it fails when run as a Agent Job only for the particular database. It works fine with other databases.

Script Settings:

Process Full, Parallel, Ignore Key errors.

I only difference i see is the failing database objects has keyerrors while the success one do not have any.

Is this anything related to Key errors?





It there possible to start the processing of a Cognos Analysis Studio cube from SQL Agent or TSQL and what steps do I need to undertake? I have a BAT file that initiates the cube processing but I can't get it to work. The cube processing is one server and the SQL database is on another server. I assume that it's first an issue of typing the correct syntax in SQL Agent and secondly an issues of executing a BAT file on another server. Any thoughts or experiences?

SQL Server 2008 R2 and Cognos BI 8.4




Is it possible to see the TFS 2010 Datawarehouse Agent Jobs and details as the jobs process?



I have an SSIS 2008 package running on Win 2008 64-bit server. The package has an Execute Process Task that runs a net use command using cmd.exe to make a connection.

This runs successfully when tested from the command prompt and runs successfully when the package is run in Visual Studio 2008. However, when the package is called from a SQLAgent job the package fails with the error (actual servernames and passwords removed):

Failing Task Name = EPT Connect mapped drive Error Code = -1073573551 Error Detail = In Executing "C:\WINNT\system32\cmd.exe" "/C net use
\\servername\foldername /USER:userid password" at "", The process exit code was "1" while the expected was "0".

I have determined that a successfull connection should provide a exit code of 0.

The job runs under a proxy account but as explained when the package has run from within VS 2008 it was also tested to run under the proxy account and is successful.

It is not a 64-bit issue as I have tested it by running the package using the 32-bit version of dtexec.exe and the same problem occurs.

Also I have found that by running a simple command process within the Execute Process Task such as dir *.* it is successful when run from the job indicating that it is in fact something related to the net use command itself when run from inside a job.

I have run out of ideas to pursue this - would appreciate anyone's help ?



I have successfully ran a web test and then added a webtest plug in with it. After that I generated coded webtest for this and try to run it and getting an error saying--"The agent process was stopped while the test was running."

Please let me know why it is throwing this error. Mention that I am using VS 2010 ultimate.  VS 2008 doesn;t have any problem on webtest plug in.

Here is the partial code below:


// <auto-generated>

// This code was generated by a tool.

// Runtime Version:4.0.30319.208


// Changes to this file may cause incorrect behavior and will be lost if

// the code is regenerated.

// </auto-generated>









using System;



using System.Collections.Generic;



using System.Text;



using Microsoft.VisualStudio.TestTools.WebTesting;



using WebTest_plug;



using Microsoft.VisualStudio.TestTools.WebTesting.Rules;



publicclassbriaduatCoded : WebTest




privateClass1_Aspen testPlugin0 = newClass1_Aspen();



public briaduatCoded()




this.PreAuthenticate = true;



this.PreWebTest += newEventHandler<PreWebTestEventArgs>(this.testPlugin0.PreWebTest);



this.PostWebTest += newEventHandler<PostWebTestEventArgs>(this.testPlugin0.PostWebTest);





publicoverrideIEnumerator<WebTestRequest> GetRequestEnumerator()




this.PreRequestDataBinding += newEventHandler<PreRequestDataBindingEventArgs>(this.testPlugin0.PreRequestDataBinding);



this.PreRequest += newEventHandler<PreRequestEventArgs>(this.testPlugin0.PreRequest);



this.PostRequest += newEventHandler<PostRequestEventArgs>(this.testPlugin0.PostRequest);



WebTestRequest request1 = newWebTestRequest("https://aspenuat.archivesystems.com/Briad/Common/Shared/Logon.aspx");



WebTestRequest request1Dependent1 = newWebTestRequest("https://aspenuat.archivesystems.com/Briad/Common/Shared/Proxy.aspx");



"target", "https://aspenuat.archivesystems.com/AppControl/Services/Notifications.aspx?Servic" +



"eMethod%3dGetLogonNotificationMessage", false, false);



"LogonNotificationParms", @"{%22IsActive%22:false,%22ShouldAnimate%22:true,%22Message%22:%22Please+note+that+this+site+will+be+unavailable+between+5:00PM+and+8:00PM+Eastern+Time+this+coming+Friday+due+to+maintenance+activity.%22,%22ProductName%22:%22Asi.Common.WebApp%22,%22ProductVersion%22:%229.8%22,%22Environment%22:%22UAT%22,%22ServiceUrl%22:%22/Briad/Common/Shared/Proxy.aspx?target%3dhttps://aspenuat.archivesystems.com/AppControl/Services/Notifications.aspx?ServiceMethod%3dGetLogonNotificationMessage", false, false);



"LogonNotificationParms", "%22}", false, false);




ExtractHiddenFields extractionRule1 = newExtractHiddenFields();

extractionRule1.Required =



extractionRule1.HtmlDecode =



extractionRule1.ContextParameterName =



request1.ExtractValues +=





yieldreturn request1;

request1 =





// login






Recently we started to use Team Foundation Server. TFS itself is installed on a server machine and for now we use just its SourceControl. Everything was a fresh install, no upgrade.

Couple of days ago I started to play with Team Foundation Build. I installed it on my local computer and the service was running on my computer under domain account. Everything worked perfectly until this afternoon (in the morning still everything was OK). Suddenly when I queue new build, I immediately got this error:


TF21508: An error occured while connecting to agent \Pieskovisko\Agent 007:
Method not found: 'Void Microsoft.TeamFoundation.VersionControl.Common.VersionedItemUri..ctor(Microsoft.TeamFoundation.Client.TeamFoundationServer, System.String, Int32, Int32)'.


I really don't know what has happened. Further I found out, that whe I run Team Foundation Build service under NETWORK SERVICE account, the agent is reachable, but I got security error:


TF21508: An error occurred while connecting to agent \Pieskovisko\Agent 007:
TF209009: The account NT AUTHORITY\NETWORK SERVICE is not authorized to communicate with Team Foundation Server MyServer. Verify that the account is a member od the Build Services security group for the appropriate team project on the Team Foundation Server and that the account's password has not expired.


The account NT AUTHORITY\NETWORK SERVICE really is in Build Services security group, so I don't understand this.

So now I ended up that I cannot run any build. I tried to restart my computer, delete all my build agents and build definitions but it did not help.

Does anybody know what first error means and what to do? I really am confused because I am not aware of doing anything wrong when I got that first error and everything worked.

Or how can I make work team build service under NETWORK SERVICE account.


Thaks a lot for any help.


Hello everyone

         I am writting an SNMP extension DLL,I compile it, But the compiler come out this error "....\mfc\12323\agent\agentext\stdafx.h(19) : fatal error C1083: Cannot open include file: 'snmp.h': No such file or directory".in  stdafx.h   I used snmp.h :#include <snmp.h>,My compiler is VS2005.Who can tell me how to solve this problem?

         Thank you  every much!




<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure