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.
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.
SET NOEXEC and PARSEONLY: Checking a Script Without Running It
Use PARSEONLY and NOEXEC to inspect scripts without executing them, understand deferred references, and check existing module dependencies.







