Hi,
I'm seeing more dependencies from SSMS but getting only few with below query that I'm using:
DECLARE @sp nvarchar(100)
SET @sp = N'dbo.PostDeploy'
-- Objects on which the stored procedure @sp depends
SELECT
referenced_schema_name,
referenced_entity_name,
referenced_minor_name,
referenced_id,
referenced_minor_id,
referenced_class,
referenced_class_desc
FROM
sys.dm_sql_referenced_entities(@sp, 'OBJECT')
Can you please provide correct script to find all dependencies for a Stored procedure?