Get info of all users with instance

  • Hi,

    I need to find which user\login lately accesses SQL databases. we are trying to remove any unused logins which are not accessing databases for more than 6 months but no idea who is accessing and when.

    Can someone share any scripts.

  • The Database log will show users, however its hard to work with so I suggest something else. Remove all all individual users and replace them with active directory groups. Then users move in and out of the groups without all the hassle on SQL security. It will take time to organize those groups, but it will save tons of time in the future adding and removing individual users so in the long run it saves.

    Not what you asked for, but hope it helps.

  • You could create a logon trigger to capture which logins are being used, and how often.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

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

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