I'm am getting the following error when this trigger is executing in my 19C database. The trigger works fine in 11.2
CREATE OR REPLACE TRIGGER ICM_USER.GRANT_TRG_01
after CREATE on schema
declare
l_str varchar2(255);
l_job number;
begin
if ( ora_dict_obj_type = 'TABLE' )
then
l_str := 'execute immediate "grant select on ' ||
ora_dict_obj_name ||
' to icmuser_read";';
dbms_job.submit( l_job, replace(l_str,'"','''') );
end if;
end;
/
ORA-04088: error during execution of trigger 'ICM_USER.GRANT_TRG_01'
ORA-00604: error occurred at recursive SQL level 1
ORA-27486: insufficient privileges
ORA-06512: at "SYS.DBMS_ISCHED", line 9387
ORA-06512: at "SYS.DBMS_ISCHED", line 9376
ORA-06512: at "SYS.DBMS_ISCHED", line 175
ORA-06512: at "SYS.DBMS_ISCHED", line 9302
ORA-06512: at "SYS.DBMS_IJOB", line 196
ORA-06512: at "SYS.DBMS_JOB", line 168
ORA-06512: at line 10