Oracle wrap is great utility to encrypt your code. Now what is the use of it. For ex.
- If you want to stop misuse of your application.
- To prevent business competitor to view you code.
Now let see how it works. For ex. You source code is in wrap_test.sql file. Now to wrap the file open command prompt and go to bin directory where oracle is installed. Now type the following command to wrap the file
wrap iname=<input file path>
You can also provide the output file name as
wrap iname=<input file path> oname=<output file name>
If output file name is not mentioned then the wrapped file will be created in the BIN directory itself as .plb file.
Now let’s wrap the file using
The output of the wrap_output.plb will be like this
You can use the wrap code using normal import/export utility. And it is platform independent. But it’s upward compatible (Ex:- code wrapped in Oracle 8i will work 9i but not vice-verse).
Warning : Think twice before you do the wrap. You can’t un-wrap the wrapped code. So take the backup before you go ahead.
Note:- This wrap utility only wrap oracle related codes for ex:- function, procedure, package etc. It can not wrap any other format or flat file.
Oracle documentation for wrap utility is here.