Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Accessing V$ Tables

Re: Accessing V$ Tables

From: kyle hailey <nospam_khailey_at_fr.oracle.com>
Date: 1997/10/22
Message-ID: <344DE8B7.53EC@fr.oracle.com>#1/1

Perhaps try granting select directly to the user. There are some security issues using grants given through roles in package procedures. Call Oracle support or look in the docs for more information on roles and stored procedures (sorry don't have any page numbers).

Srinivasan Sankar wrote:
>
> I'm trying to access some V$ tables thro' a stored procedure. But its giving me
> the following errors.
>
> 4/2 PL/SQL: SQL Statement ignored
> 6/7 PLS-00201: identifier 'SYS.V_$SQLAREA' must be declared
>
> This is what I'm doing in a procedure,
>
> create or replace procedure test
> as
> begin
> insert into testable(sqltext)
> select sqltext
> from v$sqlarea;
> end;
>
> But when i run this query as a pl/sql block like this,
>
> begin
> insert into testable(sqltext)
> select sqltext
> from v$sqlarea;
> end;
>
> it works. Is it not possible to access these table thro' a procedure or a
> function?
>
> Thanks.......Srini
>
> --
> *****************************************************************
> "There are no strangers in life, only friends you've not yet met"
> Srinivasan Sankar srinisankar_at_hotmail.com
> *****************************************************************
> P.S:- Replace "nospam" with "hotmail" while replying to me
 

-- 
Kyle Hailey
Oracle Support France

[ What's Oracle got to do with it? These opinion's don't neccessarily
reflect my employer. ]
Received on Wed Oct 22 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US