Tuesday, July 27, 2010

Wrapping PL/SQL Source Code

Wrapping is the process of hiding PL/SQL source code. Wrapping helps to protect your source code from business competitors and others who might misuse it.

You can wrap PL/SQL source code with either the wrap utility or DBMS_DDL subprograms.

Guidelines for Wrapping
Wrap only the body of a package or object type, not the specification
Wrap code only after you have finished editing it.
Wrapped code cannot be unwrapped. To change wrapped PL/SQL code, edit the original source file and then wrap it again.

Limitations of Wrapping
Wrapping does not hide the source code for triggers
Wrapping is not a secure method for hiding passwords
Wrapping does not detect syntax or semantic errors

1. To run the wrap utility
wrap iname=input_file [ oname=output_file ]

2. DBMS_DDL.WRAP