Error trying to create a Proc in the bank

Asked

Viewed 40 times

0

I’m trying to run a stored procedure in the bank and it’s giving this message:

Cannot Grant, Deny, or revoke Permissions to sa, dbo, Entity Owner, information_schema, sys, or yourself

How do I fix it?

If Proc already exists and I just change, I spin. I just can’t run a new.

I made that select:

SELECT * FROM fn_my_permissions(NULL, 'SERVER');
GO

And I got this:

server;;CONNECT SQL

server;;VIEW ANY DATABASE

What does that mean?

  • What does Proc do? Change some permission ?

  • @Motta, looking at the PROC I have not seen anything that would alter, in any way, permissions. It exists at the end of PROC a Grant(Grant Execute on SP_CMO_SEL_PORTARIA_OIT1980_INATIVOS to cmo)

  • This is the problem , the user who runs the sp does not have Grant to give Grant.

  • @Motta, in this case, what would be the solution? I need to run proc in developing environment, because it exists only in the production environment.

  • I drove without Grant and it worked, but I should have Grant, but I’ll leave that for those who come later. This is a 5-day project and I don’t have time to understand anything.

1 answer

0

Following Motta’s guidelines, which I attribute to him the resolution of my problem, I did the following to solve it. I commented GRANT at the end of PROC and surrounded the PROC in development environment. This solved my problem.

  • But why Grant existed ?

  • @Motta, I don’t know. I just got here to make some corrections in a 5-day period. I know that the desenv environment here is not configured correctly and I am having several problems, like the VB 6 that does not run and etc... But for that we are called, to correct.

  • Functioned leave it alone ...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.