Simulate a datafile was lost accidently.
shutdown database then rm test01.dbf.
startup the database again.
SQL> SQL> SQL> SQL> startup
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 1279916 bytes
Variable Size 536873044 bytes
Database Buffers 671088640 bytes
Redo Buffers 15495168 bytes
Database mounted.
Database opened.
SQL> conn test/test;
Connected.
SQL> select count(*) from test;
select count(*) from test
*
ERROR at line 1:
ORA-00376: file 6 cannot be read at this time
ORA-01110: data file 6: '/home/oracle/test01.dbf'
SQL> conn / as sysdba
Connected.
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_
---------- ------- -------
ERROR CHANGE#
----------------------------------------------------------------- ----------
TIME
---------
6 OFFLINE OFFLINE
FILE NOT FOUND
Create an error!
数据库文件丢失与恢复
最新推荐文章于 2025-12-04 15:25:15 发布
本文记录了一次意外丢失数据库文件后的处理过程。模拟了误删除数据文件test01.dbf后重启数据库的情况,并展示了遇到ORA-00376错误时如何通过sysdba权限进行故障诊断及文件状态查询。
3160

被折叠的 条评论
为什么被折叠?



