1.关闭pdb数据库
2.restore pdb数据库
3.recover pdb数据库
4.resetlogs open 数据库

示例删除表进行恢复

1.备份数据库

  1. RMAN> backup pluggable database fixf;

2.删除表

  1. drop table fixf_Svr_szh;

3.关闭数据库

  1. RMAN> alter pluggable database fixf close;

4.创建辅助实例目录

  1. mkdir /opt/oracle/aux

5. restore recover 恢复数据库

  1. RMAN> restore pluggable database fixf until time "to_date('2019-11-21 10:36:00
  2. ','yyyy-mm-dd hh24:mi:ss')";
  3. recover pluggable database fixf until time "to_date('2019-11-21 10:36:00','yyyy-mm-dd hh24:mi:ss')"
  4. auxiliary destination '/opt/oracle/aux';

6.resetlogs open数据库

  1. RMAN> alter pluggable database fixf open resetlogs;

7.查询数据确认恢复成功

  1. select * from fixf_Svr_szh;

8.run块恢复

  1. run{
  2. alter pluggable database fixf close;
  3. set until time "to_date('2019-11-21 10:36:00','yyyy-mm-dd hh24:mi:ss')";
  4. restore pluggable database fixf;
  5. recover pluggable database fixf;
  6. alter pluggable database fixf open resetlogs;
  7. }

9.基于SCN恢复pdb

  1. rman target /
  2. alter pluggable database fixf close;
  3. restore pluggable database fixf until scn 3250816;
  4. recover pluggable database fixf until scn 3250816;
  5. alter pluggable database fixf open resetlogs;

10.基于还原点恢复

  1. rman target /
  2. alter pluggable database fixf close;
  3. restore pluggable database fixf to restore point robert;
  4. recover pluggable database fixf to restore point robert;
  5. alter pluggable database fixf open resetlogs;