PL/SQL (MOSC)

MOSC Banner

grants within plsql not working

edited Nov 20, 2019 7:00AM in PL/SQL (MOSC) 8 commentsAnswered ✓

Hello Gurus,

I'm newbie with pl/sql , the grants to the role with a anonymous plsql block runs fine whereas with stored proc its not working.

Works fine from Anonymous plsql block:

SQL> edWrote file afiedt.buf  1  declare  2  str1 varchar2(200);  3  p_owner varchar2(10) :='DUMMY';  4  v_object_name varchar2(100):='TEST_S';  5  begin  6  str1:= 7 'grant select,insert,update,delete on ' 8 || p_owner 9 || '.'10 || v_object_name11 || ' to '12 || p_owner13 || '_ADMIN_RL';14  dbms_output.put_line(str1);15  execute immediate str1;16* end;SQL> /grant select,insert,update,delete on DUMMY.TEST_S to DUMMY_ADMIN_RLPL/SQL procedure successfully completed.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center