Lucy Jih
27th January 2003, 11:12
Hi,

By oracle user bsp, it raise ORA-01031 when I create oracle DB trigger. Do you know how to solve the problem ? Thanks.

My script is :
create or replace trigger acp200t01
before delete or insert or update
on baan.ttfacp200xxx for each row
declare wk_mode number
begin
if inserting then
wk_mode := 1
elsif updating then
wk_mode := 2
elsif deleting then
wk_mode := 3
end if;
insert into log_tfacp200 values(
wk_mode,
decode(:old.t$ttyp, null, :new.t$ttyp, :old.t$ttyp),
decode(:old.t$ninv, null, :new.t$ninv, :old.t$ninv),
decode(:old.t$tdoc, null, :new.t$tdoc, :old.t$tdoc),
decode(:old.t$docn, null, :new.t$docn, :old.t$docn),
:old.t$user, :new.t$user, sysdate, user
);
end;
/
on baan.ttfacp200xxx for each row
*
ERROR at line 3:
ORA-01031: insufficient privileges

Regards,
Lucy

patvdv
27th January 2003, 11:15
I don't think you can do this as user 'bsp'. 'bsp' is a super user in Baan but not in the Oracle environment. Think you will have to do this as user 'baan' in your database.

Lucy Jih
27th January 2003, 11:38
Hi patvdv,

the db trigger was created by user 'baan' in oracle env.

thanks.

Lucy

James
27th January 2003, 11:53
Hi Lucy,

You'll may need to grant the 'Create Trigger' privelege before creating the trigger.

For user bsp to create triggers in own schema:
SVRMGR> connect internal
SVRMGR> grant create trigger to bsp;

or

For user baan to create triggers in other schema's:
SVRMGR> connect internal
SVRMGR> grant create any trigger to baan;

Lucy Jih
27th January 2003, 12:06
Hi James,

It seems the log tfacp200 DB trigger make Baan ACP performance very low when trigger enable.

For ERP system concerned, it maybe a good way to create DB trigger exclude user 'baan'.

Thanks.


Regards,
Lucy