I've setup the following situation:
Server has a SQL Server 2019 Standard edition and is the Publisher. Local laptop has a SQL Server 2019 Express edition and is the Subscriber.
Server and laptop are connected via VPN.
I created a publication on the server and a subscription on the local laptop. So far so good.
The synchronisation is setup as a Merge Sync. The subscription method is Pull.
I've created a batch file in orde to start the synchronisation on my local laptop.
It contains the following code: "C:\Program Files\Microsoft SQL Server\150\COM\replmerg.exe" -Publisher Publication-Server\TEST -PublisherDB TEST -Publication TESTPub -Subscriber Subscription-Local\TEST -SubscriberDB TEST-SubscriptionType 1 -SubscriberSecurityMode 1 -Distributor Publication-Server\TEST -OutputVerboseLevel 2 -Validate 3 -Continuous
Whenever I execute the batch file, it starts and directly stops with the following:
Message: The process could not connect to Subscriber 'Subscription-Local\TEST'.
Then it follows by disconnecting from OLE DB Subscriber 'Subscription-Local\TEST'.
I'm running the batch file with a Windows user that has db_owner permissions on the Subscription database TEST.
I'm lost about what to do, to get the batch file to work properly.
If you need more information, shoot!
So I tried changing from Windows Authentication to SQL Server Authentication. Same issue.
I tried running the batch file as Administrator. Same issue.
I tried deleting the Publication and Subscription and recreate them. Same issue.