tags:

views:

50

answers:

1

Hi

I've inherited a development with nearly 800 tables. I need to produce reports that span multiple tables. I'm usong the likes of SQL Dependency Tracker to help me find the required tables, but even this is painful.

Do you know of a app that I can say [start table] [end table] now find me all the tables inbetween?

Any ideas? Thanks

+1  A: 

I realize you are looking for a finished app to do the job, but in case you do not find one better than SQL Dependency Tracker, here is a tip to get you started writing your own:

For SQL Server, Listing SQL Server Object Dependencies describes 4 different ways to programmatically determine immediate neighbors. SQL script to list table dependencies provides a complete script to do this in Oracle (though unfortunately this Oracle solution requires membership in Experts Exchange to see the answer.)

These allow you to get immediate neighbors so you would need additional coding to repeat-and-search until you get to the final target you wish to connect.

msorens
Another, way you can do this is to leverage the MS Visio tool. This will build a complete ER diagram for you given the connection to the database. I am not sure however if it will allow you to create diagrams for only a few tables.
Nikhil
The link above gives you the scripts and stored procedures that are available in SQL server for getting dependencies. There is also a SQL Diagram feature in the SQL Client Tools (for SQL 2000 it was in the enterprise manager for SQL 2005 and above I think it's in SSMS) that provided a pretty comprehensive GUI for selecting a subset of tables and displaying the ER diagram. You could even specify the number of levels you wanted to go. You needed admin access to the DB to do this.
Nikhil