Find procedures that reference databases missing from the instance, retain review coverage, and check dynamic SQL and synonyms separately.
Finding User Objects in master Created by Accident
Find user objects in master, inspect their purpose and dependencies, and prepare a safe move without removing deliberate server helpers.
What Breaks If I Drop This Column? sys.sql_expression_dependencies
Use sql_expression_dependencies and referencing-entity queries before a column change, then check module text and external callers for gaps.
Finding Dead Code: Stored Procedures Nobody Calls
Investigate dead code with cached procedure statistics, dependency checks and retained snapshots, then quarantine candidates before removal.
Object Dependencies in SSMS: SQL in Sixty Seconds #071
Object Dependencies in SSMS shows the references recorded in SQL Server metadata. This post adds T-SQL queries for both directions, tested on SQL Server 2025, and shows what the dialog cannot see: dynamic SQL, other databases and a table dropped under a view.
Finding What Depends on a Table
Finding What depends on a table starts with sys.dm_sql_referencing_entities, then checks cross-database code and dynamic SQL.
Decommissioning a Database: A Safe Checklist Before the Drop
Dropping an old database is a one-way door. Here is the short checklist I run first, with a demo you can paste into SSMS.







