Suppose that I have logged in to oracle database using user X, then user X creates some roles using
create role command. I want to know that is user X the owner of the roles? Can I select all roles created by user X?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
The roles in Oracle Database have no owner as well as directories have no owner.
When the user with
You can see what roles are assigned to which users querying
Also, a user cannot create a role if the role with the same name already exists. However you can audit role creation and granting. You can do that with AUDIT ROLE statement (if it was for some reason disabled with
Although a role does not have an owner, dba_role_privs shows both users and roles granted to a privilege.
Inner Join to dba_users to see only users with admin option on roles.
If you have the admin option over a role you can drop that role, even if you don't possess the drop role privilege or "own" the role, as in, you didn't create the role.