This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
database:oracle:oracle_data_pump [2023/11/14 19:19] manu |
database:oracle:oracle_data_pump [2023/11/16 14:36] (current) manu |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Oracle export/import database ====== | ====== Oracle export/import database ====== | ||
| - | Dump an oracle database on multiple files | + | Dump an oracle database on multiple files (split) |
| <cli prompt='$'> | <cli prompt='$'> | ||
| $ expdp system/******** logfile=exp_pdco1mob00_full_12232013.txt directory=ABC dumpfile=exp_pdco1mob00_full_1_12232013.dmp,exp_pdco1mob00_full_2_12232013.dmp,exp_pdco1mob00_full_3_12232013.dmp,exp_pdco1mob00_full_4_12232013.dmp full=y exclude=statistics filesize=5g | $ expdp system/******** logfile=exp_pdco1mob00_full_12232013.txt directory=ABC dumpfile=exp_pdco1mob00_full_1_12232013.dmp,exp_pdco1mob00_full_2_12232013.dmp,exp_pdco1mob00_full_3_12232013.dmp,exp_pdco1mob00_full_4_12232013.dmp full=y exclude=statistics filesize=5g | ||
| + | </cli> | ||
| + | |||
| + | Using compression | ||
| + | <cli prompt='$'> | ||
| + | expdp test/test compression=all directory=dp dumpfile=wcomp.dmp | ||
| </cli> | </cli> | ||
| Line 23: | Line 28: | ||
| </cli> | </cli> | ||
| + | |||
| + | Script | ||
| + | <code> | ||
| + | #!/bin/bash | ||
| + | |||
| + | TODAY=`(set \`date\`; echo $2_$3)` | ||
| + | |||
| + | export LOG=/home/user/log | ||
| + | export ORACLE_HOME=/home/oracle/client/v11.2.0.3-64bit/client_1 | ||
| + | export LD_LIBRARY_PATH=$ORACLE_HOME/lib | ||
| + | export PATH=$PATH:$ORACLE_HOME/bin | ||
| + | |||
| + | exp < username > /< password >@//< host > owner= < schema > file=exp_$TODAY.dmp log=exp_$TODAY.log | ||
| + | |||
| + | exit; | ||
| + | EOF | ||
| + | </code> | ||