Find Invalid objects - not finding triggers
gsemel
Posts: 11 Bronze 1
in SQL Prompt
Hello. I'm trying to find invalid objects after moving DatabaseB to a different instance, where DatabaseB has triggers that reference DatabaseA. When A and B were on the same instance, these triggers worked fine, but now I have to change the DbA.Schema.Table references to Server.DbA.Schema.Table. The tool isn't listing any of these triggers as invalid objects. There is no DatabaseA on this new instance. Any ideas?
Thanks!
Thanks!
Tagged:
Comments
Thanks for reporting that issue -- sorry that we are no longer showing your triggers as invalid objects.
Would it be possible to confirm that using a Linked Server has caused Find Invalid Objects to stop working with your trigger?
Could you give us a little more information about how you are using Find Invalid Objects to maintain your database triggers?
Best wishes,
Michael Clark
Technical Lead, SQL Prompt
Technical Lead, SQL Monitor
The triggers (and other objects) are nothing special, and the move to linked servers and accessing objects across linked servers shouldn't really be a factor here. My goal is to use Find Invalid Objects to find all the places where I need to update the object reference to the four part fully qualified name. When DatabaseA.dbo.TriggerA references DatabaseB.dbo.TableB, and DatabaseB has moved to a different server/instance, TriggerA should be found by the invalid objects tool, because DatabaseB.dbo.TableB no longer exists without the fourth part of the fully qualified name (the server/instance), right?
A caveat...I left DatabaseB on the same server but took it offline in SSMS. Could that be why some object are not being shown as invalid, because the database exists in its original location, and offline isn't enough to let the tool "not find" the referenced objects? I can try detaching DatabaseB and give it a shot.
Thanks for your help.