SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup nomount
ORACLE 例程已经启动。
Total System Global Area 612368384 bytes
Fixed Size 1292036 bytes
Variable Size 234883324 bytes
Database Buffers 369098752 bytes
Redo Buffers 7094272 bytes
SQL> desc user_tables
ERROR:
ORA-04043: ?? user_tables ???
SQL> alter database mount;
数据库已更改。
SQL> alter database open;
数据库已更改。
SQL> desc user_tables
ERROR:
ORA-04043: ???? user_tables ??????
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
C:Userscwhlf>sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on 星期四 1月 12 16:13:17 2012
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> desc user_tables
ERROR:
ORA-04043: 对象 user_tables 不存在
SQL>
如果用sqlplus在nomount状态desc了一下,再open之后就会报错,说对象不存在,重启oracle后才好使。
据说这是一个bug,这么基础的功能里居然还有bug。
这样看来最好的验证数据库是否打开的语句是
select table_name from user_tables;
找到解决方法了
SQL> alter system flush shared_pool;
系统已更改。
SQL> desc user_tables;
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
TABLE_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(30)
IOT_NAME VARCHAR2(30)
STATUS VARCHAR2(8)
如果清空内存之后,这个表就会显示出来。
看来数据库打开之后,查询的是已经存在的内存,如果将内存清空,那么就会重新载入这个表,这时就能查到了。
我以前介绍的grant赋权清空内存的方法无效,因为对象找不到,所以肯定是无效的。
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/41451/viewspace-1057101/ ,如需转载,请注明出处,否则将追究法律责任。