Home All Groups Group Topic Archive Search About
Author
14 Sep 2006 5:44 PM
Joshua Andrews
I know that a user must have permissions to call a UDF directly, just
like they must have permissions to EXEC a stored procedure.

However, if a UDF is called from within a stored procedure, and the user
has permissions to the SP, does the user also need direct permissions to
the UDF as well to successfully execute the stored procedure?

Thanks,

Josh

Author
14 Sep 2006 6:28 PM
Warren Brunk
The user does not need special permissions on the functions.  If he has exec
on the procedure he can execute the procedure regardless of access to the
objects in it. A caviat to that is if you are using federated databases and
you try to access another DB inside of the procedure the user will need
access to the other DB.
In fact lets say there was a view that you are selecting from the in the
proc, and that user is denied all rights to that view, the user can still
exececute the procedure and see the contents of the view. This way you can
lock access to specific objects but allow access through a procedure.

does that answer your ?

thanks,

--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/


Show quote
"Joshua Andrews" <jrandrew@nospam.hotmail.com> wrote in message
news:%23NB5yVC2GHA.968@TK2MSFTNGP03.phx.gbl...
>I know that a user must have permissions to call a UDF directly, just like
>they must have permissions to EXEC a stored procedure.
>
> However, if a UDF is called from within a stored procedure, and the user
> has permissions to the SP, does the user also need direct permissions to
> the UDF as well to successfully execute the stored procedure?
>
> Thanks,
>
> Josh
Author
14 Sep 2006 6:40 PM
Alexander Kuznetsov
Joshua,

also google up "broken ownership chain"

AddThis Social Bookmark Button