Uncategorized

Oracle RDBMS – Data Pump

Some Oracle Data Pump examples…

Data Pump Export ( list of tables, over a db link )

expdp system/manager parallel=1 logfile=exp_ntcv2_ams.log dumpfile=ntcv2ams_%u.dmp estimate=statistics network_link=ntcv2 directory=dp_ntut tables=’AMS.AMS_LIST_ENTRIES,\
AMS.AMS_OBJECT_ASSOCIATIONS,\’

The script below calls Data Pump to export a schema, containing the SALES and COSTS tables, but only where PROD_ID = 13. An example of passing a query into Data Pump Export.

export ORACLE_SID=hlc
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$HOME/bin:$PATH

expdp np/np parfile=dpump_query.par

<contents of dpump_query.par>

logfile = dpexp_query.log
dumpfile = dpexp_query_%u.dmp
directory = DATA_PUMP_DIR
schemas = SH
INCLUDE = TABLE:”IN (‘SALES’,’COSTS’)”
QUERY = SH.SALES:”WHERE PROD_ID = 13″
QUERY = SH.COSTS:”WHERE PROD_ID = 13″

The Example below imports data, using a parameter file.

imp username/password@SID parfile=parties_lookup.txt

<contents of parties_lookup.txt>

file=/u208/app/r11export/r11_hz_parties.dmp
log=import_hz_parties_lookup.log
full=Y
rows=Y
statistics=none

Leave a Reply

Your email address will not be published. Required fields are marked *