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_bak\tne%date:~4,10%.dmp owner=tne exp system/system@orcl file=c:\oracle_bak\prt%date:~4,10%.dmp owner=prt exp system/system@orcl file=c:\oracle_bak\sec%date:~4,10%.dmp owner=sec exp system/system@orcl file=c:\oracle_bak\tea%date:~4,10%.dmp owner=tea exp system/system@orcl file=c:\oracle_bak\pic%date:~4,10%.dmp owner=pic exp system/system@orcl file=c:\oracle_bak\system%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 |