Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-10-13
5
Medium Priority
?
1,030 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 38

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 150 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to take different types of Oracle backups using RMAN.

618 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