root> su - oracle
root> export ORACLE_SID = hrms
root> sqlplus / as sysdba
SQL> startup
SQL> select * from all_users;
SQL> select * from dba_roles;
SQL> select * from role_sys_privs where role = 'ROLE1';
SQL> select * from dba_role_privs where grantee = 'VENU';
To see all the roles of the user.
SQL> create role role2;
SQL> grant role1 to role2;
SQL> select * from role_sys_privs where role = 'ROLE2';
To see the privileges of a role.
but no rows selectes.
SQL> desc role_role_privs;
SQL> select * from role_role_privs where role = 'ROLE2';
To see the roles that were granted to other roles.
If we revoke the privileges from role1 then role2 privileges will be automatically revoked.
No comments:
Post a Comment