question

PaulBill-8748 avatar image
0 Votes"
PaulBill-8748 asked SeeyaXi-msft commented

Problem with merge replicaton on SQL Server 2019

I have setup a managed Windows Server and SQL Server 2019 in Azure. I have restored a database, created the distributor, created a publication for the database on the same SQL server, set the user in the database to be the owner and have rights to the merge stuff. After I zip up the unc folder and download it to a separate device and attempt to sync to the server I get an error of:
The remote server "myservername" does not exist, or has not been designated as a valid Publisher, or you may not have permission to see available Publishers.
The remote server "myservername" does not exist, or has not been designated as a valid Publisher, or you may not have permission to see available Publishers.
{call sp_helpdistpublisher (N'myservername') }

The machine is setup to allow remote connections.

I have ran the sp_helpdistpublisher and it's there.

What am I missing? Any help is appreciated, and I'll let you know up front I'm not a dba.

sql-server-generalazure-sql-databaseazure-sql-virtual-machines
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PaulBill-8748 ,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it dosn't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·
AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered PaulBill-8748 commented

Have you allowed traffic on port 1433 TCP as inbound and outbound on both computers? Have you enabled TCP protocol using SQL Server Configuration Manager? Are you allowing traffic on TCP port 1433 over VNETs? Can you connect to the remote server using SSMS?

Make sure SQL Server is using mixed mode authentication, you restarted the database engine service after setting mixed mode, and you are using SQL login for authentication.

This article may be useful.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes port 1433 is open. It is mixed mode. I can connect to it, even from an alias. When I run my program to sync it does create the local and server subscription and when it's about to pass data, it fails with the above error as if suddenly it doesn't know the server anymore.

0 Votes 0 ·

Also, I noticed the subscription on the server was created but set to Inactive.

0 Votes 0 ·
SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @PaulBill-8748,

Based on your description, you encounter the error during the merge replication synchronization process.
In addition to the previously checked work you said, you also need to do:
Ensure that the Merge Agent process account is a member of the db_owner fixed database role in publication database and distribution database. For more information, please review this article: Merge Agent Security.

Best regards,
Seeya


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.