How to copy everything from one schema to another schema
651873Jul 24 2008 — edited Jul 24 2009I have schema name : hris
I export this schema with following code:
expdp system/oracle schemas=hris directory=pumpdir dumpfile=hrisdump.dmp logfile=hrisexp.log
When Exporting Complete, it show message:
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
C:\PUMP\HRISDUMP.DMP
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 09:00:53
After then, I import to new schema. My new Schema name : newhris
I use following code for import
impdp system/oracle schemas=hris directory=pumpdir dumpfile=hrisdump.dmp logfile=hrisimp.log remap_schema=hris:newhris
I see Message :
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS while calling DBMS_METADATA.CONVERT []
ORA-06502: PL/SQL: numeric or value error
LPX-00007: unexpected end-of-file encountered
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPW$WORKER", line 6235
----- PL/SQL Call Stack -----
object line object
handle number name
1C56B9FC 14916 package body SYS.KUPW$WORKER
1C56B9FC 6300 package body SYS.KUPW$WORKER
1C56B9FC 12279 package body SYS.KUPW$WORKER
1C56B9FC 3279 package body SYS.KUPW$WORKER
1C56B9FC 6889 package body SYS.KUPW$WORKER
1C56B9FC 1262 package body SYS.KUPW$WORKER
2F81204C 2 anonymous block
Job "SYSTEM"."SYS_IMPORT_SCHEMA_08" stopped due to fatal error at 09:03:09
After then, I log in with user newhris.
I found everything same with hris, except trigger.
Trigger cannot created in new schema : newhris
My Question : How to copy everything from one schema to another schema