Identify last database Accessed | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Identify last database Accessed

I have a number SQL database on my sql server, although I would like to know if these databases are still in production. It is possible to see and identify last database access time and date. I’m unable to find the T-SQL syntax command.
I don’t think there is any direct way…
It is only possible through sql trace/profiler….
But check sys.dm_exec_query_stats DMV you should get some info…
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

See this DMV too sys.dm_exec_sessions . Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
By the way check the trace files in the log folder you should see some info but you will only 5 files each 20MB…
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

]]>