This content has been marked as final. Show 7 replies
Ingenio wrote:DB account authentication only uses the DB account for authentication purposes, not to establish a connection to the database. APEX requests always run using ANONYMOUS connections from the pool. In the APEX session the <tt>APP_USER</tt> substitution string will contain the name of the database user used to authenticate.
For auditing, I need to insert the user, among other data, into different tables.
The thing is, I have an application with DB account authentication, so a real database user is connected, when auditing, the user field inserted is "ANONYMOUS".
i need to audit the real user, is it possible?Use the following expression in the audit code to return the username:
well, I am not clear with this, but you may know that the audit is performed by table triggers, I have more than 300 tables, you mean I'd edit all these trigger?
when I insert into a table, that table have the trigger "after insert" which insert into the audit table... and that audit table have a default field 'user_aud" filled with default 'USER'
I appreciate if you can clarify and help me to perform this challenge..
Please give full error messages, so we don't have to look it up first:
ORA-04044: procedure, function, package, or type is not allowed here
That seems a clear message to me. You have to use a trigger, not a default value.
From the Oracle documentation:
A DEFAULT expression cannot contain references to PL/SQL functions or to other columns, the pseudocolumns CURRVAL, NEXTVAL, LEVEL, PRIOR, and ROWNUM, or date constants that are not fully specified.
Edited by: InoL on May 15, 2013 1:36 PM