Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger Problem
This is because you have access to v$session through a role, and roles do
not work in PL/SQL.
You need to have direct select access on the underlying object (v$session is
a synonym) v$_session.
I'm not sure why you would want to osuser, while the user pseudo function
would return the correct Oracle user.
The messages go to the user_errors view.
Hth,
--
Sybrand Bakker, Oracle DBA
<amerar_at_ci.chi.il.us> wrote in message news:7qh8es$2oc$1_at_nnrp1.deja.com...
>
>
> Hello,
>
> Can someone please tell me why this trigger fails re-validation? Also,
> where do the messages go when you compile a trigger?
>
> BEGIN
> UPDATE audit_trail
> SET user_id = (
> select osuser from v$session where audsid=userenv('SESSIONID'))
> WHERE
> payment_history_key = :new.payment_history_key and
> caps_code = :new.caps_code and
> adjustment_date_time = :new.adjustment_date_time and
> fund# = :new.fund# and
> adj_amt_cash = :new.adj_amt_cash and
> adj_amt_check = :new.adj_amt_check and
> adj_amt_credit = :new.adj_amt_credit and
> adj_advice_of_credit = :new.adj_advice_of_credit and
> adj_int = :new.adj_int and
> adj_pen = :new.adj_pen and
> adj_fund_amt = :new.adj_fund_amt and
> adj_letter_of_credit = :new.adj_letter_of_credit and
> adj_electronic_fund_xfer = :new.electronic_fund_xfer and
> adj_credit_others = :new.adj_credit_others and
> adj_food_stamps = :new.adj_food_stamps and
> notes = :new.notes and
> date_time_batch_closed = :new.date_time_batch_closed;
> END;
>
> Thanks,
>
> Arthur
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Tue Aug 31 1999 - 14:58:33 CDT
![]() |
![]() |