Solved

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

Posted on 2008-10-13
5
1,023 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
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

792 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