Solved

Explanation of How to Determine Active SQL Server Connections.

Posted on 2014-10-20
2
114 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 47

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

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…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

810 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