概述:
定期Rman备份效验,检查数据完整性,本次玩点新花样,手工建库,按照时间点不完全恢复,恢复至2020.7.27 18:00的数据,使用26号全备,27号18号增量DB和ARCH。
1、手工建立spfile文件
2、建立路径目录
mkdir -p /u01/App/oracle/oradata/DEMODB0727/controlfile
mkdir -p /u01/app/oracle/oraarch/demodb0727
mkdir -p /u01/app/oracle/admin/demodb0727/adump
3、恢复控制文件
rman target /
restore controlfile from '/u01/bak/backuprman/c-97715997-20200729-00';
4、数据效验
RMAN>
alter database mount;
crosscheck backup;
crosscheck copy;
delete noprompt expired backup;
delete noprompt expired copy;
catalog start with '/u01/bak/backuprman';
5、恢复脚本
RMAN>
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
set until time '2020-07-27 18:00:00';
set newname for database to new;
set newname for tempfile 1 to new;
set newname for tempfile 2 to new;
set newname for tempfile 3 to new;
restore database;
switch datafile all;
switch tempfile all;
release channel c1;
release channel c2;
}
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
set until time '2020-07-27 18:00:00';
recover database;
release channel c1;
release channel c2;
}
6、打开数据时,重置重做日志
SQL>
alter database open resetlogs;
7、erp测试应用端连接数据库实例,检查各业务功能和数据完整性。
总结:
有疑问的网友可以私信我,帮助别人使我快乐,希望通过这个平台可以帮助更多的人。