January 15, 2003 at 5:34 pm
I've setup a merge replication between 2 servers (1 publisher + distributer, another subscriber).
Everything works fine from the publisher's end, but when I try to do updates/inserts to the subscriber's db it gives errors like:
Server: Msg 208, Level 16, State 1, Procedure upd_7BD6BFF9E597457C83581F5577E821DF, Line 76
Invalid object name 'ctsv_7BD6BFF9E597457C83581F5577E821DF'.
Now I know that upd_7BD6BFF9E597457C83581F5577E821DF is a trigger for the table I'm trying to update, and indeed line 76 does have the so-called invalid object ctsv_blablabla, but that's all I can find out and now I'm completely stuck. What's this ctsv crap and how do I make sure it's there? I have the part of the trigger code that's causing the problem (if you want the whole bunch just let me know):
---- line 76 ------
update ctsv_7BD6BFF9E597457C83581F5577E821DF
set lineage = { fn UPDATELINEAGE(lineage, @nick-2) },
generation = @newgen,
joinchangegen = case when (@joinchange = 1) then @newgen else joinchangegen end,
partchangegen = case when (@partchange = 1) then @newgen else partchangegen end,
colv1 = { fn UPDATECOLVBM(colv1, @nick-2, @bm, @missingbm) }
FROM inserted as I JOIN ctsv_7BD6BFF9E597457C83581F5577E821DF as V
ON (I.rowguidcol=V.rowguid)
and tablenick = @tablenick
---------------------------------------
Thanks a lot for any help as I continue on my quest for an answer.
January 15, 2003 at 6:18 pm
I gotta spend more time doing merge repl myself! Definitely looks like you're missing a table or view that stores the change. Probably fixable, but you have considering just redoing the snapshot/re-setting it up? Sorry, I know thats not a good answer, but at least you know we're awake.
Andy
January 15, 2003 at 8:49 pm
The ctsv_... is a view. One is created for each table in the publication. It is supposed to be created by the initial snapshot job, along with the triggers and some stored procedures and system tables. Since you have the triggers, it sounds like the schema part of the snapshot failed at some point. You should be able to see what went wrong by reviewing the merge agent history on the publisher - under Replication Monitor.
The best thing to do is like Andy said - reinitialize the subscription, which will reapply the snapshot. But I would review the history first to make sure there's not something else wrong.
Jay
Jay Madren
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply