Viewing post 1 (of 1 total)
list of dbs in use since last reboot
select a.name, a.dbid, max(last_user_seek), max(last_user_scan)
from sys.sysdatabases a
left outer join sys.dm_db_index_usage_stats b on a.dbid = b.database_id
group by a.name, a.dbid
July 15, 2010 at 5:52 am
#1193393