2

i'm stuck trying to solve an issue with a brand-new installation of two sql-server 2017 developer edition, in two different commodity server.

The problem arise with the tentative of merge-replicate one database. Every chanche to sync the subscriber ( in a lot of different combo and scenario ) ends up with the following error:

exec sys.sp_MSaddmergetriggers N'systemunits', N'dbo', null, 0**************deferred cmd exec completed

Cannot find the object 'MSmerge_ctsv_A6203259D69B49709C5BE266A99D0DBC', because it does not exist or you do not have permission.

I have installed the default-instace of sql server on both the server, no rename of the server has been done after the installation.

Any suggestions?

Albin
  • 11,950

1 Answers1

1

After a whole day, I finally found a solution to the problem! It seems that the replica agent uses the domain-name (not the IP or the port) of the subscriber to replicate without issue. Every mismatch or change in the DNS (for example... localhost instead of the hostname, the port number that follows the named instance etc.) causes an error in the sync process.

To avoid any issue, I created a SQL-ALIAS referencing the destination subscriber, and used that alias in the definition of the subscription.

For example, to point to the server 10.12.12.5\SqlExpress,49170 I created the alias:

<HOST_target_name>\SqlExpress
port: 49710
protocol: TCP/IP
Server: 10.12.12.5\SqlExpress

and used that alias (i.e. <HOST_target_name>\SqlExpress) as the host subscriber.

TT.
  • 113