views:

385

answers:

3

Is there a way of determining when a given user last logged into SQL Server? We are about to carry out an audit 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.

+1  A: 

Even if you have Login auditing for successful logins enabled, it depends how far back your SQL errorlogs go.

SQL Server 2000 Auditing

Mitch Wheat
Is there any way I can hook into the login process going forward? I am only interested in capturing active users going forward. Also, Is it possible to enable login auditing on SQL Server 2000, or is this only a later feature?
Adamski
It's a SQL Server 2000 feature
Mitch Wheat
A: 

Check out Logon Triggers (available since SQL Server 2005)

van
Poster clearly states SQL Server 2000 ...
Mitch Wheat
+1  A: 

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.

cindi