Re: How to verify whether a user has been added to a database role?



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.

.



Relevant Pages

  • Re: How to verify whether a user has been added to a database role
    ... to insert the result into a temporary table and then verify. ... "Dan Guzman" wrote: ... you can also query from sys.database_role_members catalog view. ... SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Status Column in sysobjects table...SQL2000
    ... Please post a sample proc that demonstrates the ... >> Dan Guzman ... >> SQL Server MVP ... even though there are no compilation errors. ...
    (microsoft.public.sqlserver.programming)
  • Re: Keys out of order on page error
    ... Tibor Karaszi, SQL Server MVP ... "Peter The Spate" wrote in message ... >>We have found we have corruption in our db. ... >>After running DBCC CHECKDB the following error were ...
    (microsoft.public.sqlserver.server)
  • Re: Status Column in sysobjects table...SQL2000
    ... The QUOTED_IDENTIFER setting may or may not prevent the proc from being ... > Quoted_Identifiers and/or ANSI_NULLS it would not even compile. ... >> Dan Guzman ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: how to scramble data in a table
    ... >> accomplish this with set-based processing using CASE expressions. ... >> Dan Guzman ... >> SQL Server MVP ... >>> Does anyone have a neat way to scramble data in one table? ...
    (microsoft.public.sqlserver.programming)