I created the following triggers in the SCOTT schema
SQL> create or replace
2 trigger TRG1 before insert on scott.EMP
3 for each row
4 declare
5 x int;
6 begin
7 select count(*) into x from scott.dept;
8 end;
9 /
Trigger created.
SQL>
SQL>
SQL> create or replace
2 trigger TRG2 before insert on EMP
3 for each row
4 declare
5 x int;
6 begin
7 select count(*) into x from scott.dept;
8 end;
9 /
Trigger created.
SQL>
SQL>
SQL> create or replace
2 trigger TRG3 before insert on EMP
3 for each row
4 declare
5 x int;
6 begin
7 select count(*) into x from dept;
8 end;
9 /
Trigger created.
Then I did:
expdp directory=TEMP dumpfile=schema.dmp logfile=schema.log schemas=scott
impdp directory=TEMP dumpfile=schema.dmp logfile=schemaimp.log schemas=scott remap_schema=scott:scott2 table_exists_action=replace
After import, you will see the following
TRG1 - in the SCOTT schema
TRG2 - in the SCOTT2 schema, trigger body still says 'scott.dept'
TRG3 - in the SCOTT2 schema, trigger body still says 'dept'
Thats how we do it because triggers do not HAVE to be in the same schema as an object. For example, I might have a schema called "SCOTT_TRIGGERS" where I define all of my triggers for tables owned by SCOTT. So we cant really go "hunting" for the word 'scott' on import and just change it wherever we want.
Hope this helps.