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: How do I use views in a stored procedure?

Re: How do I use views in a stored procedure?

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 14 Aug 1998 02:52:29 GMT
Message-ID: <35da3216.14697066@netnews.worldnet.att.net>


On Wed, 12 Aug 1998 11:36:32 +0200, "Vaughan Mc Carthy" <vaughanm_at_medscheme.co.za> wrote:

>I want to create a procedure as system, with a select from dba_segments,
>which is a view. Whenever I try to compile this procedure, I get the
>following error: PLS-00201: identifier 'SYS.DBA_SEGMENTS' must be declared
>How do I get around this problem?

I think you would need to logon as SYS, and explicitly grant privs on the view to SYSTEM, i.e.

        grant select on sys.dba_segments to system.

Roles don't apply to queries written within a stored procedure.

Jonathan Received on Thu Aug 13 1998 - 21:52:29 CDT

Original text of this message

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