I have a .sql
file with create procedure statements followed by a grant statement as shown below.
create or replace
PROCEDURE PROCEDURE_NAME()
AS
BEGIN
.....................
END;
GRANT EXECUTE ON PROCEDURE_NAME TO ROLE_NAME;
If I remove the grant statement everything works fine. However with grant statement it gives the following error.
Error(23,1): PLS-00103: Encountered the symbol "GRANT"
What am I missing here ? Can grant statement be not included in script as it does when we use it with create
statements ?