Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

impdp oracle errors!

Luis AlvaraezJan 23 2025 — edited Jan 23 2025

Hi,

I'm doing a schema export with these command:

expdp user/pass schemas=ctm920 directory=BACKUP_DIRDC logfile=backup.log filesize=1G

Then I need to recover the schema. To do that I do:

impdp user/pass dumpfile=expdat.dmp logfile=log.log directory=BACKUP_DIRDC schemas=ctm920 TABLE_EXISTS_ACTION=REPLACE

But when I do the import shows me a lot of ora message like these:

ORA-31684: El tipo de objeto FUNCTION:"ctm920 "."CURRTIME" ya existe

ORA-39346: perdida de datos en la conversion del juego de caracteres del objeto PROCEDURE:"ctm920 "."CLEAN_AJF_V9"

ORA-31684: El tipo de objeto PROCEDURE:"ctm920 "."PURGE_CMR_RUNINF_1" ya existe

ORA-39111: Se ha saltado el tipo de objeto dependiente ALTER_FUNCTION:"ctm920 "."DDIFF", ya existe el tipo de objeto base FUNCTION:"ctm920 "."DDIFF"

How could I can avoid that? I need to restore de schema that I've exported. Thanks!

Comments

Hi.,

May i know which version of database you are using, Is it 19C, if 19C DB then, you are importing into the CDB or Any of PDB Database?

Based on your export command you have issued., I have given 2 scenario to perform as shown below.

expdp user/pass schemas=ctm920 directory=BACKUP_DIRDC logfile=backup.log filesize=1G

If you are using import on Container Database (CDB)

- Check the OS Directory is created & you have linked this OS Directory to DB directory.
Ex: $ mkdir -p /u01/dumpfile/
- Place dumpfile into /u01/dumpfile location.
- SQL> create or replace directory dumpfile as '/u01/dumpfile/';
- SQL> grant read, write on directory dumpfile to [import user];

impdp user/pass dumpfile=expdat.dmp logfile=imp_log.log directory=BACKUP_DIRDC TABLE_EXISTS_ACTION=REPLACE

If you are using import on Pluggable Database (PDB)

- Check the OS Directory is created & you have linked this OS Directory to DB directory.
Ex: $ mkdir -p /u01/dumpfile/
- Place dumpfile into /u01/dumpfile location.
- SQL> create or replace directory dumpfile as '/u01/dumpfile/';
- SQL> grant read, write on directory dumpfile to [import user];

impdp user/pass@(PDB NAME) dumpfile=expdat.dmp logfile=imp_log.log directory=BACKUP_DIRDC TABLE_EXISTS_ACTION=REPLACE

Keep us update.

Warm Regards,
Mir Sayeed Hassan
Oracle ACE Pro
Oracle Certified OCP | OCI

Solomon Yakobson 5 days ago

impdp parameter TABLE_EXISTS_ACTION=REPLACE applies to tables only. Errors you are getting indicate FUNCTION:"ctm920 "."CURRTIME", PROCEDURE:"ctm920 "."PURGE_CMR_RUNINF_1" and FUNCTION:"ctm920 "."DDIFF" already exist in target database. You need to decide do you want to keep there existing objects and for that you need to add EXCLUDE parameters to import or import them and for that you need to drop these objects before import.

SY.

1 - 2

Post Details

Added on Jan 23 2025
2 comments
88 views