Solved

Explanation of How to Determine Active SQL Server Connections.

Posted on 2014-10-20
2
116 Views
Last Modified: 2014-10-21
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
0
Comment
Question by:gcook17
2 Comments
 
LVL 48

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40393791
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
 

Author Comment

by:gcook17
ID: 40394562
OK thank you.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question