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: How to make a package run under users permissions?

Re: How to make a package run under users permissions?

From: <cmohan_at_iname.com>
Date: Fri, 10 Apr 1998 12:41:11 -0600
Message-ID: <6glljo$qhf$1@nnrp1.dejanews.com>


connect as system,
grant execute on procedure_name TO public; create public synonym procedure_name for procedure_name;

As the creator of the procedure, you would have had object privilege on the objects your procedure is using. Now if you grant execute to public, any one can execute the procedure, but be assured, public cannot work on the base objects directly.

A cleaner way of doing this is of course to create the procedure as a user other than system.

I tested this and it works.

Good luck,
cm

In article <6ge56c$705$1_at_nnrp1.dejanews.com>,   umpaul18_at_cc.umanitoba.ca wrote:
>
> G'day!
>
> I have a stored procedure (report tool sort of) that I want to make
available
> across schemas. The problem is that it executes under the permission set
> of the creator(SYSTEM), this isn't good. Is it possible to have a package
> do this(DBMS_SQL does)?
>
> If you're connected as 'scott' I want it to run as if 'scott' has created
it,
> and thus access scott's objects.
>
> Any help wouldbe greatly appreciated.
>
> Stay Casual,
>
> Ken
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri Apr 10 1998 - 13:41:11 CDT

Original text of this message

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