I gave him first solution. He can use SSMS feature to find dependent objects.
Step1: to get this you can go to required table --> right click -- > click view dependcy
Step2: On clicking view dependency you can see dependent procedures and tables of mentioned table or procedure.
After some time developer came to me and thanks for this help but he wants to know some SQL for this work.
I have given him following query that retun all dependent procedures that contains its required table name or column name. This query also return those procedures which use required table in a dynamic statement.
Using first query he can get all procedures. While 2nd and 3rd query return required table or column name from mentioned database.
HOPE! THIS BLOG HELPS
1 comment:
Thanks for your contribution, i red many blogs but not found any query version to find table dependencies.its work fine
Post a Comment