Solved

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

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

Expert Comment

by:Geert Gruwez
Comment Utility
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
Comment Utility
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
Comment Utility
try the posted selects of Geert with table names all_... instead of user_...
0
 
LVL 1

Accepted Solution

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

to get the roles a user is granted
0
 

Author Comment

by:ankurnigam
Comment Utility
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.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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.

763 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

7 Experts available now in Live!

Get 1:1 Help Now