您的位置:首页 > 数据库 > Oracle

备份Oracle数据库的脚本

2013-11-14 19:57 323 查看
@echo off

goto bakoracle

:bakoracle

echo.

echo ★☆★ 自动备份Oracle数据库 ★☆★

echo.

set backpath=E:\Oracle_bak

echo.

echo 准备开始备份数据库...

rem 7天一个循环

if exist %backpath%\1 goto 1

if exist %backpath%\2 goto 2

if exist %backpath%\3 goto 3

if exist %backpath%\4 goto 4

if exist %backpath%\5 goto 5

if exist %backpath%\6 goto 6

if exist %backpath%\7 goto 7

echo E > %backpath%\1

:1

set backpath_full=%backpath%\1

ren %backpath%\1 2

goto back

:2

set backpath_full=%backpath%\2

ren %backpath%\2 3

goto back

:3

set backpath_full=%backpath%\3

ren %backpath%\3 4

goto back

:4

set backpath_full=%backpath%\4

ren %backpath%\4 5

goto back

:5

set backpath_full=%backpath%\5

ren %backpath%\5 6

goto back

:6

set backpath_full=%backpath%\6

ren %backpath%\6 7

goto back

:7

set backpath_full=%backpath%\7

ren %backpath%\7 1

goto back

:back

exp yssh/yssh file=%backpath_full%.dmp

set backpath=

set backpath_full=

exit
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: