关于v$datafile中system表空间的status值始终为system

在查询数据文件的文件状态时,可以从v$datafile视图中查询。
v$datafile视图反映了从控制文件中看到的数据文件的状态。

官方对于V$DATAFILE的解释说明是:
This view contains datafile information from the control file.

关于这个视图中的STATUS 列存在五个值,分别是:
1. OFFLINE, 
2.ONLINE, 
3.SYSTEM,
4. RECOVER,
5. SYSOFF (an offline file from the SYSTEM tablespace)

在查询v$datafile视图时,总是能发现system表空间所使用的数据文件的状态是system。
SQL>select file#,name,status from v$datafile
     FILE# NAME                                     STATUS
---------- ---------------------------------------- ---------------------
         1 /oracle/oradata/orcl/system01.dbf        SYSTEM
         2 /oracle/oradata/orcl/undotbs01.dbf       ONLINE
         3 /oracle/oradata/orcl/sysaux01.dbf        ONLINE
         4 /oracle/oradata/orcl/users01.dbf         ONLINE
         5 /oracle/oradata/orcl/perfstat.dbf        ONLINE
         6 /oracle/oradata/orcl/test01.dbf          ONLINE
         7 /oracle/oradata/orcl/qu.dbf              ONLINE
         8 /oracle/oradata/orcl/qu01.dbf            ONLINE
         9 /oracle/oradata/orcl/test2_01.dbf        ONLINE
        10 /oracle/oradata/orcl/qq.dbf              ONLINE

10 rows selected.

对于这一点我觉得应该是system作为oracle数据库最重要的一个表空间,存放了数据字典以及其他的一些定义,所以纵使其他的表空间可以online或者offline,但是对于system表空间来说,是绝对不允许的,它的正常开启也代表了数据库的健康状态。所以只存在system状态。




请使用浏览器的分享功能分享到微信等