I have a database with hundreds of queries created by many people over the years. Now I can investigate for each query if any SSRS report, application for the database or other queries are using each query manually, but as everyone can imagine this is penal labor...
So I found some articles in the web about unused tables or procedures. So as list all queries with
SELECT * FROM sys.all_objects WHERE type = 'V' AND is_ms_shipped = 0
Can I somehow find out if this query is ever been called in a period of time?
E.g. since start which I can get via
SELECT sqlserver_start_time AS LastSQLServiceRestart FROM sys.dm_os_sys_info
then I would take this date and list all views that aren't used in this time until now.