Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: How to check if a database is being used?????

    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

Viewing post 1 (of 1 total)