windowns系統下oracle資料庫exp自動備份

許願流星1號發表於2014-11-20

寫個.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部落格 ” ,連結:http://blog.itpub.net/29893219/viewspace-1340563/,如需轉載,請註明出處,否則將追究法律責任。

相關文章