Re: a question for stored procedure

From: Roger Harris <CCCEF.RHARRIS_at_CAPITAL.GE.COM>
Date: 1996/02/23
Message-ID: <4gkh3g$ihr_at_gein.capital.ge.com>#1/1


xia__chr_at_tasb.org (Chris Xia) wrote:
>In article <4ggq62$bn9_at_news.acns.nwu.edu>, d-mausner_at_nwu.edu (Dave Mausner) writes:
>> In article <4gg7bt$hbq_at_gatekeeper.tasb.org>,
>> xia__chr_at_tasb.org (Chris Xia) wrote:
>> >Can I access tables that are not inside my schema when I create a
 stored procedure?
>> >
>> >According to the syntax of pl/sql , seems I should be able to do
 that , but I always
>> >
>> >got the error:
>> >
>> >4/1 PL/SQL: SQL Statement ignored
>> >4/33 PLS-00201: identifier 'DBA_OBJECTS' must be declared
>>
>> the DBA_OBJECTS synonym doesn't exist unless you run catdbsyn.sql
>> to create it. once it exists, you can select from it in pl/sql.
>>
>> --
>> Dave Mausner, Consulting Manager, Braun Technology Group, Chicago.
>
>
>I think I should supply a little bit more information here. I can do
> select * from dba_objects;
>just fine in sqlplus, and I have dba privilege.

I think the reason you are having problems is that the stored procedure does not have any of the privileges that you were granted thru roles. So even if you have the SELECT ANY TABLE privilege because you have the role DBA, you must have that privilege explicitly granted to yourself.

-- 
Roger Harris
Oracle DBA
GE Credit Corp
Danbury, CT
Received on Fri Feb 23 1996 - 00:00:00 CET

Original text of this message