troubleshooting Question

Cannot grant EXECUTE on my stored procedure

Avatar of Roman_Churakov
Roman_ChurakovFlag for Russian Federation asked on
Microsoft SQL Server
13 Comments1 Solution1406 ViewsLast Modified:
Hello! I wrote stored procedure 'SubmitPayment' and want to give rigth on execution to another user, called 'teller'.
Firstly, I did this through configuration manager.
When this didn't help, I made query:

use billing  
grant execute on [dbo].[SubmitPayment] to teller

Anyway, when I then connect as 'teller' and try to execute

USE [Billing]
GO
DECLARE      @return_value int
EXEC      @return_value = [dbo].[SubmitPayment]
            @PaymentId = 31
SELECT      'Return Value' = @return_value
GO

I get this error:
' 07@5H5=85 EXECUTE 70?@5I5=> 4;O >1J5:B0 "SubmitPayment", 107K 40==KE "Billing", AE5<K "dbo".'
Which is in English: 'EXECUTE permission is forbidden for object "SubmitPayment", database "Billing"'
Under 'dbo' it works fine, but I need  this to work with 'teller' rights.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros