Description:-
We want to create a shell script to run export/import utilities.
Script to run
# SCRIPT # --------- # # Set environment variables for ORACLE_HOME, ORACLE_SID, # and DUMPDIR -- in case of datapump --, as well as PATH if needed. # # trap '' 1 # to use nohup in a shell script # Set these to appropriate values if needed: # #ORACLE_HOME= #ORACLE_SID= #DUMPDIR= # Customize PATH if needed # #PATH=/bin:/usr/bin:${ORACLE_HOME}/bin:/usr/local/bin:/usr/lbin #export ORACLE_HOME ORACLE_SID PATH echo "Exporting $ORACLE_SID database. start `date`" # expdp system/password dumpfile=scott.dmp directory=DUMPDIR schemas=scott logfile=scott.log # echo "Export of $ORACLE_SID database completed at `date`" #End of Script
Running the script
If you save the script as exp_comp.sh, type the following command at the Unix prompt to run it:
#> ./exp_comp.sh
Note: Edit the above script to use it for your specific exports or imports (like full, schema, table, TTS).
In case of traditional export/imp (exp/imp), the above command may be something like:
exp system/manager file=scott.dmp owner=scott log=scott.log
Reference
UNIX Shell Script To Run DataPump Or Traditional Export Or Import Utilities (Doc ID 1154409.1)
Catch Me On:- Hariprasath Rajaram Telegram:https://t.me/joinchat/I_f4DkeGfZuxgMIoJSpQZg LinkedIn:https://www.linkedin.com/in/hariprasathdba Facebook:https://www.facebook.com/HariPrasathdba FB Group:https://www.facebook.com/groups/894402327369506/ FB Page: https://www.facebook.com/dbahariprasath/? Twitter: https://twitter.com/hariprasathdba