i have problem with create trigger to update an index in oracle

Philip Greenspun's Homepage : Philip Greenspun's Homepage Discussion Forums : 6916 : One Thread
Notify me of new responses
my trigger is:
//-------------------
CREATE OR REPLACE TRIGGER "DNV"."HEHE" AFTER
INSERT
OR DELETE ON "TESTINDEX" begin
execute immediate "alter index testindex_id rebuild";
end;

//------------------------
testindex_id is indexed for testindex table

when I insert a row into testindex table, It generate those erro
message:
ERROR at line 1:
ORA-04092: cannot COMMIT in a trigger
ORA-06512: at "DNV.testindex_id", line 5
ORA-04088: error during execution of trigger 'DNV.testindex_id'


how can I prepare

-- Pham Ngoc Bao Cuong, July 9, 2002