Solved

Explanation of How to Determine Active SQL Server Connections.

Posted on 2014-10-20
2
111 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 45

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now