• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1033
  • Last Modified:

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

Please explain to me how do I list out the privileges currently assigned to the user.
0
ankurnigam
Asked:
ankurnigam
  • 2
  • 2
1 Solution
 
Geert GOracle dbaCommented:
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
 
ankurnigamAuthor Commented:
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
 
stupsnoseCommented:
try the posted selects of Geert with table names all_... instead of user_...
0
 
stupsnoseCommented:
try
select * from user_role_privs
where grantee in ('PUBLIC', :USERNAME);

to get the roles a user is granted
0
 
ankurnigamAuthor Commented:
I got the roles the user is assigned to and thereafter I fetched the privileges attached to the roles.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now