Reporting on Database Views by joining sys.sql_dependencies, sys.views and sys.schemas : sys.sql_dependencies « System Tables Views « SQL Server / T-SQL Tutorial






4>
5> SELECT DISTINCT
6> s.name SchemaName,
7> v.name ViewName,
8> OBJECT_NAME(referenced_major_id) ReferencedObject
9> FROM sys.sql_dependencies d
10> INNER JOIN sys.views v ON
11> d.object_id = v.object_id
12> INNER JOIN sys.schemas s ON
13> v.schema_id = s.schema_id
14> ORDER BY s.name, v.name
15> GO
SchemaName
         ViewName
                  ReferencedObject

------------------------------------------------------------------------------------------------------------------------
-------- ---------------------------------------------------------------------------------------------------------------
----------------- ------------------------------------------------------------------------------------------------------
--------------------------

(0 rows affected)
1>








27.15.sys.sql_dependencies
27.15.1.Reporting on Database Views by joining sys.sql_dependencies, sys.views and sys.schemas