Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do I use views in a stored procedure?
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
![]() |
![]() |