From the course: Oracle Database 12c: Security

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Viewing existing roles and role grants

Viewing existing roles and role grants - Oracle Database Tutorial

From the course: Oracle Database 12c: Security

Start my 1-month free trial

Viewing existing roles and role grants

- [Narrator] Oracle provides us with several built in views, that allows us to monitor which roles have been created in our database, which roles were assigned to users, and what are the privileges that were granted to these roles. Let's see this in action. We'll start by connecting to our Orcl plug able database as the sysdba user. So I'll type sqlplus sys slash oracle at Orcl as sysdba. And now we'll run a query against the DBA underscore role, underscore privs view. You can find this query included in your exercise file. Let's copy the command, and paste it into our SQL plus window. By selecting the grantee and granted role columns as we did, we can see all roles that were granted to all users in our database. We can further filter this by a specific user or a specific role. For example, the second query in your exercise file filters for the roles that were granted to an individual user. The Scott database user. So let's copy this command, and paste it into our SQL Plus window. And…

Contents