Breakdown of roles by user

  • Hi All,

    I am trying to write a script that pulls all the users for a db and then pulls their roles so output something like this:

      Database User: SD_Web_Service  NTgroup, db_owner, public         

      Database User: Datamir_Sup        NTgroup, db_datawriter, public         

      Database User: DM_DSN           SQL Login, db_ddladmin

    I am not sure where to start other than to pull the names from sysusers?? Any ideas?

  •  I used to use a number of queries against the system tables to derive this information but I found a link on this site to a very nice tool which does all this for you.  Here is the link to the artical:

    http://www.sqlservercentral.com/columnists/cmiller/dumpsqlpermissions.asp

     

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

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