• oracle异地备份


    一、安装oracle客户端


    右键以管理员身份运行

    选择管理员


    跳过软件更新


    选择语言,默认中文


    指定安装位置


    检查当前环境


    安装

    二、使用exp命令备份

    exp 用户名/密码@IP地址/数据库 owner=所有者 file=%filename%.dmp log=%filename%.log
     
    三、新建批处理文件
    @echo off
    set logfile=.oraback.log      (指定备份日志文件名)
    set filename=.\%date:~0,4%%date:~5,2%%date:~8,2%    (指定备份文件名,以当前日期命名)
    set nowdate=%date:~0,4%%date:~5,2%%date:~8,2%       (获取当前日期)
    echo the BK is begining,Pls Waiting.... >>%logfile%         (echo内容到日志文件)
    echo The Time is %nowdate%---%time% now! >> %logfile%       (把当前时间输入到日志文件)
    exp 用户名/密码@IP地址/数据库  owner=所有者  file=%filename%.dmp log=%filename%.log     (执行备份命令)
    echo The Oracle Backup has completed.Bye! >>%logfile%         (echo内容到日志文件)
    echo the Completed time is %nowdate%---%time% >>%logfile%     (把当前时间输入到日志文件)
    echo line of demarcation*******************************>>%logfile%      (echo内容到日志文件)
    echo ***>>%logfile%    (echo内容到日志文件)
    echo ***>>%logfile%    (echo内容到日志文件)
    forfiles /p "." /s /m *.dmp /d -15 /c "cmd /c del @path"       (删除15天前,后缀名为dmp的文件)
    forfiles /p "." /s /m *.log /d -15 /c "cmd /c del @path"       (删除15天前,后缀名为log的文件)

    三、添加批处理文件到任务计划

  • 相关阅读:
    PetShop数据访问层之消息处理 《解剖PetShop》系列之三
    正则过滤汉字
    c语言 断点续传3
    c 写cgi 与socket通信
    C 语言 断点续传2
    承接B2C商城定制开发 空间+域名+风语商城系统=¥4000
    16进制 SQL注入
    c# socket传送大文件
    c写cgi cookies 设置与读取
    cgi 操作封装
  • 原文地址:https://www.cnblogs.com/zhenwei66/p/10498848.html
Copyright © 2020-2023  润新知