Solved

Oracle Grant Permissions on a Package

Posted on 2008-10-10
4
10,477 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
I need to be able to return multiple values in my SQL case statement 12 93
dates - loop 12 57
history tablespace temp usage 2 31
Get the parent node - XMLTYPE 9 56
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now