[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Mar 15 20:35:52 2020
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 6680915968 bytes
Fixed Size 2213936 bytes
Variable Size 4496295888 bytes
Database Buffers 2147483648 bytes
Redo Buffers 34922496 bytes
Database mounted.
SQL> select name from v$datafile;
NAME
-----------------------------------
/oradata/orcl/system01.dbf
/oradata/orcl/sysaux01.dbf
/oradata/orcl/undotbs01.dbf
/oradata/orcl/users01.dbf
SQL> ! mv /oradata/orcl/users01.dbf /oradata/orcl/users01.dbf.bak
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 6680915968 bytes
Fixed Size 2213936 bytes
Variable Size 4496295888 bytes
Database Buffers 2147483648 bytes
Redo Buffers 34922496 bytes
Database mounted.
SQL> select name from v$datafile;
NAME
-----------------------------------
/oradata/orcl/system01.dbf
/oradata/orcl/sysaux01.dbf
/oradata/orcl/undotbs01.dbf
/oradata/orcl/users01.dbf
SQL> ! ls /oradata/orcl/
control01.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf.bak
redo01.log redo03.log system01.dbf undotbs01.dbf
SQL>
通过mv命令移除了user01.dbf文件,数据库还是可以启动且没有报错。
但实际情况是应该出现错误才是,我查看日志也没发现问题。
mount这一步还不到读取数据文件,open才读取。
oracle启动过程
nomount:读取参数文件
mount:读取控制文件,从控制文件中读取数据文件及重做日志文件名称与状态,但是,此时并不检查数据文件与重做日志文件的存在性。
open:读取日志文件,数据文件,验证一致性,打开数据库。
看你是怎么一个损坏,文件系统的损坏还是文件本身被破坏。如果文件系统的问题,文件截短后还能被挂载很正常