Expdb and Impdb for a table with different name and schema in Oracle
EXPDP and IMPDP is the logical oracle backup utility. It is used for logically backup of the database.
Example: We take backup of table EMPLOYEE in SCOTT schema from the production environment and import the table in new schema HR and changed table name as HR_EMPLOYEE
Use REMAP_SCHEMA for Schema change or use REMAP_TABLE for change table name from existing to new
Following steps show the export and import of table in new schema
1. EXPDP for the table from the primary database from Scott Schema
expdp directory=datapump1 dumpfile=expdp_table.dmp logfile=expdp_table.log tables=SCOTT.EMPLOYEE
2. IMPDP the table with different name and user in Test Environment. Example Import the table in HR schema with new name HR_EMPLOYEE
impdp REMAP_SCHEMA=SCOTT:HR REMAP_TABLE=EMPLOYEE:HR_EMPLOYEE directory=datapump1 dumpfile=expdp_table.dmp logfile=impdp_table.log