Activate Audit in a Trigger with a Dynamic PL/SQL
My DB is Oracle 8.1.6
I have a problem with this Code:
spool EBILLA_ddt20_install_trigger.log
set echo on
INSERT SYS PASSWORD
connect SYS as sysdba
CREATE OR REPLACE TRIGGER &schemaname..CREATE_TABLE AFTER
CREATE ON &schemaname..SCHEMA declare
smt varchar2(4000);
begin
IF( ora_sysevent='CREATE' and ora_dict_obj_type = 'TABLE') THEN
execute immediate 'audit select, update, delete on sys.dictionary_obj_owner.sys.dictionary_obj_name by access;';
END IF;
end;
/
show errors
spool off
$
The trigger is created without syntax errors
when I go to create a table on schema where I have to enable the audit, I get this error: