traughber
2/3/2018 - 4:14 PM

Search Stored Procedures for Specific Text

Search Stored Procedures for Specific Text

SELECT DISTINCT
       o.name AS Object_Name,
       o.type_desc,
	   m.definition
  FROM sys.sql_modules m
       INNER JOIN
       sys.objects o
         ON m.object_id = o.object_id
 WHERE m.definition Like '%TransactionIDGenerator%'
 order by 1


--Vew it vertically with this
sp_helptext '[sproc name]'