Home > Ask the SQL Server Experts > Michael Hotek Questions & Answers > Error in "Not for replication" database
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Error in "Not for replication" database

Michael Hotek EXPERT RESPONSE FROM: Michael Hotek

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 12 March 2004
We are using transactional replication - push subscription. The subscriber database is set as "Not For Replication". When a row is inserted at the publisher, the change is sent to the subscriber with no problem. When a column is updated in the publisher, I get an error: "Cannot update identity column 'column name' (Error #8102 - trying to alter the value of an identity column in SET portion of the UPDATE statement). I'm NOT trying to update the identity column, and this column did NOT change, but when I look at the last command issued by the replication agent, it's calling sp_MSupd_tablename. When I look at the stored procedure, there is a variable @bitmap binary (2) being passed in (the value is 0x0800). There is an if statement "if substring(@bitmap,1,1) & 1=1" - if this returns true, then the procedure attempts to change the primary key field. This is a stored Microsoft procedure that is automatically created with the distribution services. This field is a primary key field in both the publisher and subscriber. I don't understand why the procedure would even be attempting to change it. I'm hoping you can give me a little more detail on this and possibly a solution. Our thought is to remove the "if" portion of the procedure and the statements following it and just leave the "else" statements remaining, since the primary key value should never be changed anyway. Do you see any issues with doing that?

>

I don't understand what setting a database to not for replication is. You can set identity columns, foreign keys, and triggers to use the not for replication option. It isn't something that can be done at a database level. I'd also need to know what version of SQL Server and what service pack level you are running and if any errors were generated during the application of a service pack.

For More Information


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Michael Hotek
Applying LDF file to MDF without turning it to .BAK first?
Procedure for finding last modified info?
Migrating poorly designed database to new, normalized one
Displaying decimal places in SQL Server 2000
Creating a DTS package
Extracting data without strings converted to strange characters
Money data type conversion issue using DTS
Any way to alias a call to functions?
Repairing corrupt MDF files
In-place versus side-by-side upgrade

SQL Server Replication
SQL Server Mailbag: Migrating down to Standard Edition
Push vs. pull: Configuring SQL Server replication
Top load balancing methods for SQL Server
New replication features in SQL Server 2008 and what they mean to you
SQL Server database replication tutorial
Licensing a standby server for SQL Server replication
Upgrade live applications to SQL Server 2005 for high availability
Tool to synchronize two SQL Server databases
Simplify SQL Server replication
Replication techniques in SQL Server

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
replication  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts