I want to create a trigger that captures user,object,event(which would be a delete) and most importantly ip_address when a user performs a delete on any table within a schema.
I created a trigger to execute on the database(see below) when a DDL event takes place:
CREATE TRIGGER DDLTRIGGER AFTER DDL ON DATABASE
SELECT sys_context ('USERENV', 'IP_ADDRESS')
INSERT INTO DDLEvents
(UserName, DDLDate, DDLObjType, DDLObjOwner, DDLObjName, DDLEvent,IP_ADDR)
(ora_login_user, sysdate, ora_dict_obj_type,ora_dict_obj_owner, ora_dict_obj_name, ora_sysevent,ip_addr);
Is there a way to create a trigger that will insert basically the same information above into a table when a delete occurs on any table within a schema?