标题: 查询提示错误,却又出结果 [打印本页] 作者: chi7na 时间: 2008-07-30 09:17 标题: 查询提示错误,却又出结果 用scott用户在pl/sql dev下 连接oracle 10g,点击写个任意的sql语句f8后给出下面的提示“
Dynamic Performance Tables not accessible,
Automatic Statistics disabled for this session
You can disable statistics in the preference menu, or obtain select
priviliges on the v$session, v$sesstat and v$statname tables
”但是结果却可以出来,这个3个标(视图)在那个用户下,该怎么授权可以解决这个问题
英语要学好啊
[ 本帖最后由 chi7na 于 2008-7-30 17:00 编辑 ]作者: 天涯明月刀 时间: 2008-07-30 09:51
Dynamic Performance Tables not accessible,
Automatic Statistics disabled for this session
提示很明显啊作者: jingrui 时间: 2008-07-30 10:11
grant select on v$session to 你的用户名;
grant select on v$sesstat to 你的用户名;
grant select on v$statname to 你的用户名;作者: chi7na 时间: 2008-07-31 10:21
按照3楼的说法,提示找不到 v$session, v$sesstat and v$statname 这3张表,我用的是sys as dba
grant select on v$session to 你的用户名;
grant select on v$sesstat to 你的用户名;
grant select on v$statname to 你的用户名;作者: chi7na 时间: 2008-08-01 08:33
sqlplus sys/ as dba
SQL >grant select on v$session to scott;
grant select on v$session to scott;
*
ERROR at line 1 :
ORA-02030: can only select from fixed table/views
SQL >作者: 季候风 时间: 2008-08-01 09:18
step 1:
SQL> alter system set o7_dictionary_accessibility=true scope=spfile;
重启oracle使之生效
step 2:
SQL> grant create any table to 用户;
step3:
SQL> grant select any table to 用户;
操作例子:
1 create user TT
2 identified by TT
3* default tablespace TBS
SQL> /
用户已创建
SQL> grant create session to TT
2 ;
授权成功。
SQL> grant create any table to TT;
授权成功。
SQL> alter system set o7_dictionary_accessibility=true scope=spfile;
系统已更改。
SQL> grant select any table to TT;
授权成功。
SQL> show parameter o7
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY boolean FALSE
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL> show parameter o7
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
O7_DICTIONARY_ACCESSIBILITY boolean TRUE
SQL>作者: gthboy 时间: 2008-08-01 19:03
楼主问题解决了吗?作者: chi7na 时间: 2008-08-02 11:00
问题按照7楼的说法,已经解决了,能给个简单的说明吗