linux oracle数据库的备份:
复制代码 代码如下:
FIELNAME=/home/oracle/dmp/`date +%Y%m%d`.dmp
echo $FIELNAME > /home/oracle/dmp/filename
/home/oracle/product/9.2/bin/exp ccbip/'und=2008CN(Y|N)' full=y file=$FIELNAME
bzip2 $FIELNAME
创建的文件都是oracle用户 oinstall组的
windows下自动备份的脚本:
expData.bat的内容:
复制代码 代码如下:
exp system/system@orcl file=c:oracle_baktne%date:~4,10%.dmp owner=tne
exp system/system@orcl file=c:oracle_bakprt%date:~4,10%.dmp owner=prt
exp system/system@orcl file=c:oracle_baksec%date:~4,10%.dmp owner=sec
exp system/system@orcl file=c:oracle_baktea%date:~4,10%.dmp owner=tea
exp system/system@orcl file=c:oracle_bakpic%date:~4,10%.dmp owner=pic
exp system/system@orcl file=c:oracle_baksystem%date:~4,10%.dmp owner=system
path=D:WinRAR 3.20
rar a Data%date:~4,10%.rar *%date:~4,10%.dmp
del *%date:~4,10%.dmp