ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-04043 and Bug 2365821

ORA-04043 and Bug 2365821

原创 Linux操作系统 作者:dbinsight 时间:2013-09-28 21:55:25 0 删除 编辑
如果在数据库Mount的时候Describe过DBA_*之类的数据字典,则会导致数据库在OPEN之后无法再查询之前desc过的数据字典。

模拟过程如下:
SQL>  select * from v$version where rownum < 2;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 4175568896 bytes
Fixed Size                  2233088 bytes
Variable Size            1224740096 bytes
Database Buffers         2902458368 bytes
Redo Buffers               46137344 bytes
Database mounted.
SQL> desc dba_data_files
ERROR:
ORA-04043: object dba_data_files does not exist


SQL> alter database open;

Database altered.

SQL> desc dba_data_files
ERROR:
ORA-04043: object dba_data_files does not exist

这是Oracle的一个Bug。
具体Bug信息如下:
BUG:2365821 - ORA-4043 ON DBA_* TABLES IF THEY ARE DESCIBED IN A MOUNT STAGE

三种Workaround的方式:
1:不要在mount时执行desc操作;
2:重启实例
3:alter system flush shared_pool;

我们采用第3种方式解决:

SQL> alter system flush shared_pool;

System altered.

SQL> select count(*) from dba_data_files;

  COUNT(*)
----------
         6


在手头另外的11.2.0.3、11.2.0.4和12.1.0.1环境中都测试了下,11.2.0.3环境还存在这个bug。在11.2.0.4和12.1.0.1中已经解决了这个Bug。

SQL> select banner from v$version where rownum < 2;

BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production


SQL> shutdown immediate
Database closed.
Database dismounted.
startup mount
ORACLE instance shut down.
SQL> ORACLE instance started.

Total System Global Area 1.6702E+10 bytes
Fixed Size                  2308312 bytes
Variable Size            2281703208 bytes
Database Buffers         1.4395E+10 bytes
Redo Buffers               23445504 bytes
Database mounted.
SQL> desc dba_data_files
ERROR:
ORA-04043: object dba_data_files does not exist


SQL> alter database open;

Database altered.

SQL> select count(*) from dba_data_files;

  COUNT(*)
----------
         4

具体可参考:
ORA-4043 On DBA_* Views If They Are Described In Mount Stage (文档 ID 296235.1)



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29154652/viewspace-773561/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-09-05

  • 博文量
    27
  • 访问量
    127612