Skip to Content
avatar image
Former Member

Query to find out if a privilege is assigned to an user

Is there any ready made query or procedure to find out if a privilege is assigned to an user. I need to find out the privileges assigned through GRANTED_PRIVILEGES and assigned through various roles (GRANTED_ROLES view).

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Feb 18, 2017 at 03:45 AM

    why don't you use the effective_privileges view instead ? It resolves privileges that have been granted directly or via roles.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 09, 2017 at 12:23 AM

    Hi Mashood,

    You could check the following views:
    - GRANTED_PRIVILEGES
    - GRANTED_ROLES

    SQL:
    SELECT * FROM GRANTED_PRIVILEGES WHERE GRANTEE = 'USER_NAME'
    SELECT * FROM GRANTED_ROLES WHERE GRANTEE = 'USER_NAME'

    Much more comprehensive scripts can be found in SAP Note 1969700.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 11, 2017 at 09:29 AM

    If you want this for one particular user, it is easy to check this from studio as well

    Add comment
    10|10000 characters needed characters exceeded