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

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

From: skv <skv_at_kpbank.ru>
Date: 1997/09/29
Message-ID: <01bccc9c$0ef17180$0bc47cc1@skv.hq.kem>#1/1

        hi Jonathan
 You must GRANT SELECT directly to user(connected as DBA) or replace DBA_SYNONYMS with ALL_SYNONYMS

Regards


         Konstantin V. Sartakov
                Kuzbassprombank
                       Kemerovo
                         Russia
           mailto:skv_at_kpbank.ru

Jonathan Gennick <gennick_at_worldnet.att.net> çàïèñàíî â ñòàòüþ <343002dd.3200785_at_netnews.worldnet.att.net>...
> 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