Solved

Oracle Grant Permissions on a Package

Posted on 2008-10-10
4
10,449 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.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
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.

757 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