1

My merge replication scheme has suddenly started failing. When trying to sync it complains that there is an invalid object. 'dbo.myfunction'. The function used to exist but was removed. There was only one reference to it from a table valued function and it has been updated as well. I've generated a new snapshot but it continues to complain that the object is invalid and will not sync at the subscriber.

Somewhere within the replication it's still looking for that function. How do I find and remove it - when it's not there anymore.

I've even looked through the files in the snapshot and cannot find anywhere that it is being referenced.

My publisher is SQL 2008 R2 - all my subscribers are SQL 2008 Express

1 Answer 1

1

From what I can tell... I had a table valued function that used to require another table valued function as part of it's logic. That behavior was improved (combining the two tbf's into one) and because our replication included schema changes the improvement was pushed out to subscribers and the extra tbf object was removed... which was then also pushed to subscribers.

A few weeks later when a subscriber tried to reinitialize however it went back to the original tbf and then couldn't find the other one that it relied on (before it got to the incremental change that told it, it no longer needed the other one)... and simply died.

I was able to recreate the behavior and I could see the old version of the tbf appearing in the subscriber as it tried to reinitialize. So, moral to the story is... replicating a work in progress is delicate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.