Thursday, March 22, 2012

Error 8102, Cannot update identity

Hi,
I have setup unidirectional transaction replication between two SQL2k
servers. On the subscription database I have set the PK as (Indentity not
for Replication).
I can insert and delete records on the publisher and they get replicated
without any errors, but on the updates I get an error.
The issue I belieive is with the generated sp_MSupd stored procedure. For
some reason it is tring to execute the first block even if the logic is
false.
Can someone please advise how to get around this issue.
Thanks
This problem is caused by updating the PK. You have to look at exactly what
the application which is modifying the data on the publisher is doing.
For some applications (including ones using the .net DataGrid component),
any update of any column in a table results in the update of all columns.
This is translated as a delete followed by an insert.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"mm" <postto@.news.com> wrote in message
news:%23lUTk14mEHA.1296@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have setup unidirectional transaction replication between two SQL2k
> servers. On the subscription database I have set the PK as (Indentity not
> for Replication).
> I can insert and delete records on the publisher and they get replicated
> without any errors, but on the updates I get an error.
> The issue I belieive is with the generated sp_MSupd stored procedure. For
> some reason it is tring to execute the first block even if the logic is
> false.
> Can someone please advise how to get around this issue.
> Thanks
>
>

No comments:

Post a Comment