Skip to content
Advertisement

How can I find the dependencies of a multiple objects in sql databases?

sp_depends will provide information for all dependent objects on a particular objects

But it is working for only single object , giving information about single object.

I want the information about multiple object,

How can I achieve it using sp_depend or any other way is there?

Advertisement

Answer

You want sys.sql_expression_dependencies. This how you get the list of all the dependencies.

Here is an example of how I use it:

 select sed.referenced_entity_name, sed.referenced_database_name,
        OBJECT_NAME(referencing_id) as ObjectName
 from sys.sql_expression_dependencies sed
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement