[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文件,数据库还是可以启动且没有报错。
但实际情况是应该出现错误才是,我查看日志也没发现问题。