Oct 3
Getting Object Dependencies via Sql Query - Sql Server
In case you want to get dependencies as Microsoft SQL Server Management Studio shows you but with a script instead of through the management studio gui.
/* all dependencies */
FROM sys.sql_dependencies d
INNER JOIN sys.objects o
ON d.object_id = o.object_id
INNER JOIN sys.objects p
ON d.referenced_major_id = p.object_id
/* user table dependencies */
FROM sys.sql_dependencies d
INNER JOIN sys.objects o
ON d.object_id = o.object_id
INNER JOIN sys.objects p
ON d.referenced_major_id = p.object_id
and p.type_desc = 'USER_TABLE'
Source:
