hackerwang 发表于 2011-12-22 08:54

Oracle在linux和windows下自动备份

<DIV>linux oracle数据库的备份:<BR>FIELNAME=/home/oracle/dmp/`date +%Y%m%d`.dmp<BR>echo $FIELNAME &gt; /home/oracle/dmp/filename<BR>/home/oracle/product/9.2/bin/exp ccbip/'und\=2008CN(Y|N)' full=y file=$FIELNAME<BR>bzip2 $FIELNAME<BR>创建的文件都是oracle用户 oinstall组的</DIV>
<DIV>&nbsp;</DIV>
<DIV>windows下自动备份的脚本:<BR>expData.bat的内容:<BR>exp <a href="mailto:system/system@orcl" target="_blank"><FONT color=#63401b>system/system@orcl</FONT></A> file=c:\oracle_bak\tne%date:~4,10%.dmp owner=tne <BR>exp <a href="mailto:system/system@orcl" target="_blank"><FONT color=#63401b>system/system@orcl</FONT></A> file=c:\oracle_bak\prt%date:~4,10%.dmp owner=prt <BR>exp <a href="mailto:system/system@orcl" target="_blank"><FONT color=#63401b>system/system@orcl</FONT></A> file=c:\oracle_bak\sec%date:~4,10%.dmp owner=sec <BR>exp <a href="mailto:system/system@orcl" target="_blank"><FONT color=#63401b>system/system@orcl</FONT></A> file=c:\oracle_bak\tea%date:~4,10%.dmp owner=tea <BR>exp <a href="mailto:system/system@orcl" target="_blank"><FONT color=#63401b>system/system@orcl</FONT></A> file=c:\oracle_bak\pic%date:~4,10%.dmp owner=pic <BR>exp <a href="mailto:system/system@orcl" target="_blank"><FONT color=#63401b>system/system@orcl</FONT></A> file=c:\oracle_bak\system%date:~4,10%.dmp owner=system <BR>path=D:\WinRAR 3.20<BR>rar a Data%date:~4,10%.rar *%date:~4,10%.dmp<BR>del *%date:~4,10%.dmp</DIV>
页: [1]
查看完整版本: Oracle在linux和windows下自动备份