Chinaunix首页 | 论坛 | 博客
  • 博客访问: 104672880
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-04-28 20:23:18


 
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://sam2080.blog.51cto.com/25153/17695
以下为ORACLE 自动备份批处理文件内容,请配合任务计划实现
 
@ECHO OFF
SET BACKPATH=d:\
ECHO 准备备份数据库
REM 7天一个循环
IF EXIST %BACKPATH%\ONE GOTO ONE
IF EXIST %BACKPATH%\TWO GOTO TWO
IF EXIST %BACKPATH%\THREE GOTO THREE
IF EXIST %BACKPATH%\FOUR GOTO FOUR
IF EXIST %BACKPATH%\FIVE GOTO FIVE
IF EXIST %BACKPATH%\SIX GOTO SIX
IF EXIST %BACKPATH%\SEVEN GOTO SEVEN
ECHO E > %BACKPATH%\ONE

:ONE
SET BACKPATH_FULL=%BACKPATH%\ONE
REN %BACKPATH%\ONE TWO
GOTO BACK
:TWO
SET BACKPATH_FULL=%BACKPATH%\TWO
REN %BACKPATH%\TWO THREE
GOTO BACK
:THREE
SET BACKPATH_FULL=%BACKPATH%\THREE
REN %BACKPATH%\THREE  FOUR
GOTO BACK
:FOUR
SET BACKPATH_FULL=%BACKPATH%\FOUR
REN %BACKPATH%\FOUR FIVE
GOTO BACK
:FIVE
SET BACKPATH_FULL=%BACKPATH%\FIVE
REN %BACKPATH%\FIVE SIX
GOTO BACK
:SIX
SET BACKPATH_FULL=%BACKPATH%\SIX
REN %BACKPATH%\SIX SEVEN
GOTO BACK
:SEVEN
SET BACKPATH_FULL=%BACKPATH%\SEVEN
REN %BACKPATH%\SEVEN ONE
GOTO BACK
:BACK
EXP TESTUSER/TEST FILE=%BACKPATH_FULL%.DMP
SET BACKPATH=
SET BACKPATH_FULL=
EXIT
阅读(633) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~