知识点记录:
不完全恢复:
set until time='26-10-08 15:35:33'; //设置until time
set until logseq 29;//设置until seq
recover database until available redo; <<<12c才有的
run{
allocate channel d1 type disk; #分配两个通道
allocate channel d2 type disk;
set until time='26-10-08 15:35:33'; #设置until time
restore database;
recover database; #recover database until time='26-10-08 15:35:33'
alter database open resetlogs;
}
[oracle@stat ~]$ export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
[oracle@stat ~]$ rman target /
RMAN> recover database until time '2006-09-14 19:00:00';
RMAN> recover database until time "to_date('2011-02-28 16:06:23','YYYY-MM-DD HH24:MI:SS')";
跳过部分表空间不恢复
RMAN> recover database skip tablespace TS_CRSP1,TS_OTHER,TS_CRSIM,TS_CRSEX,TS_CORIS,TS_BL,TS_BKG; #跳过不恢复的表空间
表过部分pdb不进行恢复
RMAN> recover database skip forever tablespace CFMDB_PRD:SYSTEM,CFMDB_PRD:SYSAUX,CFMDB_PRD:UNDOTBS1,CFMDB_PRD:TS_CFM,CFMDB_PRD:TS_CFM_HIS;