Does the user who owns the procedure have the necessary privs? it works fine for me.
Code:SQL> create role tester; Role created. SQL> create or replace procedure test 2 as 3 begin 4 execute immediate 'grant tester to scott'; 5 exception when others then 6 raise; 7 end; 8 / Procedure created. SQL> exec test; PL/SQL procedure successfully completed. SQL> select granted_role 2 from dba_role_privs 3 where grantee = 'SCOTT'; GRANTED_ROLE ------------------------------ TESTER CONNECT RESOURCE 3 rows selected.




Reply With Quote