Last login time for a SQL Server login?

  • Hi,

         We know a Windows-authenticated login allows us to check its last login time through AD ... if we do not enable login success auditing or profiler trace, is there some straightforward way to track the last login time for a SQL Server authenticated login? Like is there any system table actually storing this information?

    Thanks,

    Del Piero

     

  • Negative.

     

    MohammedU
    Microsoft SQL Server MVP

  • Thanks. Just curious, do you know if this is available in SQL Server 2005 then?

  • i think its possible to get the last login details for connections that are alive in the server. we can use a join between the sysprocesses and syslogins tables to get the necessary info.

    just try with this query i really dont know how far this will help u.

    select distinct loginame,login_time from sysprocesses order by login_time desc

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Or you can use the undocumented extended stored procedure xp_readerrorlog, if you have auditing set up.

    John

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

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