Errors Configuring Azure SQL DataSync 2.0 agent

When adding an on-premise member database to a datasync 2.0 sync group, you will need to configure the local sync agent following these steps:

Sometimes, the you may run into errors.

Error Type 1:

“Submitted agent key is invalid. The agent key could not be parsed as expected. Please resubmit a valid agent key”

“Please enter a valid agent key to proceed. The key must be generated from SQL Data Sync web portal”

"System.Data.SqlClient.SqlException,Message=Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination”

These errors are caused by insufficient user permissions. To be able to successfully configure the local sync agent you will need these permissions:

  1. Azure SQL server CONTRIBUTOR
  2. A member of DataSync_Executor role in sync metadata database
  3. On hub/member databases:

Error Type 2:

“Agent must be upgraded. Please download and install the latest agent”

To resolve this issue:

  1. Check the file version of the data sync agent client, DataSyncLocalAgentHost.exe. The file version should be 4.3.xxxx. The default path is:
    C:\Program Files (x86)\Microsoft SQL Data Sync 2.0\bin\DataSyncLocalAgentHost.exe
  2. If the file version is correct, check the dss.agent_version table in the sync metadata database using:
    SELECT * FROM dss.agent_version WHERE comment = 'current'

    The correct version should be

    If the table is empty, you need to insert a row to the table:

    INSERT INTO dss.agent_version(Id,Version,ExpiresOn,Comment) VALUES(1,'','Dec 31 9999 11:59PM','current')

    If the version is incorrect, you need to update the table:

    UPDATE dss.agent_version SET version = '' WHERE comment = 'current'
Comments (0)

Skip to main content