I have recently encountered a wonderful question about publishing a subscription (Replication), and I hereby record this case. We have a large number of alarms on a SQL Server database server. The alarm information is as follows:
description:replication-replication distribution Subsystem:agent xxxxxx failed. Column names in each table must is unique. Column name ' xxxxx ' in table ' dbo.xxxxxx ' was specified more than once.
After a detailed examination, analysis, found the cause and consequences of this error. For the moment, we'll use a for tablename, and C for the field/column name on the table. The maintenance personnel of the system are required to modify table A, add field C, but the table has a publish subscription, so he first executes the script to increase the field C at the subscriber and then goes to the Publisher to execute the script that adds field C, and the result is this error. Replication to synchronize the modification of a table from the Publisher to the Subscriber, the result of this error is that a table already has field C on the Subscriber. Normally, you should add a field at the publisher c,replication will automatically sync to the Subscriber.
At first this mistake let me confused, do not know why to report such a mistake. The source of the problem is not discovered until detailed inspection and inference validation. It can be said that the smattering of replication led to this error, I think developers and DBAs should warning!
Replication-replication distribution Subsystem:agent xxxxxx failed. Column names in each table must is unique