Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Remove privilege From DBA_SYS_PRIVS table

YashSonaniOct 17 2022

Hi All,
I am running below query, and I am getting all most all the privileges like select, update, insert, delete, drop, etc (255 Entries). I would like to remove all the privileges except select. How can I do that?
`SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE = 'UserX' ORDER BY PRIVILEGE;`

For Reference,
When I execute below query, I got only two GRANTED_ROLE => CONNECT and RESOURCE.
`SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE= 'UserX';`

When I execute below query, I got no entries.
`SELECT * FROM ROLE_ROLE_PRIVS WHERE ROLE IN ('CONNECT', 'RESOURCE');`

When I execute below query, I got entries with SELECT privilege only,
`SELECT * FROM DBA_TAB_PRIVS WHERE GRANTEE = 'UserX';`

This post has been answered by YashSonani on Oct 21 2022
Jump to Answer
Comments
Post Details
Added on Oct 17 2022
5 comments
1,626 views