|
scott@ORADB> conn / as sysdba
Connected.
sys@ORADB> select count(*)from x$bh;
COUNT(*)
----------
10958
sys@ORADB> grant select on x$bh to scott;
grant select on x$bh to scott
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
sys@ORADB> grant select on x_$bh to scott;
grant select on x_$bh to scott
*
ERROR at line 1:
ORA-00942: table or view does not exist
sys@ORADB> conn scott/tiger@oradb
Connected.
scott@ORADB> select count(*)from x$bh;
select count(*)from x$bh
*
ERROR at line 1:
ORA-00942: table or view does not exist
scott@ORADB> select count(*)from x_$bh;
select count(*)from x_$bh
*
ERROR at line 1:
ORA-00942: table or view does not exist
根据上面的我要在SCOTT用户下怎么查询x$bh表呢
我看到陈吉平书上有
Piner@10gR2>select file#,dbablk,tch from x$bh where obj=
(select data_object_id from dba_objects
where owner='PINER' and object_name='TEST')
order by dbablk;
P15
select count(*) from v$bh where objd=
(select data_object_id from dba_objects
where owner='PINER' and object_name='TEST')
and status !='free'
这个可是在普通用户下可用查询x$bh的
[ 本帖最后由 hjinhe 于 2008-3-10 09:39 编辑 ] |
|