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
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
"Bruce Baker" <bruceb@.ardex.com.au> wrote in message
news:%23yyb9VNaEHA.4048@.TK2MSFTNGP10.phx.gbl...
> 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
>
|||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
|||Great idea but it says I can't alter the table 'cause it is being published
for replication....
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:etvoroNaEHA.1652@.TK2MSFTNGP09.phx.gbl...
> 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
>
|||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
|||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
Monday, March 12, 2012
removing rows from a replicated table
Labels:
cannotdelete,
database,
hii,
microsoft,
mysql,
oracle,
removing,
replicated,
rowguid,
rows,
server,
sql,
subscription,
table,
value
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment