error in creating view on v$ 2005-11-17 - By Niall Litchfield
On 11/16/05, Harvinder Singh <Harvinder.Singh@(protected)> wrote: > > Hi, > > I am trying to create view and getting following error: > SQL> create or replace view stats > 2 as select 'STAT...' || a.name <http://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 (See ORA-01031.ora-code.com): 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) . If so check out the requirements at http://asktom.oracle.com/~tkyte/runstats.html In particular note the grant os select on sys.v_$statnane, sys.v_$mystat and sys.v_$latch that are required. You don't need to be SYS to do this.
-- > Niall Litchfield > Oracle DBA > http://www.niall.litchfield.dial.pipex.com
<div><span class="gmail_quote">On 11/16/05, <b class="gmail_sendername" >Harvinder Singh</b> <<a href="mailto:Harvinder.Singh@(protected)" >Harvinder.Singh@(protected)</a>> wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0 .8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>I am trying to create view and getting following error:<br>SQL> create or replace view stats <br>2 as select 'STAT...' || <a href="http://a.name">a.name</a> name , b.value<br>3 from v$statname a, v$mystat b<br>4 where a.statistic# = b .statistic#<br>5 union all<br>6 select 'LATCH.' || name, gets <br>7 from v$latch;<br> from v$statname a, v$mystat b<br> *<br>ERROR at line 3:<br>ORA-01031 (See ORA-01031.ora-code.com): insufficient privileges<br><br>This user have a dba privileges. Do I need to give any other privileges <br>to this user?</blockquote> <div> </div> <div>I'm assuming you are wishing to use Tom Kyte's runstats utility (or something derived from it) .</div> <div> </div> <div>If so check out the requirements at <a href="http://asktom.oracle.com/ ~tkyte/runstats.html">http://asktom.oracle.com/~tkyte/runstats.html</a> In particular note the grant os select on</div> <div> </div> <div>sys.v_$statnane, sys.v_$mystat and sys.v_$latch that are required. < /div> <div> </div> <div>You don't need to be SYS to do this. </div><br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0 .8ex; BORDER-LEFT: #ccc 1px solid">-- <br>Niall Litchfield<br>Oracle DBA<br><a href="http://www.niall.litchfield.dial.pipex.com">http://www.niall.litchfield .dial.pipex.com </a> </blockquote></div>
|
|