• Hi Rubinasd,

    SID is a security identifier for the login, you can get the loginname from sys.syslogins table.

    Name is the UserName in the corresponding database, for the corresponding login.

    My take at arranging the script's output in the below fashion would be to create a "Pivot Table" in MS Excel spreadsheet and drop all the columns into "Row Area".

    Servername

    ........database name

    ..................database roles

    .........................users

    ........database name

    ..................database roles

    .........................users

    Kindest Regards,
    Shivaram Challa
    (http://challa.net - Home of the "Excel to CSV converter & Browsepad applications".)
    Forum Etiquette: How to post data/code on a forum to get the best help[/url]