select o.type_desc type, o.name
from sys.OBJECTS o
left join sys.sql_expression_dependencies ref on ref.referenced_id = o.object_id
left join sys.OBJECTS o2 on o2.object_id = ref.referencing_id
where o2.name is null
and o.type_desc not in ('SYSTEM_TABLE','SQL_TRIGGER','INTERNAL_TABLE','SERVICE_QUEUE','TYPE_TABLE')
and o.type_desc not like '%CONSTRAINT%'
order by o.type_desc, o.name