Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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