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: PL/SQL Package

Re: PL/SQL Package

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 07 Jul 2006 19:06:30 +0200
Message-ID: <0s4ta2lackp8n4jednb0ao9t1fhe5od20e@4ax.com>


On Fri, 07 Jul 2006 17:22:10 +0200, Christian Schneider <Dudeldd_at_gmx.de> wrote:

>> CREATE OR REPLACE PACKAGE XXXX ...
>>
>> GRANT EXECUTE ON XXXX TO ...
>>
>
>I know those commands seperately - I just never used them in combination
> - And I don't get the point -
>How does this work, then?
>
>How do you use the package, or the "grant"???
>
>Lets say, I have a user and want to give him the right to do all the
>things that are granted in the package, or just certain things of the
>package - how do I do this???
>
>
>Thanks,
>
>Chris

Your package would contain
1 procedure to select a row
1 procedure to insert a row
1 procedure to update a row
1 procedure to delete a row

you would use them by using the ordinary begin
<package>.<procedure>;
end;
/
syntax.

The advantage of such packages is, if they are owned by the owner of the affected tables, the users calling them no longer need privileges on the underlying tables.
As a package is an entity, you can only grant privilege to the complete package.

I would suggest the PL/SQL reference manual on http://tahiti.oracle.com is your friend or any book by Steven Feuerstein on PL/SQL.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Jul 07 2006 - 12:06:30 CDT

Original text of this message

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