sql last time database was accessed

Solutions on MaxInterview for sql last time database was accessed by the best coders in the world

showing results for - "sql last time database was accessed"
Felix
05 Aug 2017
1SELECT d.name,
2last_user_seek = MAX(last_user_seek),
3last_user_scan = MAX(last_user_scan),
4last_user_lookup = MAX(last_user_lookup),
5last_user_update = MAX(last_user_update)
6FROM sys.dm_db_index_usage_stats AS i
7JOIN sys.databases AS d ON i.database_id=d.database_id
8GROUP BY d.name
9
similar questions
queries leading to this page
sql last time database was accessed