impdp triggers always give error ORA-04071:missing BEFORE, AFTER or INSTEAD
Hello,
I am using 11g impdp to create a test system.
I use this cmd to import
impdp 'SYS/xxxxx@PWRFUN AS SYSDBA' dumpfile=PWRPROD.DMP logfile=PWRFUNimportPROD.log SCHEMAS=pwrplant TABLE_EXISTS_ACTION=REPLACE
Then I get this error for all the triggers
ORA-39083: Object type TRIGGER failed to create with error:
ORA-04071: missing BEFORE, AFTER or INSTEAD OF keyword
Failing sql is:
CREATE TRIGGER "PWRPLANT"."APPROVAL_STEPS_HISTORY" PS_HISTORY
BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
FOR EACH ROW
BEGIN :new.user_id := USER; :new.time_stamp := SYSDATE; END;
As you can see, the trigger does contain the word "before".
When I remove " "PWRPLANT"."APPROVAL_STEPS_HISTORY" " and run the trigger below, it compiles correctly. Why is this, and how do I make my impdp to run correctly?
CREATE TRIGGER PS_HISTORY
BEFORE UPDATE OR INSERT ON PWRPLANT.APPROVAL_STEPS_HISTORY
FOR EACH ROW
BEGIN :new.user_id := USER; :new.time_stamp := SYSDATE; END;