Just a very simple one - to log the access.
LU_ACCOUNT is the table name.
TABLE_CONTROL is the control table.
create or replace trigger LA_lu_account_trg
after insert or update or delete
on lu_account
begin
update table_control set last_access = sysdate where tab_name = 'LU_ACCOUNT';
end;
Table_control
SCH_NAME VARCHAR2(20)
TAB_NAME VARCHAR2(30)
LAST_ACCESS DATE
TAB_DROPPED CHAR(1)
Triggers are fine, depending on the circumstances - but never add them without some thought first. That code gets executed everytime a statement hits your table(s) - so use with care. If your tables really aren't used much, then no big deal.
Auditing could also show you selects, not just the DML. And also errors on sql hitting those tables (I use that a lot).
"False data can act only as a distraction. Therefore. I shall refuse to perceive you." - Bomb #20
Bookmarks