Solved

find out privileges

Posted on 2014-04-09
6
316 Views
Last Modified: 2014-06-10
How will I find out the all the privileges, roles related to a uses in one script which has to be spooled in a text.
0
Comment
Question by:tonydba
[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
6 Comments
 
LVL 23

Accepted Solution

by:
David earned 250 total points
ID: 39990563
Perhaps:

set heading off
set pages 0
set long 9999999
spool on
select dbms_metadata.get_granted_ddl('ROLE_GRANT', user)  
from dual;
select dbms_metadata.get_granted_ddl('SYSTEM_GRANT', user)  
from dual;
select dbms_metadata.get_granted_ddl('OBJECT_GRANT', user)  
from dual;
spool off

Note this excludes privileges granted to a ROLE, or to PUBLIC.
0
 
LVL 16

Assisted Solution

by:Wasim Akram Shaik
Wasim Akram Shaik earned 250 total points
ID: 39991056
Check out the script provided by timhall,

http://www.oracle-base.com/dba/script.php?category=script_creation&file=user_ddl.sql


it has everything you need
0
 
LVL 15

Expert Comment

by:Devinder Singh Virdi
ID: 39992054
Another method: Use of USER tables

select * From user_sys_privs;
select * from user_tab_privs;
 select * from user_role_privs
0
 
LVL 22

Expert Comment

by:Steve Wales
ID: 40124041
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

732 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