Replication Error (Source: MSSQLServer, Error number: 2627).

Error in the Replication monitor:

Command attempted:
{CALL sp_MSins_dboXXXXX (2365938, '"Set PROCESSED=(2,-20) ON CREATEs WHERE SerID
already exists in [subscriberdatabase]" completed:', {ts '2011-09-18 08:07:56.537'}, {ts '2011-09-18 08:07:56.537'}, NULL, NULL)}
(Transaction sequence number: 0x00023911000035F3000300000000, Command ID: 1)

Error messages:

Violation of PRIMARY KEY constraint 'PK_tablename-table'. Cannot insert duplicate key in object
Tablename-table''. (Source: MSSQLServer, Error number: 2627)
Get help: http://help/2627

Resolutions Steps:

Go to subscriber database

Run below query.

1. Select * from [dbo].[Tablename-table] where rowid>=2365938

Then delete the records by executing below query.

delete * from [dbo].[Tablename-table] where rowid>=2365938

2. Finally restart the distribution job.

Replication was failing due to a "Primary Key violation error". We found certain entries in the subscriber, which were not marked as replicated in the publisher. Hence the entries were removed and replication was started again.

Replication is in synch now.

Comments

Popular posts from this blog

SQL Server:Steps to Configure Database Mirroring by T-SQL Script.

SSIS2008R2 Error: 0xC0209303 at Package: