ITPub博客

首页 > 数据库 > Oracle > windowns系统下oracle数据库exp自动备份

windowns系统下oracle数据库exp自动备份

原创 Oracle 作者:许愿流星1号 时间:2014-11-20 16:30:42 0 删除 编辑

写个.bat的程序,内容为

 

 

exp  scott/tiger@192.168.56.11/prod file=D:\scott%date:~0,4%%date:~5,2%%date:~8,2%.dmp log=D:\scott%date:~0,4%%date:~5,2%%date:~8,2%.txt

 

rem delete 10days files

forfiles /p "d:\bak" /d -10  /c "cmd /c echo deleting @file ... && del /f @path"

 

 

 

 

 

备份出来的是 scott20141027.dmp

 

 

 

exp  system/oracle@192.168.56.11/prod full=y file=D:\full%date:~0,4%%date:~5,2%%date:~8,2%.dmp log=D:\full%date:~0,4%%date:~5,2%%date:~8,2%.txt

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29893219/viewspace-1340563/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-09-18

  • 博文量
    46
  • 访问量
    430277