Remove old/disabled Domain Logins

  • Since SQL doesn't realize when an account is either disabled or deleted from Active Directory does anyone know an easy way to identify the accounts in SQL and delete them. I'm looking for a good way to remove old SQL Domain Logins from a server. I'm positive there are many that no longer exist in our domain but are listed under the Security - Logins tree. It would be nice to remove these.

    Thanks in advance!

  • Run profiler for a while and catch all the active logins.

    Or run sp_who2 in frequent intervals and prepare the list of logins used.

    Seems silly???:-) is there any other best way to track all the active logins?

  • actually sp_validatelogins gives me exactly what i'm looking for but that is half of the battle, now i need to find a good way to remove them (if they own schemas, etc) and do that on somewhat of a schedule.

Viewing 3 posts - 1 through 2 (of 2 total)

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