We need to audit when a table is accessed (either select, update or delete) and I know Oracles Fine Grained Auditing can handle that. The issue we are having is that all of our users use the same oracle account to log in and we need to audit WHO, using the users username on the application, did the action on this table. What I was thinking is that we can just pass the users id in as part of the select statement ( select 'bob', col1, col2…) and that could possibly be accessed with Oracles Fine Grained Auditing.
Does anyone have any experience in doing something like this or if it is even possible. If not, any ideas on how we can accomplish this?
Thanks!
Forgot to mention that this is in Oracle 10G
Best Answer
Get the client to call
dbms_session.set_identifier('PHILTEST');
. This will then be set in theCLIENT_ID
audit field. Obviously you'l need to call it first from the client whenever a new connection is pulled from the pool.For example: