Hi Try the following: Link 1 : sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/[^] Or
DECLARE @StringToSearch NVARCHAR(MAX)
SET @StringToSearch = 'ENTER_SP_TO_SEARCH'
SELECT
[name],
(
SELECT
OBJECT_DEFINITION(obj2.object_id) AS [text()]
from sys.all_objects obj2
where obj2.object_id = obj1.object_id
FOR XML PATH(''), TYPE
) AS Obj_text,
[type] as ObjType
FROM sys.all_objects obj1
WHERE OBJECT_DEFINITION(object_id([name])) LIKE '%' + @StringToSearch + '%'
Thanks Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.