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:
- Azure SQL server CONTRIBUTOR
- A member of DataSync_Executor role in sync metadata database
- On hub/member databases:
Error Type 2:
“Agent must be upgraded. Please download and install the latest agent”
To resolve this issue:
- 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
- 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 18.104.22.168.
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,'22.214.171.124','Dec 31 9999 11:59PM','current')
If the version is incorrect, you need to update the table:
UPDATE dss.agent_version SET version = '126.96.36.199' WHERE comment = 'current'