zoukankan      html  css  js  c++  java
  • X rman安装时间点进行恢复

    最近在对备份做周期性的测试。基本上做的时对指定时间点的恢复。本测试脚本是在有catalog DB,通过legato来实现的。下面帖上几步走:

    step 01 启动DB到nomount状态
    alter database nomount;

    step 02 连接catalog和target DB,执行恢复。
    connect catalog 
    rman/password@catdb
    connect target /

    run {
    allocate channel t1 device type 'SBT_TAPE'
    parms 'ENV=(NSR_SERVER=szvsx009,NSR_CLIENT=szvsv111)';
    set until time "to_date('2006-05-31 14:00:00','yyyy-mm-dd hh24:mi:ss')";
    restore controlfile;
    restore database;
    release channel t1;
    }
    step 03 更改数据库到mount状态
    alter database mount;
    step 04 recovery database 到指定的时间点
    run {
    allocate channel t1 device type 'SBT_TAPE'
    parms 'ENV=(NSR_SERVER=szvsx009,NSR_CLIENT=szvsv111)';
    set until time "to_date('2006-05-31 14:00:00','yyyy-mm-dd hh24:mi:ss')";
    recover database;
    release channel t1;
    }
    step 05 打开数据到read only 状态,检查recovery的result.

    alter database open read only;

  • 相关阅读:
    每日总结50
    每日总结49
    每日总结48
    每日总结47
    每日总结46
    每日总结45
    每日总结44
    每日总结42
    每日总结41
    每日总结39
  • 原文地址:https://www.cnblogs.com/chendian0/p/13070566.html
Copyright © 2011-2022 走看看