Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Replication (2008)
 replication error

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2011-05-08 : 04:15:44
i have a table

CREATE TABLE [dbo].[Dyn_Acc2Email](
[id] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[AccRef] [int] NOT NULL,
[email] [nvarchar](200) NOT NULL,
CONSTRAINT [PK_Dyn_AccEmails] PRIMARY KEY CLUSTERED
(
[AccRef] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

and i get an error :
quote:

Violation of PRIMARY KEY constraint 'PK_Dyn_AccEmails'. Cannot insert duplicate key in object 'dbo.Dyn_Acc2Email'.


i cant figure out why this happens-any idea?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-05-08 : 14:49:27
You get this error at the subscriber(s) or publisher?

If at the subscriber, either you're going to have to find the offending record(s), or you're going to need to re-snapshot and resynch.

Then, stop allowing writes to the subscriber(s) -- which is almost always the casue of this.
Go to Top of Page
   

- Advertisement -