Sql-server – Method or Counter to track dropped connections in SQL Server

monitoringsql-server-2008

Our production server is running SQL Server 2008 (non r2).

I'm working on investigating and issue that appears to be networking or connection related, where our web server is losing or dropping connections to the database server.

It would assist me greatly to have a method or counter that I can use to track DROPPED connections to the SQL Server. Specifically, we want to know if the ODBC/ADO connection was forcibly closed by the CLIENT.

Conceivably we could also track when a query was cancelled by the client, which may give us the same information.

From my own research I don't see a way to track this with perfmon counters, but I'm not that familiar with them.

Best Answer

To give information on the performance counter side...

The only performance counters I know of that might help would be the ODBC counters for disconnects. SQL Server has a counter for killed connections but those are connections killed by SQL Server, not the client.

You would have to capture these at the client which you could use typeperf command to do this remotely. SimpleTalk has a good article about using this command.

The comment suggestion would be the more human way of doing things.