Mega Code Archive

 
Categories / Oracle PLSQL / User Previliege
 

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  /