Ask the Expert

Which roles/privileges are associated with a user?

Is there a way to find out which privileges and roles are associated to a specific user? Thanks for your help.

    Requires Free Membership to View

To see which system privileges are granted to the user SCOTT, use the following query:
SELECT privilege FROM dba_sys_privs WHERE grantee='SCOTT';
To see which object privileges are granted to the user SCOTT, use the following query:
SELECT owner,table_name,privilege FROM dba_tab_privs WHERE grantee='SCOTT';
To see which roles are granted to the user SCOTT, use the following query:
SELECT granted_role FROM dba_role_privs WHERE grantee='SCOTT';

This was first published in June 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: