Skip to content

List Members in Each Database Role

We receiving have been working with auditors to provide list of SQL logins that exist in each database role defined. Here is a short script to return all the members of each group that can easily be copied into Excel and shared with auditors and anybody else looking for this information. It basically cursors through each role defined in the database and stores the result of sp_helprolemember into a temp table then displays the results.

Leave a Comment