REMAP_DATAFILE not working during Data Pump import on Oracle 19c

REMAP_DATAFILE not working during Data Pump import on Oracle 19c

I'm trying to import a full database dump using impdp into a different Oracle 19c (Standard Edition 2) environment, but the REMAP_DATAFILE parameter doesn't seem to be working.

My goal is to import a dump from a source database called db_source into a destination one called db_target, redirecting all the datafiles to a different folder path (/opt/oracle/oradata/oradata/DB_TARGET/pdb_target/), since the filesystem structure differs between environments.

This is what I have in my .par file:

REMAP_DATAFILE=/opt/oracle/oradata/oradata/DB_SOURCE/:/opt/oracle/oradata/oradata/DB_TARGET/pdb_target/

However, I keep getting errors like:

ORA-39083: Object type TABLESPACE:"DATOSLOB" failed to create with error:
ORA-01119: error in creating database file '/opt/oracle/oradata/oradata/DB_SOURCE/DATOSLOB_01'
ORA-27038: created file already exists

I’ve confirmed that I'm connected to the right PDB (pdb_target) using SHOW CON_NAME;.

I also generated a SQL preview using SQLFILE=preview.sql and noticed that the datafile paths are not being remapped, they still point to /opt/oracle/oradata/oradata/DB_SOURCE/.

I found someone facing the same issue here (still unresolved): Read more

How can I get REMAP_DATAFILE to work properly on Oracle 19c? Is there any additional requirement or known bug?

Answer

Use REMAP_DIRECTORY: "/opt/oracle/oradata/oradata/DB_SOURCE/" is obviously not a data file...

Enjoyed this article?

Check out more content on our blog or follow us on social media.

Browse more articles