Skip to content

Instantly share code, notes, and snippets.

@tomfa
Created September 29, 2024 06:18
Show Gist options
  • Select an option

  • Save tomfa/1f949102c93e61db4d4f8c8826f9f40b to your computer and use it in GitHub Desktop.

Select an option

Save tomfa/1f949102c93e61db4d4f8c8826f9f40b to your computer and use it in GitHub Desktop.

Revisions

  1. tomfa created this gist Sep 29, 2024.
    6 changes: 6 additions & 0 deletions understand-unknown-db.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    SELECT
    referencing_schema_name, referencing_entity_name, referencing_id,
    referencing_class_desc, is_caller_dependent
    FROM
    sys.dm_sql_referencing_entities ('REPLACE_WITH_TABLE_NAME', 'OBJECT');
    GO