1,恢复并修改spfile

RMAN> restore spfile to 'D:\spfile' from 'E:\backup\C-2441588677-20200528-00';
--修改pfile # SQL> create pfile from spfile='D:\spfile';
--去掉RAC相关的内容 , 如果去除不干净会报错 ORA-01620: no public threads are available for mounting

2,启动到nomount状态,恢复控制文件并mount

RMAN> restore controlfile from 'E:\backup\C-2441588677-20200528-00';
RMAN> sql ' alter database mount ';
--最好重建控制文件或手动renameASM数据文件,否则后续操作会根据控制文件的ASM信息去查询,极大的拖慢了速度

3,catalog RMAN备份

RMAN> catalog start with 'E:\backup\';

4,RMAN恢复

RMAN> run {
 allocate channel c1 type disk ;
 allocate channel c2 type disk ;
 allocate channel c3 type disk ;
 allocate channel c4 type disk ;
 set newname for database to 'E:\oradata\%b';
 restore database  ;
 switch datafile all ;
 recover database ;
 release channel c1 ;
 release channel c2 ;
 release channel c3 ;
 release channel c4 ;
 }

5,打开数据库

-- rename logfile , tempfile first
SQL> alter database open resetlogs;
  • No labels