Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to query a view in PL/SQL package but can query it in SQL*Plus

LauryAug 14 2014 — edited Aug 14 2014

Hi,

Logged as a given user, I can query the table DBA_SEGMENTS, but I cannot query it through a cursor or select into in a PL/SQL package.

I get the following error message:

LINE/COL ERROR

-------- -----------------------------------------------------------------

28/4     PL/SQL: SQL Statement ignored

33/5     PL/SQL: ORA-00942: table or view does not exist

28                     select

29                             count(*)

30                     into

31                             n

32                     from

33                             dba_segments;


Can someone explain me what is the missing privilege that I need?

Thanks by advance.

Kind Regards.

This post has been answered by doganay.wordpress.com on Aug 14 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2014
Added on Aug 14 2014
2 comments
409 views