备份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
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
相关文章推荐
- Oracle定时任务
- Oracle与MySQL存储过程以及游标使用的区别
- 简单几步让Chrome浏览器也能打开Oracle EBS
- oracle 11g RAC public/virtual/SACN/private IP we need to know
- 启动和关闭Oracle数据库
- ORACLE LOGMNR简单而强大的工具
- Oracle Data Security - Data Masking(数据屏蔽)
- Oracle创建存储过程以及JAVA调用方法
- Oracle 10g dataguard 物理备库日常维护
- Oracle执行计划
- Perl Oracle 中文乱码的问题
- oracle-0乱七八糟
- Oracle 10g dataguard broker 配置
- 如何查看及修改oracle编码格式方法
- 免安装oracle驱动访问数据库
- Oracle DB SQL 性能分析器
- rhel5.4 下oracle10g自启动
- oracle分区
- oracle sqlserver mysql随机行
- oracle锁表 解锁