Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count the connections 1

Status
Not open for further replies.

anhtri

Programmer
Sep 28, 2001
21
0
0
how to know that "how many connections are there that connected (at the moment) from different users to a specified database?"
Many thanks to any help
 
in windows performance monitor
add counter
choose sql server:general statistics
u will monitor the number of connection connected to ur database
 
thank you very much
but i didnt mean to monitor it, i write a VB program connect to a SQL Server database, and i just want to control the number of connections to that database throught my program
Pls help me
 
i think you will have a better chance to get answer of your question if you post it in VB forum.
 

Select Count(*) As UserCnt
From master.dbo.sysprocesses p
Inner Join master.dbo.sysdatabases d
On p.dbid=d.dbid
Where d.name='dbname' Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
you are very good Terry
thank you very very much ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top