November 10th, 2003, 12:14 PM
How can i write a trigger which triggers when update/insert data in any of the table
i am using oracle8i. i need to write a trigger which fire when any of the table in the schema has been modified(ie,insert/update).
And i need to get the table name and the column name which has been modified.
So that i can insert one record in another destination table which keep in track of the changes.
the structure ofthe destination table is
......i can write separate trigger for each table..and can update the destination table.By using :new.value and ld.value..
But i am searching for a common TRIGGER ..Which can do the job..
Please help me.....
December 30th, 2003, 01:10 AM
Schema Trigger for drop table
First create a log table as
Create table log (a varchar2(500));
Then write the following trigger in your desired schema
CREATE OR REPLACE TRIGGER no_drop_trg
BEFORE DROP ON UTDSPROD.SCHEMA
v_msg :='Table '||DICTIONARY_OBJ_NAME ||' is dropped by '||LOGIN_USER;
insert into log values(v_msg);