I need a trigger or something which will be launch when i open a table with a "select" sentence...i know that triggers per se only work with "update, insert or delete" (ddl or dml) but i want to know if i can do something that works like a trigger but only when i do a "select" command...i know also that i can write code on the client side to implement something seemless by i would like to build something on the server(DB) side...
thanks in advance...
Software/Hardware used:
ASKED:
September 20, 2006 6:38 PM
UPDATED:
September 21, 2006 1:58 PM
You can use FGA (Fine Grained Auditing) to simulate SELECT triggers. Basically the FGA supplied package has what is called a handler_module which is a procedure that you can ask Oracle to execute whenever someone selects from a table.
So to simulate a SELECT trigger you set up auditing through this package and include the handler_module info to execute whatever it is you want executed when the “trigger” fires.
For more info refer to the documentation for :
FGA
dbms_fga
handler_module
This is a URL that has an example on Fine Grained Auditing from Oracle Tech Network. It is a PDF chapter sample from an Oracle Press Book:
http://www.oracle.com/technology/books/pdfs/sample_31300.pdf