Is there a connection history for SQL Server?

Is there a way to find the list of workstation that have connected to my SQL Server (2000) or to one of it's databases over its life time? Even a couple weeks would do for my purposes.

Is there a log file somewhere, or is it something I have to turn on?


You first need to enable connection auditing, which is not on by default. In Enterprise Manager, right-click on the server instance and choose properties. Then set the Audit Level option on the Security tab. When enabled SQL Server will log connection information into the SQL Server Log. You can also see connection information through SQL Server Profiler traces when auditing is enabled.

Keep in mind that the server instance has to be reachable for connection events to be raised, obviously.

If your server is not auditing connection attempts then you will have to revert to piecing together information from the Windows event logs.

Have a read through SQL Server 2000 Auditing on Technet.


You can explore the following views:

 select * from sys.dm_exec_sessions 
 select * from sys.dm_exec_connections

they keep connections from the time the server was started and are cleared upon restart