Find is an object is a dependency

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
Tagged:

Best Answer

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?




    Jon Kirkwood | Technical Support Engineer | Redgate Software
  • J_Py1J_Py1 Posts: 3 New member
    Hi @Jon_Kirkwood

    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


    Jon Kirkwood | Technical Support Engineer | Redgate Software
  • J_Py1J_Py1 Posts: 3 New member
    Thank you. It did help a bit, but its only showing me the objects which use this table that exist within the same database as the table. I have another procedure in a different database which uses my table, and that doesn't show in the diagram. Any thoughts?
Sign In or Register to comment.