Announcements
Hi,
I created an stored procedure for one screen custom with vs tools for Dynamics SL. The screen has a button, the when the user click in the button the application execute a stored procedure.
I used call sql for execute the stored procedure. If I do login with SYSADMIN the stored works fine, but the another users get the error "EXECUTE permission was denied on the object ".
The stored procedure has permission to the MSDynamicsSL and for the user [E8F575915A2E4897A517779C0DD7CE] because the sp has the instruction WITH EXECUTE AS 'E8F575915A2E4897A517779C0DD7CE'
Which other permission is missing?
Thanks,
Mary
*This post is locked for comments
I am using the user E8F575915A2E4897A517779C0DD7CE because I am using SL 2015. The sp call the bulk insert instruction
Thank you, The error is fixed
What does the sp do?
If it needs to "jump" between databases, as in calling a msdb.* sp or doing a select on the SL SYS database, you should use the WITH EXECUTE AS '07718158D19D4f5f9D23B55DBF5DF1' instead.
I always put these permissions at the end of each custom proc:
GRANT EXECUTE ON [dbo].[myproc] TO [E8F575915A2E4897A517779C0DD7CE]
GO
GRANT CONTROL ON [dbo].[myproc] TO [MSDSL]
GO
GRANT EXECUTE ON [dbo].[myproc] TO [TrustedWebService]
(last one is if you are using Web Services)
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156