how to know how many users connected to sqlserver

  • hi can u pls tell how to Know how many users are connected and disconnected on the sqlserver by End of the day how to check this status

    total number of users conncected

    thanks in advance

  • I wrote a small script to see who was online at various points in the day. Nothing too crazy - I just ran the sp_who2 command and saved the results into a table.

  • Or may be you can execute below query to see total number of users/services connected to db.

    Select count(distinct hostname) from sys.sysprocesses;

  • What about using Performance Monitor to capture user connections all day long? It's the very best way I know to do this.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply