Solved

Oracle Grant Permissions on a Package

Posted on 2008-10-10
4
10,550 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
data lookup in Oracle - need suggestions 55 121
Shredding xml into an oracle 11g Database 2 58
dbms_crypto.decrypt   errors out 6 33
Row_number in SQL 6 33
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

791 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