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

Home -> Community -> Usenet -> c.d.o.misc -> Re: compilation error--a procedure under system account

Re: compilation error--a procedure under system account

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 8 Apr 2005 06:36:48 +0200
Message-ID: <42560a42$0$13822$626a14ce@news.free.fr>

"Oracle User" <zengyiming_at_gmail.com> a écrit dans le message de news:da0cd53a.0504072021.56c1e413_at_posting.google.com...
| Hi,
| I have the following procedure
| create or replace procedure t is
| begin
| select sum(reloads), sum(pins) from v$librarycache;
| end t;
| /
|
| I want to compile it under oracle system account using
| @$HOME/.../t.sql;
|
| got an error during compilation which says v$librarycache does not
| exist.
|
| I can run the exact sql query "select sum(reloads), sum(pins) from
| v$librarycache;" in sqlplus prompt.
| So I guess it's because I put it in a PROCEDURE.
|
| Anyone knows how to solve this problem if I definitely need it inside
| a procedure?
| Thanks.

grant select on v_$librarycache to system;

as a hint, try: "set role none" and the query.

Regards
Michel Cadot Received on Thu Apr 07 2005 - 23:36:48 CDT

Original text of this message

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