Re: How to verify whether a user has been added to a database role
- From: Peter <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Aug 2008 17:58:01 -0700
Hi Dan,
I actually have already tried them. The sp_helprolemember will require me
to insert the result into a temporary table and then verify.
The sys.database_role_members view will need to join with
sys.database_principals view. I wonder why there is no built-in security
function for such basic operation.
"Dan Guzman" wrote:
Try:.
EXEC sp_helprolemember 'role_name_here'
In SQL 2005, you can also query from sys.database_role_members catalog view.
--
Hope this helps.
Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/
"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CC980BB7-8654-4F7C-84EB-0CB51E1F860C@xxxxxxxxxxxxxxxx
I want to validate whether a user has been added to a particular database
role. I cannot use the is_member function since it only works with the
current user.
- Follow-Ups:
- Re: How to verify whether a user has been added to a database role
- From: Dan Guzman
- Re: How to verify whether a user has been added to a database role
- References:
- Prev by Date: Re: How to verify whether a user has been added to a database role?
- Next by Date: Re: How to verify whether a user has been added to a database role
- Previous by thread: Re: How to verify whether a user has been added to a database role?
- Next by thread: Re: How to verify whether a user has been added to a database role
- Index(es):
Relevant Pages
|