Skip to Main Content

SQL & PL/SQL

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!

SELECT * FROM DBA_ROLES ORDER BY 1; -- Does not show 'PUBLIC' as a role, why?

RedWhiteNBlueMar 30 2020 — edited Mar 30 2020

I'm experimenting with granting privileges to roles. I'm getting confused about some things. Firstly, as stated in my subject for this post, why isn't the 'PUBLIC' role listed as such when performing the query: SELECT * FROM DBA_ROLES ORDER BY 1;

Is it one of those things you just kinda have to remember? I can see in other queries that 'PUBLIC' is shown as the GRANTEE. For instance, when performing this query: SELECT * FROM USER_TAB_PRIVS; I can see 'PUBLIC' as the GRANTEE many many times.

Does the Oracle Database in general (I'm using XE 18.4.0.0.0 I believe) restrict the creation of the 'PUBLIC' role by an end-user as it might for restricting the creation of tables using keywords? I'm wondering if I tried creating the role myself in the past and I'm getting my user created role of 'PUBLIC' confused with the real one.

This post has been answered by Paulzip on Mar 30 2020
Jump to Answer
Comments
Post Details
Added on Mar 30 2020
7 comments
1,412 views