Solved

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

Posted on 2009-04-06
3
1,117 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
[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
3 Comments
 
LVL 9

Accepted Solution

by:
MarkusId earned 250 total points
ID: 24075562
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
ID: 24075563
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
ID: 31566934
Many thanks for having helped me ;-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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‚Ķ
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

628 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