A seguir estão as maneiras que podemos usar para verificar as dependências:
Método 1:usando
sp_depends
sp_depends 'dbo.First'
GO
Método 2:usando
information_schema.routines
SELECT *
FROM information_schema.routines ISR
WHERE CHARINDEX('dbo.First', ISR.ROUTINE_DEFINITION) > 0
GO
Método 3:usando DMV
sys.dm_sql_referencing_entities
SELECT referencing_schema_name, referencing_entity_name,
referencing_id, referencing_class_desc, is_caller_dependent
FROM sys.dm_sql_referencing_entities ('dbo.First', 'OBJECT');
GO