Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Question of the Day for 13 Oct 2004 Expand / Collapse
Author
Message
Posted Monday, August 23, 2004 8:05 PM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
Comments posted to this topic are about the Question of the Day for 13 Oct 2004 posted at http://www.sqlservercentral.com/testcenter/qod.asp?QuestionID=356.
Post #133464
Posted Thursday, August 26, 2004 8:00 AM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
Post #134030
Posted Tuesday, November 16, 2004 7:28 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 2:05 PM
Points: 308, Visits: 55

OK. I'm confused. The question says the error is because of a duplicate primary key in the publisher, but all of the answers deal with the subscriber or agent. It seems to me the real problem is the duplicate in the publisher and it should be fixed there.




Bob
SuccessWare Software
Post #146481
Posted Tuesday, November 16, 2004 9:44 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 11:29 AM
Points: 402, Visits: 47
I think the implication is that the record being inserted is a duplicate of one already on the subscriber.  Probabaly because the subscriber was updated by something other than the distributor, and they are not using bidirectional replication.


Post #146511
Posted Tuesday, November 16, 2004 10:12 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, November 17, 2014 1:28 PM
Points: 3,189, Visits: 1,271

I'm unfamiliar with transactional publication. What insert stored procedure is being referred to in answer D? Is this something automatically generated by SQL?

-Kevin




Post #146524
Posted Tuesday, November 16, 2004 10:29 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 11:29 AM
Points: 402, Visits: 47

When using transactional replication, you have the option of using a custom stored procedure instead of a standard insert at the subscriber.  This stored proc would run instead of the regular insert.  The same is true for updates and deletes.  The default behavior is to use the regular insert, update, and delete.  No stored proc is automatically generated. 

Devin




Post #146531
Posted Tuesday, November 30, 2004 10:06 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, October 28, 2013 12:26 PM
Points: 17, Visits: 2
In transactional repliction When you register a subscriber and run the snap shot agent at the first time, it will create 3 store procedures for each table for insert, update and delete. You can either use those standard store procedures or you can customised those procedures.


Post #148600
Posted Tuesday, November 30, 2004 10:45 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 20, 2013 11:29 AM
Points: 402, Visits: 47

Whoops, I stand corrected.  SQL Server does create stored procs by default.  But I could only find stored procs for initial population, conflict resolution, insert, select, and update.  I didn't see any delete ones, oddly enough.

 




Post #148609
Posted Monday, September 2, 2013 3:47 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 5:50 PM
Points: 7,924, Visits: 9,649
The most common cause of this error, in my experience, is that someone has failed to mark a trigger "not for replication" that needed to be so marked. The correct long term solution is to fix the trigger, and then reinitialise and restart the subscription.

Doing all four things recommended here serious risks leading to catastrophic error - two of them just say "I don't care if it's wrong, just get on with it", which is normally considered completely unacceptable (it's as bad as running all your queries with hordes of NOLOCK hints). If someone is updating a subscriber which is not handing stuff back to the publisher, that probably needs serious management action to ensure that it doesn't happen again, not just deleting a row on the subscriber. So three of the four things are just plain wrong.


Tom
Post #1490696
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse