Unanswered: SQL for User and Group Permission Report
Due to the new Sarbanes-Oxley control requirements, I need to produce a report showing all users in a database, what group they are in and what permissions are assigned to the group. Can someone help me out with the SQL to produce this output?
I will be eternally grateful for any help you can provide.
Thanks! That is great information. How can I insert the results of the sp_heluser command into a table?
I realize that this is probably a very simple question but I cannot remember ever having tried this before.
good question, but reply is simple , if you look at sp_helpuser proc
data goes to #tmp table in all cases, all you have to do is to create dummy proc with the same contents of sp_helpuser , something like
sp_helpuser_byme and replace #tmp table with permanent table inside
and then in last line of your proc simply select all the rows from that table !!
This will be your user and group report then you can take each group from
this table and run sp_helprotect aginst that