2015. 11. 23. 11:22 오라클

export import shell


내가 사용하는 export import Shell

 

vi export.sh

 

###  DB EXPORT ###
#########################

# Variable Define
export FPATH=/TEST01
export BDATE=`date +%y%m%d`
export WTIME=workdate

# Old Backup File Remove
#rm -f $FPATH/*log $FPATH/*dmp

# Start Time Check
echo "Start Time" > $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log
echo "" >> $FPATH/$WTIME.log

# Run Export Backup
exp system/yjpower1 file=$FPATH/full.dmp buffer=10240000 RECORDLENGTH=65535 full=y log=$FPATH/imp_$BDATE.log

# End Time Check
echo "End Time" >> $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log

 

vi import.sh


###  DB IMPORT ###
#########################

# Variable Define
export FPATH=/export_backup
export BDATE=`date +%y%m%d`
export WTIME=workdate

# Old Backup File Remove
#rm -f $FPATH/*log $FPATH/*dmp

# Start Time Check
echo "Start Time" > $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log
echo "" >> $FPATH/$WTIME.log

# Run Export Backup
imp system/aosowl file=$FPATH/full_.dmp buffer=10240000 RECORDLENGTH=65535 full=y log=$FPATH/imp_$BDATE.log

# End Time Check
echo "End Time" >> $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log

Posted by pat98

01-27 02:42
Flag Counter
Yesterday
Today
Total

글 보관함

최근에 올라온 글

달력

 « |  » 2025.1
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

최근에 달린 댓글