美文网首页
Oracle备份恢复

Oracle备份恢复

作者: MaJiT | 来源:发表于2020-04-21 11:20 被阅读0次

    1.备份数据库 backup.bat

    @ECHO OFF
    set user=root
    set password=123456
    set sid=ORCL
    set logfile=./backup_20180912.log
    set backupfile=C:\temp\TEST_20180912.dmp
    exp %user%/%password%@%sid% file=%backupfile% log=%logfile% STATISTICS=NONE owner=(%user%)
    pause
    

    2.恢复数据库 restore.bat

    @ECHO OFF
    set user=root
    set password=123456
    set sid=ORCL
    set logfile=./restore_20180912.log
    set backupfile=C:/temp/TEST_20180912.dmp
    imp %user%/%password%@%sid% file=%backupfile% log=%logfile% ignore=y full=y;
    pause
    

    赋值到txt文件里,文件后缀改成bat双击执行命令

    相关文章

      网友评论

          本文标题:Oracle备份恢复

          本文链接:https://www.haomeiwen.com/subject/ouxuihtx.html