3

I want to grant execute permission to user B so that it can execute a packaged procedure belonging to user A.

procedure name = PKGNAME.PROCEDURENAME
user = USERA

I am trying below command:

GRANT EXECUTE ON USERA.PKGNAME.PROCEDURENAME TO USERB;

But it gives me error:

ERROR at line 1:
ORA-00905: missing keyword

is there a syntax problem ? I used this link : Granting Rights on Stored Procedure to another user of Oracle

Community
  • 1
  • 1
darshanUser
  • 45
  • 1
  • 7

1 Answers1

5

you can't grant permissions on a procedure which is within a package, either grant permissions to the entire package or move the procedure outside of the package so it's a stand alone one and then grant permission

so either

GRANT EXECUTE ON USERA.PKGNAME TO USERB;

or

GRANT EXECUTE ON USERA.PROCEDURENAME TO USERB;
davegreen100
  • 2,055
  • 3
  • 13
  • 24
  • This answer did not help my problem. I have a procedure outside a package and the suggested `grant` statement does not work. I have the same error as the OP. – Jason Feb 20 '20 at 19:21