• 各类数据库备份命令汇总


    //说明:编写一个含以下内容的bat批处理文件,在系统执行任务中定时执行,则形成定时数据库备份策略

    @echo off
    echo 正在备份TX_SJ_JYGL Oracle 数据库,请稍等......
    exp userid='system/RKZX@192.168.10.199/ORCL' owner=TXSJJYGL compress=n file=D:DatabaseBackupORACLETXSJJYGL%date:~0,4%%date:~5,2%%date:~8,2%.dmp

    echo 正在备份YZWLW Oracle 数据库,请稍等......
    exp userid='system/RKZX@192.168.10.199/ORCL' owner=YZWLW compress=n file=D:DatabaseBackupORACLEYZWLW%date:~0,4%%date:~5,2%%date:~8,2%.dmp

    echo 正在备份TX_JYGL Oracle 数据库,请稍等......
    exp userid='system/RKZX@192.168.10.199/ORCL' owner=TXJYGL compress=n file=D:DatabaseBackupORACLETXJYGL%date:~0,4%%date:~5,2%%date:~8,2%.dmp

    echo 正在备份JYDB Oracle 数据库,请稍等......
    exp userid='system/RKZX@192.168.10.199/ORCL' owner=JYDB compress=n file=D:DatabaseBackupORACLEJYDB%date:~0,4%%date:~5,2%%date:~8,2%.dmp

    echo 正在备份TX_WLWGKPT Oracle 数据库,请稍等......
    exp userid='system/RKZX@192.168.10.199/ORCL' owner=TX_WLWGKPT compress=n file=D:DatabaseBackupORACLETX_WLWGKPT%date:~0,4%%date:~5,2%%date:~8,2%.dmp

    echo 正在备份TX_ZDZFJGXT Oracle 数据库,请稍等......
    exp userid='system/RKZX@192.168.10.199/ORCL' owner=TX_ZDZFJGXT compress=n file=D:DatabaseBackupORACLETX_ZDZFJGXT%date:~0,4%%date:~5,2%%date:~8,2%.dmp

    echo 正在删除过期备份,请稍等......
    forfiles /p "D:DatabaseBackupORACLE" /s /m *.* /d -15 /c "cmd /c del @path"

    CD D:dmdbmsin
    echo 正在备份TX_SJ_JYGL DM数据库,请稍等......
    dexp USERID=TX_SJ_JYGL/RKZXRKZX FILE=D:DatabaseBackupDMTX_SJ_JYGL%date:~0,4%%date:~5,2%%date:~8,2%.dmp FULL=y

    echo 正在备份TX_JYGL DM数据库,请稍等......
    dexp USERID=TX_JYGL/RKZXRKZX FILE=D:DatabaseBackupDMTX_JYGL%date:~0,4%%date:~5,2%%date:~8,2%.dmp FULL=y

    echo 正在删除过期备份,请稍等......
    forfiles /p "D:DatabaseBackupDM" /s /m *.* /d -15 /c "cmd /c del @path"

    cd D:GBaseServerin
    echo 正在备份TX_JYGL Gbase 数据库,请稍等......
    dump.exe -uTX_JYGL -pRKZXRKZX --opt -R tx_jygl>D:DatabaseBackupGBASE x_jygl_%date:~0,4%%date:~5,2%%date:~8,2%.SQL

    echo 正在备份TX_SJ_JYGL Gbase 数据库,请稍等......
    dump.exe -uTX_SJ_JYGL -pRKZXRKZX --opt -R tx_sj_jygl>D:DatabaseBackupGBASE x_sj_jygl_%date:~0,4%%date:~5,2%%date:~8,2%.SQL

    echo 正在删除过期备份,请稍等......
    forfiles /p "D:DatabaseBackupGBASE" /s /m *.* /d -15 /c "cmd /c del @path"

    echo 任务完成!

  • 相关阅读:
    实训-涉及前端的一些小总结
    实训-mybatis-经验总结2
    实训-mybatis-经验总结
    中软实训笔记
    jsp 中JSTL遇到的报错异常
    mysql的小发现
    Maven笔记
    springmvc-3-拦截器
    springmvc 上传图片
    springmvc
  • 原文地址:https://www.cnblogs.com/softmans/p/5713866.html
Copyright © 2020-2023  润新知