概述:
定期Rman備份效驗,檢查數據完整性,本次玩點新花樣,手工建庫,按照時間點不完全恢復,恢復至2020.7.27 18:00的數據,使用26號全備,27號28號增量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測試應用端連接數據庫實例,檢查各業務功能和數據完整性。
總結:
有疑問的網友可以私信我,幫助別人使我快樂,希望通過這個平臺可以幫助更多的人。