I am struggling to grant execute permission on a simple stored procedure
I create the following procedure using the ROLE SYSADMIN
CREATE OR REPLACE PROCEDURE PUBLIC.SOME_PROC()
RETURNS VARCHAR
LANGUAGE JAVASCRIPT
AS
$$
return "Hello";
$$
;
I test it by calling it
CALL PUBLIC.SOME_PROC();
I grant execution as below
GRANT USAGE ON PROCEDURE PUBLIC.SOME_PROC() TO ROLE UAT_OPERATIONS;
I switch role
USE ROLE UAT_OPERATIONS;
I try to call it again
CALL PUBLIC.SOME_PROC();
And I get the following error
SQL Error [2141] [42601]: SQL compilation error: Unknown user-defined function PUBLIC.SOME_PROC
What am I missing???