How to find SQL Object dependencies

From SQL Server 2008 and onward we gained a new DMV called sys.dm_sql_referenced_entities – this allows us to track object dependencies rather neatly. This covers all dependencies including cross-database and cross-server – it does not however make it easier to find the type of object being referenced (What does OBJECT_OR_COLUMN even mean?). I’ve written the…