November 23, 2006 at 9:25 am
Hi
I am having sql 2000 as well as sql 2005 database setup.
i have Applications which are connecting to the databases
I want to know how to monitor the number of connections made to the data base.
Kindly provide some advice
Thanks in advance
November 23, 2006 at 9:31 am
I have no idea if this will work for 2005 :
Select * from master.dbo.sysperfinfo where counter_name = 'User connections'
EDIT 8000
November 23, 2006 at 10:06 am
For 2005 you can use this to get what you're looking for
Select * from sys.dm_exec_sessions
November 23, 2006 at 6:29 pm
hi
Thank you for your answer.
I have one more query on the same.
My applications are spilt across many paths ie path1 path2 path3 etc ..
Basically you can think of it as many applications of the same kind querrying the database.
i need to monitor how many connections from each path are made to the database
Please help
Thanks
Anu
November 24, 2006 at 4:30 am
Does the application tell the server which 'path' it's using, or is coming from?
Or is there some other way you can identify that 'path'?
If there is, then that is the info you want to look for.
If not, I guess you won't know, right?
/Kenneth
November 24, 2006 at 6:52 am
In the connection string you can set an application name, which you can retrieve from sql server (when doing auditing in a trigger or SP). But I don't know if stats are kept per application.
Why do you need to do this exactly?
November 24, 2006 at 6:54 am
Just thaught of another way :
Set the application name in the connection string.
Then fire up the profiler with the trace of active connections only. Save the results to a table and then you'll be able to report on a per application basis.
November 25, 2006 at 10:49 am
"Select * from master.dbo.sysperfinfo where counter_name = 'User connections'"
this only works for Window NT 4.0 & doesn't give any connection info.
November 27, 2006 at 7:04 am
Thanx for letting me know. Do you know any other alternative than my trace idea?
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply