Does any know how / if it is possible to view all tables/views/stored procedures that depend on a linked server in Sql Server 2008. Basically as if the context menu "View dependencies" was accessible for linked servers?
Any help much appreciated.
Thanks
Following @Mitch Wheat's suggestion, here's some sql to run @gbn's answer for all db's on the server. Maybe this will a bit of time for someone.
I would recommend changing the middle part of the query to be as below to ensure only when it is used in a query you get a hit. If not you will get a lot of false positives whenever the servername is mentioned.
Search for it
Or use the free Red gate SQL Search to do the same with a GUI
There is no table or feature that tracks dependencies between the server-level linked server objects and database-level objects
Note: INFORMATION_SCHEMA views and the legacy syscomments truncate the definition so are unreliable for definition searches.