Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger when inserted by special user
>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
![]() |
![]() |