I have a problem where I am creating a table using the execute immediate command in the stored procedure. However I get the error of \"insufficient privileges\". I checked o
When using execute immediate, procedure must explicitly tell oracle that it must run with privileges of a particular user.
AUTHID CURRENT_USER, to use the privileges of user running the procedure. AUTHID DEFINER, to use the privileges of owner of the procedure.
This is done using AUTHID option while creating a procedure.
CREATE OR REPLACE PROCEDURE PROC_NAME AUTHID CURRENT_USER
IS
.....
I faced a similar issue and got the understanding from: Execute Immediate within a stored procedure keeps giving insufficient priviliges error