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: Need V$ Table from PL/SQL

Re: Need V$ Table from PL/SQL

From: Naresh <nramamur_at_worldnet.att.net>
Date: 1997/09/06
Message-ID: <34120200.C5B@worldnet.att.net>#1/1

Bill,

When you refer to V$PARAMETER as SYS.V$PARAMETER, ORACLE looks for an object called V$PARAMETER owned by the account SYS. Unfortunately there does not exist such an object...and hence the error.

V$PARAMETER is a public synonym referring to the view "V_$PARAMETER" owned by SYS. Note the underscore after the V. Your PL/SQL module will work if you add this underscore after the V. Or you could remove the "SYS." and just use V$PARAMETER.

For more information on the data dictionary views refer to the "ORACLE Server Reference Manual".

Naari.

Bill Canning wrote:
>
> I'm having a problem accessing Oracle v$ dynamic performance tables from
> inside PL/SQL (starting with v$parameter, but I also need others).
>
> Code looks something like this (I'm logged into SQL PLUS with
> dba privileges)...
>
> DECLARE
> local_name varchar2(64);
> local_value varchar2(512);
> CURSOR c1 is select name, value from sys.v$parameter;
> BEGIN
> OPEN c1;
> LOOP
> FETCH c1 into local_name, local_value;
> <more stuff here>
> EXIT WHEN c1%NOTFOUND;
> END LOOP;
> END;
> /
>
> I get compilation errors creating procedure 'PLS-00201: identifier
> 'SYS.V$PARAMETER' must be declared.
>
> I'm new to PL/SQL. Is this something obvious I'm doing wrong or
> is there a restriction on PL/SQL and v$ tables. If so, is there any
> work around?
>
> Thanks in advance,
>
> Bill Canning
> bill.canning_at_sandiegoca.ncr.com
Received on Sat Sep 06 1997 - 00:00:00 CDT

Original text of this message

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