We're looking to audit UPDATE/INSERT/DELETE activity on a few of our tables.
The way I've usually done it is to create a trigger that uses the CURRENT USER register for the userid, and inserts the row into the audit table with a timestamp, etc.
Now, though, we use Websphere with a ConnectionPool, so all the users come in as the same userid (ie. a project userid, doesn't map to real people).
I found a fairly neat solution, which is to insert a row mapping the "real user" to the "application id":
http://www-900.ibm.com/developerWork...html#section2b
But unfortunately it doesn't really work, since every HTTP request the user gets a new connection - might be the same one, but usually not.
Does anyone have a clever solution to this, short of passing the "real user" to every INSERT/UPDATE/DELETE in some way? I'm trying to avoid that, but doesn't look possible.