1. 操作前提
a. 数据文件创建之后的所有归档日志都可以用
b. 控制文件包含损坏的数据文件的名称
c. 没有相应的数据文件备份
2. 操作步骤
a. 删除数据文件模拟丢失
[oracle@oracle19c O19C]$ rm -rf aw01.dbf
b. 关闭数据库
SQL> shutdown abort;
c. 还原数据文件
SQL> startup;
ORACLE instance started.
Total System Global Area 2432695144 bytes
Fixed Size 8899432 bytes
Variable Size 536870912 bytes
Database Buffers 1879048192 bytes
Redo Buffers 7876608 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/opt/oracle/oradata/O19C/aw01.dbf'
SQL> alter database create datafile '/opt/oracle/oradata/O19C/aw01.dbf';
SQL> recover datafile '/opt/oracle/oradata/O19C/aw01.dbf'
ORA-00279: change 2251398 generated at 09/12/2024 10:19:33 needed for thread 1
ORA-00289: suggestion : /opt/oracle/product/19c/dbhome_1/dbs/arch1_1_1179483047.dbf
ORA-00280: change 2251398 for thread 1 is in sequence #1
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 2351431 generated at 09/12/2024 10:21:49 needed for thread 1
ORA-00289: suggestion : /opt/oracle/product/19c/dbhome_1/dbs/arch1_2_1179483047.dbf
ORA-00280: change 2351431 for thread 1 is in sequence #2
Log applied.
Media recovery complete.
SQL> alter database open;
备份不可用时,重建数据文件
原创dber_ablewang 博主文章分类:Oracle ©著作权
©著作权归作者所有:来自51CTO博客作者dber_ablewang的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:在线重做日志丢失后的恢复
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
RAC 某节点不可用时,对应VIP是否可用vip rac oracle linux 连接数据库