Solved

How can I list the privileges assigned to a user in Oracle 10g?

Posted on 2008-10-13
5
1,026 Views
Last Modified: 2008-10-13
Please explain to me how do I list out the privileges currently assigned to the user.
0
Comment
Question by:ankurnigam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22700646
select * from user_tab_privs
where grantee in ('PUBLIC', :USERNAME);

select * from user_col_privs
where grantee in ('PUBLIC', :USERNAME);

select * from user_sys_privs
where USERNAME in ('PUBLIC', :USERNAME);
0
 

Author Comment

by:ankurnigam
ID: 22701064
There are no rows in any of the tables you listed.

Logically it should not happen, when I have granted the privileges to the user.

Or am I missing something?
0
 
LVL 1

Expert Comment

by:stupsnose
ID: 22701242
try the posted selects of Geert with table names all_... instead of user_...
0
 
LVL 1

Accepted Solution

by:
stupsnose earned 50 total points
ID: 22701247
try
select * from user_role_privs
where grantee in ('PUBLIC', :USERNAME);

to get the roles a user is granted
0
 

Author Comment

by:ankurnigam
ID: 22701654
I got the roles the user is assigned to and thereafter I fetched the privileges attached to the roles.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question