Object references outside of the database

For our datawarehouse we have the need to find all dependent objects from a table. In our environment we need to find all stored procedures and functions in other databases (on the same server) that are using one specific table in our RAW database. 

Answers

  • Hello @Gunn0r ,


    Support for cross-database dependencies was added back in version 2. (release notes). Were you having trouble with this feature? Are there any questions regarding this?


    Kind regards,


    Pete Ruiz
  • Gunn0rGunn0r Posts: 2 New member
    Hi Pete_Ruiz!
    Thank you for your answer. 
    Imagine the following scenario: I have a DB A with a table [A].[dbo].[a_table] and a second DB B and third database C which both have stored procs (B.dbo.usp_1, C.dbo.usp_2) that reference on [A].[dbo].[a_table].
    So is it possible to add [A].[dbo].[a_table] to my project and find all references of that table in other databases, namely B.dbo.usp_1 and C.dbo.usp_2

    The other way around adding B.dbo.usp_1 and finding the reference on [A].[dbo].[a_table] is fine and i managed to to this. But is it possible to find all occurence of that table on my server?

    BR Gunnar 
  • Hello @Gunn0r ,

    Thanks for clarifying the scenario. I just tested this to be sure and I can confirm that this is not possible, unfortunately. You can resolve the external references for the objects making the references but cannot add a table and see what external objects are referencing it.


    You can add this to our UserVoice forum as a feature request which is monitored by our Product Managers at the link below.

    https://sqldependencytracker.uservoice.com/forums/164804-general


    Please let me know if you have any further questions.


    Kind regards,


    Pete Ruiz

Sign In or Register to comment.