Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

granting privileges on package

Status
Not open for further replies.

GoTerps88

Programmer
Apr 30, 2007
174
US
I created a package with probably over 25 individual procedures. When granting security, do I grant execute privileges on the package or to individual procedures, functions within the package?

The reason I ask is that I granted a user execute privileges on the package, but they are still unable to run the procedure. I didn't see where you could grant separate privileges on procedures in the package. I know the procedure works.
 
Goterps,

when you make a package and grant execute on it, the grantee may execute every function and procedure which appears in the specification of the package.

If a function or procedure only appears in the package body, it is (correctly) encapsulated within the package, and invisible to the outside world. This is a highly recommended technique for producing "black box" software, which has a public interface (the package specification) but private internals (the body).

If a function appears in the spec, and the grantee cannot execute it, then please let us know.

Regards

T

Grinding away at things Oracular
 
Thanks for your response. I was able to uncover the problem. I failed to preface the package with the schema.package.procedure syntax. I was only referencing the package.procedure in code. Now I am able to execute the procedure.
 
GoTerps88,

You may also create a [public] synonym for this package: in this case you don't need to specify fully qualified names.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top