1.

How To Find Out What Roles A User Have, And If Those Roles Have The Correct Privileges?

Answer»

To verify whether a user was granted a privilege, or a role was granted a privilege, you can use the following (for this example, RMSDEV101A is USED): 

Check to see if the user was granted the SYSTEM privilege directly: 

SQL> desc dba_sys_privs 

SQL> select * from dba_sys_privs where grantee = 'RMSDEV101A';

If the result for the above QUERY does not show the system PRIVILEGES granted for the user, check to see what roles the user was granted, and then check to see what privs has been granted to that role:

SQL> desc dba_role_privs 

SQL> select * from dba_sys_privs where grantee = 'DEVELOPER'; 

Whenever you want to see what roles and system privileges a user has and what system privileges are assigned to specific roles, you should look at the dba_role_privs and dba_sys_privs views. 

From a ReSA perspective a user should have the following privileges to create totals and views: 

  • Create any view 
  • Create any procedure 
  • Alter any procedure 
  • Drop any view 
  • Drop any procedure

To verify whether a user was granted a privilege, or a role was granted a privilege, you can use the following (for this example, RMSDEV101A is used): 

Check to see if the user was granted the system privilege directly: 

SQL> desc dba_sys_privs 

SQL> select * from dba_sys_privs where grantee = 'RMSDEV101A';

If the result for the above query does not show the system privileges granted for the user, check to see what roles the user was granted, and then check to see what privs has been granted to that role:

SQL> desc dba_role_privs 

SQL> select * from dba_sys_privs where grantee = 'DEVELOPER'; 

Whenever you want to see what roles and system privileges a user has and what system privileges are assigned to specific roles, you should look at the dba_role_privs and dba_sys_privs views. 

From a ReSA perspective a user should have the following privileges to create totals and views: 



Discussion

No Comment Found