t***@yahoo.co.uk
2009-01-14 13:44:07 UTC
Hi,
I need a function/procedure to be able to determine if a user belongs
to a role either directly or via another role.
E.g. if User X is in Role B and Role B is a member of Role A, I need
some way if determining that User X implicitly belongs to Role A as
well as Role B.
Internally Sql Server 2005 is able to do this somehow as when you look
under the members for Role A, User X is listed as a member because
User X is a member of Role B.
However, I can't find any system views, functions or procedures that
can determine this. Do I really have to write a procedure which will
recurs down through all the role members and sub roles?
Many thanks.
Tristan.
I need a function/procedure to be able to determine if a user belongs
to a role either directly or via another role.
E.g. if User X is in Role B and Role B is a member of Role A, I need
some way if determining that User X implicitly belongs to Role A as
well as Role B.
Internally Sql Server 2005 is able to do this somehow as when you look
under the members for Role A, User X is listed as a member because
User X is a member of Role B.
However, I can't find any system views, functions or procedures that
can determine this. Do I really have to write a procedure which will
recurs down through all the role members and sub roles?
Many thanks.
Tristan.