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: Trigger when inserted by special user

Re: Trigger when inserted by special user

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Tue, 4 Aug 1998 18:51:39 +0200
Message-ID: <6q7e60$94s$1@pascal.a2000.nl>


>Can I tell a database trigger only to trigger when the insertion came
>from a special user, and not to trigger when another user inserts a
>value?

I guess you can create a trigger for that user. Like logging into SQL*plus as that user (not as the table owner), and then create the trigger in that user's schema instead of in the schema of the table owner. If not, then you could check which user is the current user:

create trigger ...
  v_User varchar2(32); -- hmmm, what length is needed? begin
  select user
  into v_User
  from dual;
  if v_User in ( your special user list here)   then
    ..
  end if;
end;

Arjan. Received on Tue Aug 04 1998 - 11:51:39 CDT

Original text of this message

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