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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hide stored procedures from other users ?

Status
Not open for further replies.

zephan

Programmer
Jan 14, 2002
217
A2
Hi,
I want to write a procedure (or package) and inside the code, there is a password. How to hide the entire code from other users, and if possible from the owner itself. I hear that is called wrapping.
Regards,
Zephan
 
Zephan,

don't ever put passwords into your code. If it's there, sooner or later someone will find it and use it.

As to hiding the code from other users, that's easy.

Create a new user, called Zephan and grant privileges to create a package. Log in as zephan and create your package. Then grant execute on Zephan to the other users.

Other users will be able to invoke the functions and/or procedures in the package specification, but will not be able to 'see' the package body, thus protecting your code.

I repeat, never put passwords in code.

Regards

T
 

Even if you "wrap" the code, the constant values are visible to whomever can query the {dba|all}_source table. [noevil]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Thank you guys. Actually, I can start with a minimum level of security and enhance this later. I want to use the same feature oracle uses to hide it's own packages.
 

Beware that if you do "hide" (wrap) package(s)/procedure(s), you will need to keep the original source code safe somewhere. If you do not, and you loose the source, you will not be able to "un-wrap" the code (without extreemely great effort and time). [3eyes]




----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Thank you guy, but still I dont know how to wrap the code :)
 

zephan said:
Thank you guy, but still I dont know how to wrap the code :)

Wrap is an OS utlilty you can find under $ORACLE_HOME/bin. [pipe]




----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top