DB2 UDF Permissions

Posted by WernerCD on Server Fault See other posts from Server Fault or by WernerCD
Published on 2011-06-22T14:16:21Z Indexed on 2011/06/23 0:24 UTC
Read the original article Hit count: 510

Filed under:
|
|

I have a custom function that I'm working on... the problem I'm having is simple: Permssions.

example function:

drop function circle_area
go

CREATE FUNCTION  circle_area (radius FLOAT)
RETURNS FLOAT LANGUAGE SQL
BEGIN
     DECLARE pi FLOAT DEFAULT 3.14;
     DECLARE area FLOAT;

     SET area =  pi * radius * radius;
     RETURN area;
END
GO

if I then log out of my "admin" account... and log into test account I get a "Not authorized" error when I try to run something "Select circle_area(foo) from library.bar".

I can log into iSeries Navigator, navigate to schema > functions > permissions and change the permission for public from Exclude to All. bam it works.

How do I grant permission to all, either in the CREATE FUNCTION or after?

© Server Fault or respective owner

Related posts about permissions

Related posts about db2