请手工删除之前所有的归档日志和备份文件,并对现在的数据库做一个全备
RMAN> backup database; // 全库备份
模拟故障:将该文件清空
echo ‘’ > /u01/app/oracle/oradata/orcltest/system01.dbf
现象:查询数据字典报错
SQL> select * from dba_users;
select * from dba_users
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01115: IO error reading block from file (block # )
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcltest/system01.dbf'
ORA-27072: File I/O error
Additional information: 4
Additional information: 95524
修复:先关库,然后使用rman还原恢复,最后启库
SQL> shutdown abort
SQL> startup mount
RMAN> restore datafile 1;
RMAN> recover datafile 1;
SQL> alter database open;