Expdp/Impdp tables from one schema to another schema in Oracle database

Expdp/Impdp tables from one schema to another schema in Oracle Database


Take a backup of tables with the another name in destination DB.  

create table schema_target.tablename1_target as select * from schema_target.table_name_bkp;


Take a backup from source Database.

expdp directory=directory_name dumpfile=dumpfile_name.dmp logfile=logfile_name.log tables=schema_source.tablename1_source,tablename2_source;


Import backup in target Database.

impdp directory=directory_name dumpfile=dumpfile_name logfile=logfile_name tables=schema_source.table_name1_source, table_name2_source remap_schema=schema_source:schema_target;

or

impdp directory=dirctory_name dumpfile=dumpfile_name logfile=logfile_name tables=schema_source.table_name1_source remap_schema=source_schema:target_schema;



Check Records after completion.

select count(*) from target.table_name_bkp;

select count(*) from target.table_name;


Comments