The EXECUTE permission is denied on the user-defined table types? The EXECUTE permission is denied on the user-defined table types? asp.net asp.net

The EXECUTE permission is denied on the user-defined table types?


I really hope you've solved this by now, seeing as the question is almost 4 months old, but in case you haven't, here's what I think is the answer.

GRANT EXEC ON TYPE::[schema].[typename] TO [User]GO


If your stored procedure is using dynamic sql, meaning the @sql is generated and then executed via exec @sql, you will need permission granted on the underlying tables.

One work-around is to modify to stored procedure to run as a different user. If you make it run as SELF, it will be ran underneath the creator of the stored proc, which is extremely dangerous. Still, if you have no other option:

CREATE PROCEDURE dbo.usp_DemoWITH EXECUTE AS SELF