Detect last login date/time in SQL Server 2000
Is there a way of determining when a given user last logged into SQL Server? We are about to carry out an audi开发者_开发问答t of our database server and would like to delete users that are redundant.
Incidentally I'm interested in users at the server-level (i.e. Logins), not users of individual databases.
Thanks in advance.
I asked this question before...
sql-server-find-last-time-user-was-connected
I think I ended up running some sql that read master..sysprocesses for new logins at regular intervals over a period using sql agent.
Even if you have Login auditing for successful logins enabled, it depends how far back your SQL errorlogs go.
SQL Server 2000 Auditing
Check out Logon Triggers (available since SQL Server 2005)
精彩评论