Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Application user name in Audit triggers

Re: Application user name in Audit triggers

From: Anna C. Dent <anacdent_at_hotmail.com>
Date: Fri, 24 Oct 2003 17:11:14 -0700
Message-ID: <zcjmb.84037$Ms2.23817@fed1read03>


Steve Bell wrote:
> Good day all,
>
> I think this question has been asked before, so please accept my apology in
> advance. I've been unsuccessful searching
> for previous posts.
>
> We have an application (Oracle 8.1.7, Forms 9i, OAS9i) where each user will
> have their own login id. This login will be
> validated by the Application Server. When they connect to the database, all
> users will connect under the same Oracle user.
>
> Using update triggers, we populate an audit field called UPDATED_BY when an
> existing record is updated. For development,
> I just used USER to populate the field.
>
> Is their a way that I can get the username that they used originally to log
> into the application? I could then store
> that in a variable in the update triggers so we could record the exact
> application user id that performed the update?
>
> Any thoughts appreciated.
>
> Steve

It all depends.

Might something like the following get you pointed towards a solution. I "assume" that there is some sort of initial "login" forms/servlet; where the actual username & password are entered before being validated. Why can't you just save the username in some global variable and then use it in the update triggers?

HTH & YMMV Received on Fri Oct 24 2003 - 19:11:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US