title: SQL Server Dependencies
body: <p>Is there an easy way to chase down table/stored procedure/function dependencies in SQL Server 2005+?  I've inherited a giant application with lots of tables and even more stored procedures and functions that are long and interlinked.  </p>
  
  <p>At the end of the day is there a way to build a dependency tree?  Ideally what I'm looking for goes in both directions:</p>
  
  <p><strong>For a table/procedure - what depends ON it?</strong>:  Show me all the stored procedures that eventually reference it (ideally in a tree view such that sub procedures nest out to the bigger procedures that call them)</p>
  
  <p><strong>For a procedure - what does IT depend on?</strong>:  Show me all the procedures and tables that a given procedure will (or could) touch when running.</p>
  
  <p>It seems this tool shouldn't be that hard to make and would be incredibly useful for DB maintenance generally.  Is anyone aware of such a thing?  If this doesn't exist, why the heck not?</p>
  
  <p>The built-in functionality in Management Studio is nice but the information does not appear to be complete at all.</p>