Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2007
    Location
    Maryland, USA
    Posts
    8

    Unanswered: Looking for a statistic (report) 4 number of users hitting database? apart sp_who2

    What is the query to:
    Looking for a statistic (or history report) that shows how many staff are accessing our database each day. I am not sure if that is the same as number of cuncurrent users or not. Is there any other way other than
    sp_who2 tsql?
    Thank you so much

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Well, you should probably start by defining a few things for yourself. if User A logs into the system once in the morning, and works flat out in it until quitting time, is that similar to User B who logs in to check one thing, then logs out 2 minutes later?

    What if the application opens multiple connections for a user?
    What if the application uses Application Pooling, where many users can use the same connection?
    What if the application proxies the login as some application user?

    There is no one query to accomplish what you are looking for, and in fact, it may require a change in how people log into the system (i.e. to log the event specifically) in order to get the data you are looking for.

  3. #3
    Join Date
    Jul 2007
    Location
    Maryland, USA
    Posts
    8
    they are actually looking for the number of users on our intranet, so is there a way I can take a look at intranet application logins via:
    SELECT program_name, count(*)
    FROM
    Master..sysprocesses
    WHERE ecid=0
    GROUP BY program_name
    ORDER BY count(*) desc

    or is ther any way on databse side that cna give me more information
    Thanks for any infroamtion.

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Not on the database side. This is a job for the logs on your web server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •