Re: error in creating view on v$
On 11/16/05, Harvinder Singh <Harvinder.Singh@metratech.com> wrote:
I am trying to create view and getting following error:
SQL> create or replace view stats
2 as select 'STAT...' || a.name name, b.value
3 from v$statname a, v$mystat b
4 where a.statistic# = b.statistic#
5 union all
6 select 'LATCH.' || name, gets
7 from v$latch;
from v$statname a, v$mystat b
ERROR at line 3:
ORA-01031: insufficient privileges
This user have a dba privileges. Do I need to give any other privileges
to this user?
I'm assuming you are wishing to use Tom Kyte's runstats utility (or something derived from it) .
sys.v_$statnane, sys.v_$mystat and sys.v_$latch that are required.
You don't need to be SYS to do this.