Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all the roles existing in Oracle database?

Tags:

oracle

How to list all the roles existing in Oracle database?

I have been searching in the tables :

ROLE_TAB_PRIVS ROLE_SYS_PRIVS ROLE_ROLE_PRIVS  SELECT * FROM ROLE_TAB_PRIVS WHERE ROLE = 'ROLETEST'; 

but I can't find a role that I have just created.

like image 976
Thomas Carlton Avatar asked Dec 22 '13 02:12

Thomas Carlton


People also ask

How can I see all roles in Oracle?

Querying DBA/USER Privilege Views A database administrator (DBA) for Oracle can simply execute a query to view the rows in DBA_SYS_PRIVS , DBA_TAB_PRIVS , and DBA_ROLE_PRIVS to retrieve information about user privileges related to the system , tables , and roles , respectively.

Where are Oracle roles stored?

Unlike schema objects, roles are not contained in any schema. Therefore, a user who creates a role can be dropped with no effect on the role. Roles are designed to ease the administration of an end-user system and schema object privileges and are often maintained in Oracle Internet Directory.

How do I see what roles are assigned to a schema?

select * from dba_role_privs where grantee = 'SCHEMA_NAME'; All the role granted to the schema will be listed.


1 Answers

Got the answer :

SELECT * FROM DBA_ROLES; 
like image 193
Thomas Carlton Avatar answered Oct 04 '22 17:10

Thomas Carlton