December 9, 2010 at 10:51 am
Is it possible to find out when a user was connected last time?
December 9, 2010 at 11:01 am
If you are auditing connections, this ought to be in the Windows security log. Otherwise, I don't think so.
December 9, 2010 at 11:02 am
Thanks Steve, no i am not auditing the connections.
December 9, 2010 at 12:59 pm
If Default Trace is running, then a query similar to the one below can be used.
SELECT
LoginName,max(StartTime)AS LoginTIme
FROM ::fn_trace_gettable('C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\log_493.trc',0)
where LoginName='loginname'
GROUP BY LoginName
This information is dependent on the availability of the trace files, since they get rolled over.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply