Pregunta

I have a SQL function that is only called from inside another stored procedure. I have granted EXECUTE rights for the stored procedure that calls the function.

Do I need to grant EXECUTE permissions to the function as well?

EDIT

In response to the comment from @AaronBertrand

The function does not access any other objects in the database. It is used to build a string.

¿Fue útil?

Solución

If the problem is that your user can't execute it, try dropping and re-creating the function, and applying the appropriate permissions on the function itself and any object(s) it references. There may be a DENY hanging around, which will always trump GRANT.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top