How to find a text inside SQL Server procedures / triggers?

后端 未结 14 806
一个人的身影
一个人的身影 2020-12-04 04:48

I have a linkedserver that will change. Some procedures call the linked server like this: [10.10.100.50].dbo.SPROCEDURE_EXAMPLE. We have triggers also doing thi

14条回答
  •  南笙
    南笙 (楼主)
    2020-12-04 05:19

    You can find it like

    SELECT DISTINCT OBJECT_NAME(id) FROM syscomments WHERE [text] LIKE '%User%'
    

    It will list distinct stored procedure names that contain text like 'User' inside stored procedure. More info

提交回复
热议问题