Hi Mirza,
Your first statement "...create a trigger immediately after the data was insert into a table...."....., are you creating the trigger after every insert, or is the trigger created and just firing after each insert? You should create the trigger once and it should just fire with each insert.
Your trigger does not contain compound statements so you don't need the keywords BEGIN/END.
I am by no means an expert on triggers, but I would rewrite the trigger as below:
--<ScriptOptions statementTerminator="@"/>
CREATE OR REPLACE TRIGGER DEV_SCHEMA.TEST_TABLE_INSERT
AFTER INSERT
ON DEV_SCHEMA.TEST_TABLE
FOR EACH STATEMENT
INSERT INTO DEV_SCHEMA.LOG (OPERATION_TYPE,TABLE_NAME,OPERATION_TIME, USERNAME)
VALUES('INSERT','DEV_SCHEMA.TEST_TABLE',CURRENT_TIMESTAMP,SESSION_USER)
@
Keep in mind, by using the 'FOR EACH STATEMENT' option I believe you're going to insert a row into DEV_SCHEMA.LOG whether your insert statement is successful or not.
Regards
------------------------------
Andy McLaughlin
Great American Insurance
Cincinnati
------------------------------