Skip to Content
0

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

Feb 18, 2017 at 02:50 AM

154

avatar image

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).

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Lars Breddemann
Feb 18, 2017 at 03:45 AM
1

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you so much. I will try it.

0
Rory Assandey
Mar 09, 2017 at 12:23 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Atul Prabhudesai
Mar 11, 2017 at 09:29 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded