Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

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.