Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Accessing V$ Tables
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
![]() |
![]() |