Query the contents of stored procedures on SQL Server

后端 未结 4 838
时光取名叫无心
时光取名叫无心 2021-02-03 21:10

I am exploring a legacy database system and have very little knowledge of its internals. I would like to find all the stored procedures that invoke another stored procedure

4条回答
  •  清歌不尽
    2021-02-03 21:27

    SELECT OBJECT_NAME(object_id),
           definition
    FROM sys.sql_modules
    WHERE objectproperty(object_id,'IsProcedure') = 1
      AND definition    like '%Foo%' 
    

提交回复
热议问题