#!/bin/ksh
#
# generic environment settings
#
. $HOME/.bash_profile
export ORAENV_ASK=NO
. $ORACLE_HOME/bin/oraenv
export ORACLE_SERVER=`uname -n`
export ORACLE_SID=TEST
export USER=dbadmin
export PASSWD=white1112
export EXP_DIR=/backup/expdp/data/
export LOG_DIR=$EXP_DIR
export EXP_SCHEMA=TEST
export EXP_NAME=${ORACLE_SERVER}_${EXP_SCHEMA}_`date +%Y%m%d_%H%M`
#
# export schema and data
#
expdp $USER/$PASSWD SCHEMAS=$EXP_SCHEMA DIRECTORY=${ORACLE_SID}_expdp DUMPFILE=$EXP_NAME.dmp1,$EXP_NAME.dmp2,$EXP_NAME.dmp3, $EXP_NAME.dmp4 FILESIZE=8g PARALLEL=4 LOGFILE=$EXP_NAME.log
#gzip -f ${EXP_DIR}/*.dmp?
#find $EXP_DIR -name "*.gz" -mtime +5 -type f -exec rm {} \;
exit 0
Comments
Post a Comment