How can I find out duration of log ins to SQLServer?

  • Dear all,

    I've a question, hope someone can give me some pointers. I've a client who's running a 3rd party application on MS-SQLSever 2000, the application is used by staff from different departments.

    He needs to find out how much time are spent by staff from different departments using the application.

    Is there a way to print some kind of summary report based on user ids or user roles of their log in time and duration?

    Thank you in advance,

    -Rolly

     

  • I have a similar process in one of my Databases here. You basically have to create a Table and record each users login time and logout time. Then you can create reports based on that info.


    Kindest Regards,

  • And to do that...

    you can right a proc that you run once a minute (or whatever) to look at the sysprocesses table for SPID, login_date, sid, and what ever else you want. 

    (That is if you can't mod your client application to do the tracking).

    Note that if the client does simple connect-select-disconnects some of these won't show up unless you up the frequency of the procedure.

  • You could use SQL Profiler and capture the Audit Logout events.  You would be able to see the login time and duration easily.

    SQL BAK Explorer - read SQL Server backup file details without SQL Server.
    Supports backup files created with SQL Server 2005 up to SQL Server 2017.

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

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