Find is an object is a dependency
J_Py1
Posts: 3 New member
Hi everyone,
I know SQL Dependency Tracker is great for finding the dependency of an object in SQL, but can the tool also find if a certain object IS a dependency for other objects?
For example. In SQL I right click on a stored procedure and click "View Dependency Diagram" This shows me what dependencies the roc has.
What I want is to view all of the objects which reference a certain table. Can this be done with Dependency Tracker?
Thank you
I know SQL Dependency Tracker is great for finding the dependency of an object in SQL, but can the tool also find if a certain object IS a dependency for other objects?
For example. In SQL I right click on a stored procedure and click "View Dependency Diagram" This shows me what dependencies the roc has.
What I want is to view all of the objects which reference a certain table. Can this be done with Dependency Tracker?
Thank you
Tagged:
Best Answer
-
Jon_Kirkwood Posts: 437 Gold 1
SQL Dependency Tracker will resolve External Differences, providing you enable the "Resolve All External References" option. This article provides more details around this
Sadly, SQL Dependency Tracker will not display dependencies for a column from a table. It will display the dependencies for the table but not down to the individual columns that make up the table.Jon Kirkwood | Technical Support Engineer | Redgate Software
Answers
Hi @J_Py1
Thanks for posting on Redgate forums regarding your question on dependencies in SQL Dependency Tracker.
Just to check with your questioning, apologies if misinterpreting your usage.
You can select objects and view where they are used and what uses them to track dependencies in two directions.
For your question:
What I want is to view all of the objects which reference a certain table. Can this be done with Dependency Tracker?
You could start a new project, load in the certain table or object and it will bring in dependencies on that object
Sample below has three objects where nonoffice_worker & office_worker both use loaner as a dependency
I can select either of them to see their dependency.
Alternatively I can select loaner and see it is used by both tables.
Does that help with your inquiry?
I believe I did as you suggested and it still only brings back the table in question. My objective here to to perform an impact analysis on what DB objects (stored procedures, views, functions) call a particular table.
I know for a fact (because I just created it) that there is a stored procedure that uses this one table, yet I am not seeing that dependency here.
However, If I run a trace on the stored procedure, I do see that it uses this table...This is not the direction I wish to view the dependencies. Often I am researching "what uses a table?", not "what tables does this use?"
Any further advice?
Thank you
@J_Py1
Sorry to hear this is not yet working for you.
Can I check a setting when you are adding objects.
Tools > Options > Diagram
Enabling 'Add objects that the selected objects are used by' and 'Add objects that the selected objects use'
There is also an Options button in the 'Add Objects to Project' window which links to this too
Having these options enabled and defining a level of connection should help get your dependence directions working