Thursday, March 22, 2012

Error 8102:cannot update identity column

I set up replication on my DB between two server. The Publisher will not update tables on the Subscriber that use an identity column and I get an error"8102:cannot update identity column". I have looked around and can't seem to locate any solid fixes. If I remove the identity column from the subscribers tables the package works, but I am not able to use the DB on the subscriber because I need the Identity columns for my app to function properly. My Publisher and Subscriber are both running SQL Server 2000 Standard Edition SP3.

Thanks.Check out this MSDN Article:Replication: Managing Identity Values.

Terri|||Thanks for the reply, I already read this article and it solves the problem but creates another. The article does describe how to increment the Identity column on the subscriber, but it will not match the value on the publisher because you must set the ID column ranges in seperate blocks. Server P 1-1000 Server S 1001-2000 When 1 is used on P, it insert 1001 on S.

Here's what I'm doing and maybe there is another way to do it.

I have two servers running my application, 1 exposed to the Internet for client access and one for my Intranet. I need an exact replica of my database on the Internet server that is being updated periodically from my Intranet server. I am installing clustered servers soon but I need to have an interim solution in place until then. The publically exposed server is also to act as a backup in the event that my Intranet server goes down.

The database is currently being replicated between the servers, but the Identity columns on the subscriber are not set, so if we had to switch to it I would have to define the ID columns in my tables for my application to work properly.

Would it be okay to point my Internet servers WEB.CONFIG data connection string to the Intranet server and just allow the replication to continue as is, and if I do have an outage direct my Intranet traffic to the Internet server, change the conn string in the WEB.CONFIG and define the ID columns?

Thanks in advance.|||Is your Internet server then serving as a warm standby? Is it then basically a read-only version of the database on your Intranet server??

If so, I can telll you that we usetransaction log shipping to keep a warm standby of our database on a different server.

Otherwise, I'm sorry, replication is out of my league. We had used replication for a short while until we found out that it did not meet our needs (due in part to the IDENTITY column situation). With some research and effort we might have gotten replication to work, but log shipping was exactly right for us.

Terri
PS, if you haven't seen it, you might consider this article:Architecting Replication with Identity Columns
|||Transaction logs would work if I had the Enterprise version of SQL, but I won't have it for a few more months, at which point I am installing clustered servers. I think for the time being I am going to go with allowing it to replicate with no ID columns set on the subscriber. I only have 5, so if there was a problem I could just set the ID columns on the subscriber and then change my DB Connection in my WEB.CONFIG to point to it. This is however a temporary solution.

Thanks, I found your info most helpful.

No comments:

Post a Comment