Unable to grant certain privs using sproc - error 3524
I've created a stored procedure to grant certain privs but I get error 3524 for some of them. I've created the sproc and am owner and creator. I'm creator of the target db. I can grant the privs directly via sql asst or use td administrator but when I call sproc from same session I get the error. I've granted the privs with grant option to the owner/creator and still get error.
logged on as sysdba. sysdba is creator and owner of sproc. sysdba is creator of my_tables db. when called, sproc is doing the following:
call sysdba.sysexecsql ('GRANT create function ON my_tables to my_role');
CALL Failed. 3524: SYSEXECSQL:The user does not have CREATE FUNCTION WITH GRANT OPTION access to database my_tables.
I've granted create function with grant option to sysdba and dbc and still get above error.
It works when I grant it directly from my sql asst session:
grant create function on my_tables to a_role: works