January 17, 2007 at 11:29 pm
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
January 17, 2007 at 11:50 pm
Negative.
MohammedU
Microsoft SQL Server MVP
January 18, 2007 at 12:04 am
Thanks. Just curious, do you know if this is available in SQL Server 2005 then?
January 18, 2007 at 5:18 am
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
January 18, 2007 at 7:07 am
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