ORA-04043: 对象 dba_data_files 不存在 BUG

在mount状态的时候,如果你desc dba_*数据字典,会报错:
SYS@ning>select status from v$instance;

 STATUS
 ------------
 MOUNTED

 SYS@ning>desc dba_data_files
 ERROR:
ORA-04043: object dba_data_files does not exist

然后,即使你将数据库alter database open到open状态,还是会报同样的错误:
SYS@ning>alter database open;

 Database altered.

 SYS@ning>desc dba_data_files
 ERROR:
ORA-04043: object dba_data_files does not exist

 SYS@ning>select * from dba_data_files;
 select * from dba_data_files
               *
 ERROR at line 1:
 ORA-00942: table or view does not exist

 SYS@ning>desc dba_temp_files;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 FILE_NAME                                          VARCHAR2(513)
 FILE_ID                                            NUMBER
 TABLESPACE_NAME                           NOT NULL VARCHAR2(30)
 BYTES                                              NUMBER
 BLOCKS                                             NUMBER
 STATUS                                             CHAR(9)
 RELATIVE_FNO                                       NUMBER
 AUTOEXTENSIBLE                                     VARCHAR2(3)
 MAXBYTES                                           NUMBER
 MAXBLOCKS                                          NUMBER
 INCREMENT_BY                                       NUMBER
 USER_BYTES                                         NUMBER
 USER_BLOCKS                                        NUMBER

也就是说,只要你在mount状态下desct过某个dba视图,oracle就不认识它了,除非你重启数据库.

oracle说这个bug影响的版本为Oracle Server - Enterprise Edition - Version: <8.1.7.4 to 10.1.0.3

实际上,我上面的操作都是在10.2.0.3中,这么多版本了,oracle就一直没想过要修复这个问题?还是给出下面这种哭笑不得的解决方法:
1) Don't describe the dba_* views at mount stage.
 2) If you issue DESC of any DBA_*views at mount stage, then shutdown and restart the 
 instance.


参考:
Note:296235.1
 Bug 2365821 

你可能感兴趣的:(object,bug,ORA-04043,2365821,Note296235.1,dba_data_file)