View linked server dependencies sql server 2008

前端 未结 3 1840
南旧
南旧 2020-12-31 19:17

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 d

3条回答
  •  自闭症患者
    2020-12-31 20:05

    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.

    WHERE     
    definition LIKE ''%\[' + srv.name + '\].%''
    or definition LIKE ''%' + srv.name + '.%''', CHAR(13) + CHAR(10), '') AS Query
    

提交回复
热议问题