Identification of all related objects in a single SQL Server database - tables, views, procedures, functions, etc. etc. (triggers, synonyms and even more obscure obejcts) is a very difficult task (and almost impossible if you use dynamic SQL). The best solutions that I have seen are third-party utilities that make their way through the database, and I must imagine that this rudely causes the problem to analyze and verify everything.
I used a very impressive tool in SQL 7.0 / 2000 days ("SQL Cast", as I recall), but it doesn't seem to exist anymore. RedGate now has such a tool, SQL Dependency Tracker , but I have not used it.
source
share