Tuesday, March 5, 2013

Exports/Imports


Table Exports/Imports

The TABLES parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax.

expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log

For example output files see expdpEMP_DEPT.log and impdpEMP_DEPT.log.

The TABLE_EXISTS_ACTION=APPEND parameter allows data to be imported into existing tables.
Schema Exports/Imports

The OWNER parameter of exp has been replaced by the SCHEMAS parameter which is used to specify the schemas to be exported.
The following is an example of the schema export and import syntax.

expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=impdpSCOTT.log

#####################################################

impdp VXMLDB/vxmldb REMAP_SCHEMA=FORCE_CHARGING:VXMLDB REMAP_TABLESPACE=FORCE_CHARGING:VXMLDB
tables=DELHI_DND directory=GoTo244_169 dumpfile=DELHI_DND.dmp logfile=DELHI_DND.log

impdp system/moddb REMAP_SCHEMA=hgmod2:moddb REMAP_TABLESPACE=ORCLDGR2:moddb,MOCDATA:moddb
directory=oracle_exp dumpfile=HGMOD_HGMOD2_BACKUP_11282012183140.DMP
logfile=HGMOD_HGMOD2_BACKUP_11282012183140.log

impdp system/moddb REMAP_SCHEMA=hgmod2:moddb REMAP_TABLESPACE=ORCLDGR2:moddb,MOCDATA:moddb directory=exp_dir
dumpfile=HGMOD2201212_BACKUP_12202012124427.DMP logfile=82012183140.log

expdp SYSTEM/hgmod tables=hgmod2.TBL_PRO_USERPROFILE1 dumpfile=tTBL_PRO_USERPROFILE1.DMP
LOGfile=TBL_PRO_USERPROFILE1.LOG directory=export_dump





No comments: