Solved

find out privileges

Posted on 2014-04-09
6
300 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
6 Comments
 
LVL 23

Accepted Solution

by:
David earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
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 how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

771 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

11 Experts available now in Live!

Get 1:1 Help Now