[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

Why do I have so many connections

I ran this command to find the number of connections

SELECT db_name(dbid) as DatabaseName, count(dbid) as NoOfConnections,
loginame as LoginName
FROM sys.sysprocesses
WHERE dbid > 0
GROUP BY dbid, loginame

Open in new window



Here are my results.  Why does the master have 18 open connections.  How does that happen.  I only use one database that is callled CAPRegisters
DatabaseName	NoOfConnections	LoginName
msdb	2	NT AUTHORITY\NETWORK SERVICE                                                                                                    
ReportServer	1	NT AUTHORITY\NETWORK SERVICE                                                                                                    
master	18	sa                                                                                                                              

Open in new window

0
al4629740
Asked:
al4629740
2 Solutions
 
Vijay Pratap SinghCommented:
These are not a concern to worry as its just socket connection for SA as it provide different connections per database and it will not create any issue.
0
 
Matt BowlerDB team leadCommented:
You should add:

and spid > 50

to you where clause to filter out the sql internal and background processes.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now