How do I list all table dependencies for a set of stored procedures easily?

JustinButlerJustinButler Posts: 1 New member
edited August 5, 2021 9:04PM in SQL Dependency Tracker
I have a large production database that has hundreds of sprocs and hundreds of tables.  I need to gather all of the tables needed for a specific set of sprocs (not everything).  What is the easiest way to do this?  If I add just stored procedures I am looking for it doesn't list all the tables like I would expect.  What am I missing?
Tagged:

Answers

  • Eddie DEddie D Posts: 1,807 Rose Gold 5
    Hi JustinButler, thank you for your forum post.

    According to https://documentation.red-gate.com/sdt/making-a-dependency-diagram when a user adds an object, it should also automatically add the objects that use that object - which is the problem since the tables won't use the sproc.  

    This means you most likely need to do this bit to have the process to add things that the object uses:
    1. By default, SQL Dependency Tracker also adds all objects that reference the objects you chose to add.
      To change this behavior:
      1. Click Options. 
        The Project Options dialog opens.
      2. Click the Diagram tab, and select the options you want.
        For information about the diagram options and what they mean, see Diagram options.
      3. Click OK.
    And in the diagram options tab the user will need to check the boxes on the bottom part so that objects the sproc uses/references are also added


    I hope the above answers your question.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.