is there a quick way to get a list of roles a user is a member of?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • IndianaJonesWB

    is there a quick way to get a list of roles a user is a member of?

    What I'm looking for is a list of roles a particular user is a member
    of.

    the closest I've found so far is sp_helprolememb er without any
    arguements. but this gives me all the roles and all the users. I want
    this same list filtered on a specific user.
    something like sp_??? 'user'

  • John Bell

    #2
    Re: is there a quick way to get a list of roles a user is a member of?

    Hi

    Maybe:

    CREATE TABLE #UserRoles (
    DbRole sysname,
    MemberName sysname,
    MemberSID varbinary(85) )

    INSERT INTO #UserRoles (
    DbRole ,
    MemberName ,
    MemberSID )
    EXEC sp_helprolememb er

    SELECT * FROM #UserRoles WHERE MemberName = 'dbo'

    John

    "IndianaJonesWB " <jryan@lcra.org > wrote in message
    news:1103735940 .367536.213730@ c13g2000cwb.goo glegroups.com.. .[color=blue]
    > What I'm looking for is a list of roles a particular user is a member
    > of.
    >
    > the closest I've found so far is sp_helprolememb er without any
    > arguements. but this gives me all the roles and all the users. I want
    > this same list filtered on a specific user.
    > something like sp_??? 'user'
    >[/color]


    Comment

    • IndianaJonesWB

      #3
      Re: is there a quick way to get a list of roles a user is a member of?

      Perfectamundo! Thanks

      Comment

      Working...