audit logon ids?

  • I posted this query sometime back .I am posting back again. 

    I want to monitor a few user logons and want do find out

    a) how many times they logged into the server for a given day?

    b) duration of time period each time they logged into the system?

     

    for (eg)  If  user   Juser logged into the sqlserver 2 times

    and eachtime he stayed for 5 minutes the report should be

    logonname    logintime           logouttime          dbname

     

     Juser         2/8/2004 9AM     2/8/2004 10AM       pubs

    Juser           2/8/2004 11Am   2/8/2004 1.02Am    pubs

     

    Thanks in advance

    Sai

     

     

  • You can do so using SQL Profiler or the sp_trace functions. You'll need to use the Audit Logon and Audit Logout event classes. I should have a forthcoming article on this in the very near future. Hopefully, though, this gives you enough to get started before then. If not, private message me and I can walk you through doing so.

    K. Brian Kelley
    @kbriankelley

Viewing 2 posts - 1 through 1 (of 1 total)

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