Explanation of How to Determine Active SQL Server Connections.

I have noticed that the server connections queried with @@Connections in SQL Server 2008 R2 continues to increment. However is executing a script against UserId the connections count stays stable. These connections increment or decrement as a database front-end program is opened or closed as expected. My question is why does the server connections count continue to increment when no other applications are accessing the server and why do they never decrement unless the server is restarted. Below is a picture of the SQL script and results to further explain this. This SQL server has 21 databases that are not connected to any front-end application.

The connection count for server (@@Connections) has gone as high as 3000 for me personally and a high as 649 million for one of our users. This user does use SQL Server for many other purposes other than our front-end application too.
DB-Connections.jpg
gcook17Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Vitor MontalvãoConnect With a Mentor MSSQL Senior EngineerCommented:
You are confusing @@CONNECTIONS with Processes.
From MSDN @@CONNECTIONS:
Returns the number of attempted connections, either successful or unsuccessful since SQL Server was last started.
0
 
gcook17Author Commented:
OK thank you.
0
All Courses

From novice to tech pro — start learning today.