Sql-server – SQL Databases Linked to applications


I have just become a DBA for a large company they are currently looking to decommission a 2008 R2 server.
Is there any way of being able to find out if the databases are still being used and by which application without taking the databases off line and seeing who yells that it's broken.

Thanks In Advance

Best Answer

A couple of relatively straight forward ways may be to create a logon trigger (it also talks about event notifications in that article), writing the login events to some audit table, or periodically query the sys.dm_exec_sessions DMV say in a SQL Server Agent job and record the information from that.