DDL trigger [message #36771] |
Wed, 19 December 2001 11:21 |
Paul Heffley
Messages: 1 Registered: December 2001
|
Junior Member |
|
|
I want to use a DDL trigger that will execute a PL/SQL block when a table is altered. Any ideas on how to do this?
----------------------------------------------------------------------
|
|
|
Re: DDL trigger [message #36827 is a reply to message #36771] |
Mon, 24 December 2001 15:17 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
CREATE OR REPLACE TRIGGER alter_any_table_trig
AFTER ALTER ON DATABASE
BEGIN
IF (ora_sysevent = 'ALTER' and ora_dict_obj_type = 'TABLE') THEN
insert into alter_table_log values(ora_dict_obj_owner||'.'||ora_dict_obj_name||
' is altered by '||ora_login_user,sysdate);
END IF;
END;
----------------------------------------------------------------------
|
|
|