all groups > sql server replication > july 2004 >
You're in the

sql server replication

group:

removing rows from a replicated table


Re: removing rows from a replicated table Paul Ibison
7/13/2004 2:04:15 PM
sql server replication:
Bruce,
presumably you are using merge, and the insert failure is the insertion of a
row into MSmerge_tombstone.
I don't know how these rows have managed to be entered without having a GUID
as this is a default value. Either they were entered with an explicit null
or they were already there.
To remove them, it depends on if they exist on other servers or not.
The easiest way is to use ALTER TABLE DISABLE TRIGGER deletetriggername then
remove the rows then reenable the trigger. Obviously you must ensure there
are no other changes going on while you do this type of manipulation.
HTH,
Paul Ibison

removing rows from a replicated table Bruce Baker
7/13/2004 10:30:52 PM
Hi

I have a subscription which has a table and some rows which I cannot
delete - they don't have a rowguid value set for them - when I try and
delete I get a message about 'cannot insert a null value into column 'guid'.

How do I tidy tihss up ?

thanks

Re: removing rows from a replicated table Paul Ibison
7/13/2004 11:04:11 PM
Ah...then try editing the trigger to comment out the part that inserts into
the MSmerge_tombstone table. Can't test it here so please post back if there
are any problems.
Regards,
Paul Ibison

Re: removing rows from a replicated table Bruce Baker
7/14/2004 7:28:23 AM
Great idea but it says I can't alter the table 'cause it is being published
for replication.....


[quoted text, click to view]

Re: removing rows from a replicated table Bruce Baker
7/14/2004 7:56:36 AM
I altered the trigger so it didn't do anything, deleted the rows and altered
the trigger back to how it was. Thanks for the tip...

Bruce

Re: removing rows from a replicated table Hilary Cotter
7/14/2004 8:59:07 AM
Is this a merge subscription? Or Immediate Updating?

It sounds like the triggers are not executing correctly.

The best way for you to solve this would be to reinitialize and regenerate
and distribute your snapshot.
--
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html


[quoted text, click to view]

AddThis Social Bookmark Button