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 -> Can't create cursor on dba_synonyms, what's wrong?

Can't create cursor on dba_synonyms, what's wrong?

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1997/09/29
Message-ID: <343002dd.3200785@netnews.worldnet.att.net>#1/1

I am trying to create a cursor, in a PL/SQL procedure, on the dba_synonyms view, but can't seem to make it work. See below for some code which reproduces the error. However, I can create a cursor on user_synonyms. What's going on here? Why can I see one view and not the other? Is there some simple, boneheaded thing, which I am not doing correctly?

Here's the code:

SQL> create or replace procedure SynTest as   2 cursor EachSynonym is
  3 select * from dba_synonyms;
  4 begin
  5 null;
  6 end;
  7 /

Warning: Procedure created with compilation errors.

SQL>
SQL> show errors
Errors for PROCEDURE SYNTEST:

LINE/COL ERROR



3/5      PL/SQL: SQL Statement ignored
3/19     PLS-00201: identifier 'SYS.DBA_SYNONYMS' must be
declared
SQL>
SQL> create or replace procedure SynTest as   2 cursor EachSynonym is
  3 select * from user_synonyms;
  4 begin
  5 null;
  6 end;
  7 /

Procedure created.

SQL> regards,

Jonathan Gennick

gennick_at_worldnet.att.net Received on Mon Sep 29 1997 - 00:00:00 CDT

Original text of this message

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