Home » SQL & PL/SQL » SQL & PL/SQL » DDL trigger
DDL trigger [message #36771] Wed, 19 December 2001 11:21 Go to next message
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 Go to previous message
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;

----------------------------------------------------------------------
Previous Topic: Stored procedure to return rows
Next Topic: 2 ACCEPT Commands
Goto Forum:
  


Current Time: Fri Aug 14 15:55:32 CDT 2020