Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle Grant Permissions on a Package

Posted on 2008-10-10
4
Medium Priority
?
10,932 Views
Last Modified: 2013-12-19
Hi,

If I have created a package 'A' and I need to grant the following permissions on 'A' to a role 'R' how do I write this in SQL, the persmissions I need are..

1) Drop both package body and header.
2) Allow Compile.
3) Execute permissions.
4) Change the package code.

Thanks Ian


0
Comment
Question by:ISC
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
Shaju Kumbalath earned 1500 total points
ID: 22686976
For droping the package of others schema   the role  should have a  DROP ANY PROCEDURE system  privilege.
for compile and exeting the package the role should have execute and debug and execute object privilege on that object
Grant DROP ANY PROCEDURE to R;
Grant execute,debug on A to R
 
0
 
LVL 23

Expert Comment

by:David
ID: 22701995
The above comment is correct.  I wish to throw in a professional observation that granting such system-level privileges is a security violation in many shops -- especially when you want to give someone other than the data (schema) owner permission to change DDL.  Please, please reconsider your "need" to be so lax.
Kind regards,
dvz
zone expert  
0
 
LVL 1

Author Comment

by:ISC
ID: 22816042
Hi,

Agreed in a working (BUAT/live) environment you would not want to grant these privileges however I am setting up a development environment for a offshore resource who may need to alter, drop, and compile...

Thanks Ian
0
 
LVL 1

Author Closing Comment

by:ISC
ID: 31504969
"For droping the package of others schema   the role  should have a  DROP ANY PROCEDURE system  privilege." - Is it possible just to grant drop privileges on a single package..?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question