August 21, 2002 at 10:32 am
Hello, I need to find a way to audit one of my older SQL server installations. What I would like to determine is the last accessed date of all my databases, has anyone done this before or have some hints or suggestions on how to proceed?
Thanks!!
August 22, 2002 at 12:33 am
log explorer is the one tool can help in that
or
I don't remember offhand but there is a undocumented dbcc command to see transaction log you can use that.
Cheers,
Prakash
Prakash Heda
Lead DBA Team - www.sqlfeatures.com
Video sessions on Performance Tuning and SQL 2012 HA
August 22, 2002 at 3:47 am
That also depends on how you have you log files setup and when the last backup may hve truncated. The best way is to use profiler to catch when a database is used saved to file or table. I would setup with minimul items to keep load on server fairly light.
Event tab use TSQL SQ::StmtStarting
Data Columns tab use
Event Class
DatabaseName or DatabaseID
SPID
StartTime
You can even set these up without having profiler on by using the xp_trace... items for SQL 7 or sp_trace... items for 2000, see BOL for more detail or check in other threads, I know I have posted some stuff on this in the past.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply