Solved

How can I fastly verify if an Oracle User has the GRANT CREATE ANY SYNONYM privilege?

Posted on 2009-04-06
3
1,069 Views
Last Modified: 2012-06-27
Hello,
I need to know if a particular Oracle User has the GRANT CREATE ANY SYNONYM privilege.

With what query can I do this investigation?
0
Comment
Question by:hc2342uhxx3vw36x96hq
3 Comments
 
LVL 9

Accepted Solution

by:
MarkusId earned 250 total points
Comment Utility
1. Query: direct grant
2. Query: grant via a role
select * from dba_sys_privs

where privilege = 'CREATE ANY SYNONYM' 

and admin_option = 'YES'

and grantee = 'Oracle User';
 

select a.* from dba_sys_privs a,

dba_role_privs b

where b.grantee = 'Oracle User'

and a.grantee = b.granted_role;

Open in new window

0
 
LVL 20

Assisted Solution

by:flow01
flow01 earned 250 total points
Comment Utility
select GRANTEE
FROM DBA_SYS_PRIVS
WHERE PRIVILEGE = 'CREATE ANY SYNONYM'
AND GRANTEE = &&USER
UNION
SELECT GRANTEE
FROM DBA_ROLE_PRIVS
WHERE GRANTEE = &&USER
AND GRANTED_ROLE IN
(
select GRANTEE
FROM DBA_SYS_PRIVS
WHERE PRIVILEGE = 'CREATE ANY SYNONYM'
)

0
 
LVL 1

Author Closing Comment

by:hc2342uhxx3vw36x96hq
Comment Utility
Many thanks for having helped me ;-)
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

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
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 information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to take different types of Oracle backups using RMAN.

744 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

16 Experts available now in Live!

Get 1:1 Help Now