DMV for application role?

  • 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

  • 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
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply