Execute stored proc fails with GRANT EXECUTE because of table permissions

混江龙づ霸主 提交于 2019-12-24 14:04:28

问题


I have created a stored proc on schema X that does a select across 10+ tables that are in schema X and Y.

I created a database role DBRole and added a new AD Group Login to it.

I thought all I needed to do was grant execute on x.MyStoredProc to DBRole, but I'm getting errors because of select permission..

Stored Procedure MYSCHEMA.MyStoredProc failed: The SELECT permission was denied on the object 'myTable', database 'Db', schema 'dbo'.

I wondered if it was because the tables its failing on are in a different schema but, doing a quick test that still worked..

Can anyone explain what I'm missing?

来源:https://stackoverflow.com/questions/33799241/execute-stored-proc-fails-with-grant-execute-because-of-table-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!