时间:2021-07-01 10:21:17 帮助过:22人阅读
一、路径:/EASData/EASBAK/autobak二、脚本名:eas_expdp.sh三、脚本内容:#!/bin/sh
RedHat 下 Oracle备份
[日期:2011-01-21] 来源:Linux社区 作者:Linux [字体:]
一、路径:/EASData/EASBAK/autobak
二、脚本名:eas_expdp.sh
三、脚本内容:
#!/bin/sh
#====================================================
# SCRIPT : eas_expdp_MontoSat.sh
# AUTHOR : Jackey
# Date : 2010-09-29
# REV : 1.0
# PURPOSE : This script is used to run logic backup.
# Copyright(c) 2010 Kingdee Co.,Ltd.
# All Rights Reserved
#=====================================================
# rm file
RMDAY=`date +%Y -d '15 days ago'``date +%m -d '15 days ago'``date +%d -d '15 days ago'`
RMDATA=rc0819_`expr $RMDAY`.dmp
RMLOG=rc0819_`expr $RMDAY`.log
cd /EASData/EASBAK/autobak
rm -f $RMDATA
rm -f $RMLOG
# data backup
DAY=`date +%Y``date +%m``date +%d`
FILE_TARGET=rc0819_`expr $DAY`.dmp
FILE_LOG=rc0819_`expr $DAY`.log
Oracle_SID=orcl
ORACLE_BASE=/ora/oracle/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID ORACLE_BASE ORACLE_HOME
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
expdp system/kingdee schemas=rc0819 directory=eas_expdp_dir dumpfile=$FILE_TARGET logfile=$FILE_LOG job_name=cases_$DAY parallel=4
# copy to remote server
scp /EASData/EASBAK/autobak/$FILE_TARGET root@192.168.1.208:/EASData/$FILE_TARGET
scp /EASData/EASBAK/autobak/$FILE_LOG root@192.168.1.208:/EASData/$FILE_LOG
+++++++++++++++++++++++++
四、208应用服务器脚本:
路径:/EASData
脚本:rm_bak.sh
内容:
#!/bin/sh
#====================================================
# SCRIPT : rm_bak.sh
# AUTHOR : Jackey
# Date : 2010-09-29
# REV : 1.0
# PURPOSE : This script is used to delete backup files.
# Copyright(c) 2010 Kingdee Co.,Ltd.
# All Rights Reserved
#=====================================================
# rm file
RMDAY=`date +%Y -d '3 days ago'``date +%m -d '3 days ago'``date +%d -d '3 days ago'`
RMDATA=rc0819_`expr $RMDAY`.dmp
RMLOG=rc0819_`expr $RMDAY`.log
cd /EASData
rm -f $RMDATA
rm -f $RMLOG
Oracle单行子查询返回多于一个行解决方法
备份、引入ORA数据库(ERP克隆)RedHat 5.5+Oracle 11g (64bit)
,