Get two database users and show their roles. : Role « User Previliege « Oracle PL / SQL






Get two database users and show their roles.

   

SQL> REM
SQL> accept user_1 prompt 'Enter the first user: '
Enter the first user: accept user_2 prompt 'Enter the second: '
SQL> select grantee, granted_role from dba_role_privs where
  2  grantee in (upper('&user_1'),upper('&user_2'))
  3  order by granted_role, grantee
  4  /

   
    
    
  








Related examples in the same category

1.Creating a Role
2.define a role as a global role, which means that a user can only be authorized to use the role by an enterprise directory service.
3.use a password when a role is authorized by the database
4.Assign CONNECT and RESOURCE Roles
5.Assign Role to User
6.Drop Role
7.Output session roles from procedure
8.Grant Permissions to Role
9.Unassign Role