Wednesday, May 19, 2010

Select trigger in Oracle DB using Fine Grained Auditing.

Well, as it goes that triggers can only be written on DML and never on select statements: very true but it seems like using "Fine Grained Auditing" functionality of the DBMS_FGA package, it is possible to create trigger like functionality for select statements.
I was searching for similar concepts for a project which requires the count of every row which has been queried be increased. And I stumbled upon this: FGA. Though I didn't quite use this and did a work around but it sounds fun.