all groups > sql server replication > january 2005 >
You're in the

sql server replication

group:

Snapshot Agent fails in Replication (full details)


Snapshot Agent fails in Replication (full details) tabbycat NO[at]SPAM gmail.com
1/6/2005 6:27:56 PM
sql server replication:
Hi,

I am trying to setup replication on an SQL Server 2000 database. SP3a
has just been installed.

The Snapshot Agent fails during Replication with the following error:

Preparing table '[dbo].[tblRecordStages]' for merge replication
SourceTypeId = 5
SourceName = WIN2KVMWARE
ErrorCode = 1505
ErrorText = CREATE UNIQUE INDEX terminated because a duplicate key was
found for index ID 3. Most significant primary key is 'type 24, len
16'.
CREATE UNIQUE INDEX terminated because a duplicate key was found for
index ID 3. Most significant primary key is 'type 24, len 16'.

The design of the table where the failure occurs:

intDescription int datatype, 4 bytes, no nulls
strDescription nvarchar, 255 bytes, nulls
orderNumber int, 4 bytes, nulls
blnPermanent bit, 1 byte, no nulls
strRecordStageID uniqueidentifier, 16 bytes, no nulls, PK

The data contained within the table:

Posted as an 11kb image to keep the formatting and make it easier to
read.
http://www.users.on.net/~mmienik/SQLServerHelp/sqlSvr_failed_replication_data.gif

The error message says index ID 3 contains a duplicate value. Which
ID is it? There are no duplicates in the table yet I always get this
error message.

tblRecordStages.strRecordStageID is referenced as a FK by another
table but this is correct.

For the record the data was manually imported from an Access database
where Replication did exist (with the same data) and worked perfectly.

Re: Snapshot Agent fails in Replication (full details) Hilary Cotter
1/7/2005 7:39:25 AM
it seems like its have a problem with your guid, could you script out the
table and post it here?

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
[quoted text, click to view]

Re: Snapshot Agent fails in Replication (full details) Michal Mienik
1/9/2005 4:48:56 PM
Hi,

Thank you for your response. After my original post I finally worked
out what the problem was: the Snapshot Agent was failing on the Primary
Keys because they were uniqueidentifiers but not marked as Row GUID
columns, and the default value was not newid(). Making these two
changes has solved the problem.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button