Solved

Explanation of How to Determine Active SQL Server Connections.

Posted on 2014-10-20
2
113 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 46

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

920 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

16 Experts available now in Live!

Get 1:1 Help Now