title: Tree of all dependencies in a SQL Server database
body: <p>I have to maintain an old project without documentation, and there is a database with a lot of tables and functions and stored procedures. I want to build a tree of dependencies between tables and stored procedures, for example, this procedure execs these procedures and uses these tables.</p>
  
  <ol>
  <li><p>Is there any tool that can help me</p></li>
  <li><p>If there is not, what is the start point for such algorithms? I mean that I can get source code of all procedures from database, and than parse it for all 'exec #', 'update #', 'insert into #' and so on. And in this case, what is the best way to solve this problem (regex maybe, or some special algorithms...)?</p></li>
  </ol>