Solved

find out privileges

Posted on 2014-04-09
6
307 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to recover a database from a user managed backup

929 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

15 Experts available now in Live!

Get 1:1 Help Now