getting all users accross all servers

  • Hello users,

    I have few sql servers in my organizations and quite a number of databases.

    How can I collect the info on ALL users\logins for all my databases.

    TIA

  • If you only want the userid - names , you can query against systables using Isql.

    These are queries against the systemtables; I do not recommend to make an habit of it.

    If you want me to, I can send you the script to just produce this overview.

    If you also want an authority overview I recommend using SQLDMO to script it all.

    I even think you find an example it sqldmo at this site.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • sp_helplogins

    Provides information about logins and the associated users in each database

    sp_helprotect

    Returns a report with information about user permissions for an object, or statement permissions, in the current database

    Julius.


    jsb

  • If it's something regular, I agree with DMO. I had a DMO script to check all logins on all servers for blank passwords at my last job. I can try and get it from someone there.

    Basically you want to query syslogins on all servers for the logins. You need a loop that can run isql/osql/DMO to connect to all of them and run the query. From there, you can save the information to a file to look at and dedup.

  • Thanks Guys, Thanks Steve!

    If you could get me the DMO script- that would be really nice.

    TIA

  • I have a script in the library here that captures all logins and dumps them to a file without using DMO. We have recently uncovered a DMO leak when called from the OA_ stored procedures.

    http://www.sqlservercentral.com/scripts/contributions/1159.asp

    enjoy.

    Wes

Viewing 6 posts - 1 through 5 (of 5 total)

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