Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem was that one of the subscribers had old publications and subscriptions in the system tables that were replicated through out the entire system. Which caused the violation of UNIQUE KEY constraint.</p> <p>Once we removed these old entires we were able to restart replication. </p> <p>We were able to identify the valid records in sysmergepublication because we knew the state of this table before the invalid entries were replicated. This <a href="http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/thread/df79fe81-9b5e-4726-88d9-d4d13200564b/?ffpr=0" rel="nofollow noreferrer">forum post</a> shows you how to location invalid publications if you need to.</p> <p>We used the follow sql to check for additional subscription entries:</p> <pre><code>select * from sysmergepublications select * from sysmergesubscriptions where pubid in ( select pubid from sysmergepublications) select * from sysmergesubscriptions where pubid not in ( select pubid from sysmergepublications) </code></pre> <p>Here is the sql that we used to delete the invalid subscriptions:</p> <pre><code>delete from sysmergesubscriptions where pubid not in ( select pubid from sysmergepublications) </code></pre> <p>Note: the code sample above assumes that the sysmergepublication contains only valid publications</p> <p><strong>Alternatively:</strong> You can use the <code>EXEC sp_removedbreplication @dbname='&lt;dbname&gt;'</code> to remove replication from the database completely. This command appears to remove all replication triggers from the database.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload