How can i check to see how many connections are connected to the server?? not users just connections. I am testing some VB code and what to see if my code is only connecting once or multipule times.
You could check for connections by a specified program.
Select * From master..sysprocesses
Where program_name='MyVBProg'
Or by a login name.
Select * From master..sysprocesses
Where loginame='dvannoy'
BTW: You will nearly always find that VB programs open more than one connection to SQL Server even though the program only performs one open statement. Terry L. Broadbent - DBA
Computing Links:
tlbroadbent Your right about VB opening more then one connection to the DB. I noticed that yesterday when I was messing with sp_who. It will leave connections open when you do a transaction.I had 3 connections open then after a few minutes it will drop and go to a sleep status then showing only one connection. Thats interesting why it does that. I guess it doesnt matter much, I was just trying to manage LAN traffic and not bog down the server much. with 30-50 people hitting the DB I was getting worried.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.