PL/SQL (MOSC)

MOSC Banner

Activate Audit in a Trigger with a Dynamic PL/SQL

edited Jun 12, 2013 2:11AM in PL/SQL (MOSC) 2 commentsAnswered
Hi, my name is Roberto.

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:

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