Press "Enter" to skip to content

Find Object Dependencies

Manoj Pandey has pulled out the code used in Management Studio to get dependencies:

And here is a very lengthy (~900 lines) T-SQL Code that I generated from SSMS & SQL Profiler to check the same Dependencies of a Table in SQL Server 2014. You can also create a Stored Procedure and apply the Table & Schema as parameters.

You can just replace the Table & Schema in the first 2 lines and execute the code to check table dependencies

You might be able to optimize this script, but it’s nice to have a starting point.