RMAN恢复策略

使用RMAN执行不完全恢复操作时需要完成的一个工作是建立恢复目标(方式)。它是恢复进程的终点,通常我们基于一个时间点、指定的SCN号或是一个日志序列号来标识它。使用UNTIL time | SCN | sequence参数。

1.       时间点恢复

--控制文件已恢复  startup mount;

Eg: run{ allocate channel c2 device type disk format=’c:/backup/ ora_mck54983_1_1’;

set untile time “to_date(‘2009-12-18 13:10:00’,’YYYY-mm-dd hh24:mi:ss’)”;

restore database;      recover database; } alter database open resetlogs;

  或是不用RUN块,但必须已指定备份位置。

     EG:startup mount;   restore database until time “…………………………….”;

        Recover database until time “………………………”; alter database open resetlogs;

    最后要强调的是必须具备我们所指定的恢复时间之前生成的备份,此外还要所有的归档日志。可以使用 list report 命令,确定RMAN还原库可以使用的备份。

2.       SCN恢复

--startup mount;

restore database until scn 1236546; recover database until scn 1236546;

alter database open resetlogs;

3.       日志序列恢复

--startup mount;

restore database until sequence 20 thread 1;

 recover database until sequence 20 thread 1;  alter database open resetlogs;

还原到日志序列为100(不包含100)的数据库。

  RMAN不支持类似于sql*plus的基于删除的恢复(与日志恢复类似)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值