February 1, 2011 at 5:10 pm
Hi all,
we have a scenario where we want to get the users who have the application roles, when I tried to get the roles for database roles it was easy for me to get but I wasn't able to get the roles.
Is there any DMV where I can get query against to get if there are applicationroles present in the database.
The DMV I used to get the database roles is, "sys.database_role_members"
Can any one let me know how can I get these roles.
Thanks,
Ravi
February 1, 2011 at 5:27 pm
Try this:
select * from sys.database_principals
where type = 'A'
Reference:
http://msdn.microsoft.com/en-us/library/ms187328(v=SQL.90).aspx
----------------------------------------------------------------------------
Sacramento SQL Server users group - http://sac.sqlpass.org
Follow me on Twitter - @SQLDCH
----------------------------------------------------------------------------
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply