Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

896 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now