Unix Technical Forum

privileges on functions

This is a discussion on privileges on functions within the DB2 forums, part of the Database Server Software category; --> I created one function and wish to assign it to some users. however, even though "grant execute on function" ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-02-2008, 07:58 PM
uwcssa@gmail.com
 
Posts: n/a
Default privileges on functions

I created one function and wish to assign it to some users. however,
even though

"grant execute on function" succceeded, that user can still not use
it. i am wondering if
functions do not have transferable rights?

i am using v9.1. thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-03-2008, 05:58 AM
Dave Hughes
 
Posts: n/a
Default Re: privileges on functions

uwcssa@gmail.com wrote:

> I created one function and wish to assign it to some users. however,
> even though
>
> "grant execute on function" succceeded, that user can still not use
> it. i am wondering if
> functions do not have transferable rights?
>
> i am using v9.1. thanks


Assuming you committed the GRANT, the user should be able to execute
the function just fine. Are you sure they're executing your function
and not a similarly named function in a different schema? (or an
overloaded version of the function - though I assume that's not the
case as you explicitly stated "one" function)

Not sure what you mean by "transferable rights" though?

Cheers,

Dave.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-04-2008, 07:49 AM
--CELKO--
 
Posts: n/a
Default Re: privileges on functions

Does the function do something for which the user does not have
privileges?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-04-2008, 07:49 AM
Serge Rielau
 
Posts: n/a
Default Re: privileges on functions

Couple of thoughts:
1. A function to which a user does not have EXECUTE privilege is simply
invisible to that user. That is teh error you will be getting is a
function not found. (In hindsight I think this behavior was a really bad
idea....)
What that means is that you should consider the possibility that the
function is simply not found. So: Is the schema on the PATH? Are the
arguments promotable to the parameters (e.g. 'hello' (a VARCHAR) is not
promotable to CHAR), right number of parameters in the right order?
2. If you have GRANTed a privilege to a GROUP to which the USER is a
member then DB2 will NOT consider it if th einvocation is nested in
another object (such as a view or trigger) because DB2 can't track when
the user gets removed from the group. In DB2 9.5 use ROLEs instead of
GROUPSs

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:22 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com