June 4, 2015 at 7:16 am
Is it possible that the function gets a dependency "taken out from under it", so to speak, and then when accessed, there has somehow been no opportunity to re-establish that it has what it needs available? While I haven't seen this scenario before, I'm just wondering if checking into the details of the tear-down might reveal that the table it depends on gets dropped and re-created, and perhaps the solution is to simply add that function to the tear-down and re-creation processes ? I don't know if that's the way things are supposed to work, but it wouldn't surprise me... Anyone with better info, please feel free to provide...
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
June 8, 2015 at 3:31 pm
It looks like adding an object to a transaction replication publication updates the modify_date in sys.objects. I believe that is what is pulling the dependency out from under the function. We're going to try adding the function to the publication to see if that resolves the issue. The error was only happening with one or two stored procedures out of many that call the function, so I'm thinking that those procedures were either compiling or executing when the publication was created and that's why SQL Server didn't just recompile the function when the dependent object was modified. Thanks for you input on this!
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply