Answers for "find the time when table was last accessed in sql server database"

SQL
0

sql last time database was accessed

SELECT d.name,
last_user_seek = MAX(last_user_seek),
last_user_scan = MAX(last_user_scan),
last_user_lookup = MAX(last_user_lookup),
last_user_update = MAX(last_user_update)
FROM sys.dm_db_index_usage_stats AS i
JOIN sys.databases AS d ON i.database_id=d.database_id
GROUP BY d.name
Posted by: Guest on June-16-2021

Code answers related to "find the time when table was last accessed in sql server database"

Code answers related to "SQL"

Browse Popular Code Answers by Language