遇到个奇怪的问题,oracle启动到start nomount状态后,等了会忘了没有open就直接desc dba_objects 报错,然后把数据库打开,还是如此.后来在网上才发现是oracle的一个bug,如果在mount状态之前有desc过任何对象,则在open后相关的对象无法desc. 解决办法是重启数据库.
SQL> desc dba_data_files;
ERROR:
ORA-04043: object dba_data_files does not exist
SQL> desc dba_objects;
ERROR:
ORA-04043: object dba_objects does not exist
SQL> select status from v$instance;
STATUS
------------------------
STARTED
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
SQL> desc dba_objects;
ERROR:
ORA-04043: object dba_objects does not exist
SQL> desc dba_data_files;
ERROR:
ORA-04043: object dba_data_files does not exist
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 411041792 bytes
Fixed Size 1249272 bytes
Variable Size 138412040 bytes
Database Buffers 264241152 bytes
Redo Buffers 7139328 bytes
数据库装载完毕。
数据库已经打开。
SQL> desc dba_objects;
名称 是否为空? 类型
----------------------------------------- -------- ------------------------
OWNER VARCHAR2(30)
OBJECT_NAME VARCHAR2(128)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NUMBER
NUMBER
VARCHAR2(19)
DATE
DATE
VARCHAR2(19)
VARCHAR2(7)
VARCHAR2(1)
VARCHAR2(1)
VARCHAR2(1)
SQL>
因篇幅问题不能全部显示,请点此查看更多更全内容