Hi, we have a bunch of servers where we are trying to determine if they are still being used by people or applications.
How would I get when a database was last used or if it is still active?
Also, is it possible to tell the status of all users for a server, when they last accessed data on a database?
Thanks
few options here but it depends on many factors
- running SQL Profiler
- Create database trigger
- commercial tools that do this for you
- Look to see if there are audit columns : DateCreated, ModifiedBy, DateModified, ModifiedBy
are a few that I can think of.
SQL doesn't keep that kind of info. You can generally tell when a db has been used since the instance last started up. But even that won't work if the db has been stopped or detached during that time.
Thank You yosiasz and Scott.