sp_executesql , select permission Denied
Posted on 2014-07-26
I have table myTable(col1,col2,col3)
I denied the permmissions o this table as follows
DEny Update,delete,select,insert on myTable TO EndUser1
I created PROC
Create proc MyProc
Declare @SqlStatement varchar(50)
Set @SqlStatement ='Select col1,col2,col3 From myTable'
Grant Execute on MyProc to Enduser1
When EndUser1 exec MyProc
an error message comes up
The SELECT permission was denied on the object 'myTable',
I had to add
WITH EXECUTE AS OWNER to the procedure
My Question is there another solution let me to grant execute Proc. to the enduser1 without using WITH EXECUTE AS OWNER?