Solved

Oracle Grant Permissions on a Package

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

808 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