Thursday, January 17, 2013

Export\Import list of Oracle tables using expdp impdp to another schema


Example:

sudo su – oracle
.oraenv
db11g_1
sqlplus / as sysdba
grant dba to scott;
grant unlimited tablespace to scott
expdp scott/tiger tables=schema.tablename1,schema.tablename2,schema.tablename3 directory=oracledump dumpfile=exp_schema_20130117.dmp logfile=exp_schema_20130117.log

sudo su – oracle
.oraenv
db11g_2
sqlplus / as sysdba
grant dba to scott;
grant unlimited tablespace to scott
impdp scott/tiger  remap_schema=oldschema:newschema remap_tablespace=oldtablespace:newtablespace,oldtablespace2:newtablespace2 directory=oracledump dumpfile=exp_schema_20130117.dmp logfile=imp_schema_20130117.log