Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Permissions Question

Posted on 2013-06-28
5
Medium Priority
?
384 Views
Last Modified: 2013-06-28
I'm trying to run a query that has a function in it.  When I run it i get a permissions error on the function.

when I look up the function, it says it has a "public" owner and an Object type of "synonym."

Forgive, but I'm not an Oracle person by trade.

Three questions...

1.  What is a synonym (in as plain of English as possible)?
2.  Any significance with it being "public"?
3.  I need to request permissions.  What do I ask the DBA to grant?
0
Comment
Question by:patriotpacer
[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
  • 2
5 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 39285550
1: Think of it as an alias.  The function has an owner (schema) associated with it.  Without a synonym, you would have to fully qualify it.

For example, the function, MYFUNC, is owned by BOB.

To select from it without synonyms:
select BOB.MYFUNC() from dual;

You can create a synonym that eliminates the owner:
create public synonym HIBOB for BOB.MYFUNC;

Then you can use:
select HIBOB() from dual;

2:  If can be a security concern.  ALL users have access to PUBLIC.

3:  You need to be granted execute on the function.

Give the example above, as BOB:
grant execute on MYFUNC to YOURUSERNAME;
0
 

Author Comment

by:patriotpacer
ID: 39285563
Thanks, slightwv.

>>Give the example above, as BOB:
>>grant execute on MYFUNC to YOURUSERNAME;

Is there a way to open it up and say give me access to ALL these types of functions instead of just one?
0
 

Author Comment

by:patriotpacer
ID: 39285565
Great explanation, by the way.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39285595
>>Is there a way to open it up and say give me access to ALL these types of functions instead of just one?

Yes but NOOOOOOO.

There is an EXECUTE ANY PROCEDURE priv but if I was your DBA, you would probably never get it unless you signed my paychecks.  It is a HUGE security hole since it would allow you to execute, well, ANY procedure.  Even the ones owned by SYS and SYSTEM.

http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9013.htm#sthref6232
0
 

Author Closing Comment

by:patriotpacer
ID: 39285602
>>Yes but NOOOOOOO.

Well I trust you like an Oracle brother, so i'll just ask for the one for now.


They need an A+ grade selection.

Thanks again.  You're a HUGE help.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

604 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