Is it possible to monitor role and privilege grant/revoke using triggers? I' aware of doing that using Oracle audit tools however, it's interesting is it possible to do that using triggers.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You could do that with DDL triggers (
The docs are in the Oracle® Database PL/SQL Language Reference. You should look carefully at the event attribute functions table, and the Event Attribute Functions for Client Event Triggers section to know what information is available in those contexts.
Here's an example trigger (probably incomplete, this is just an example) that would log basic information about
Improvement: Added login user, IP Address. It will show who has given grant or revoke.