The Wrap is the utility in Oracle to hide the PL SQL code. In this tutorial, you will learn how to wrap PL SQL code.
1. Wrap PL SQL Code Using Command Line Example
Wrap command takes two parameters, first iname for the source file and the second oname for the encrypted file. Follow these steps to encrypt the file containing PL/SQL source code.
- On your computer, open Command Prompt.
- Change to the directory where your SQL code resides.
- Then type the Wrap command as shown in below example.
wrap iname=emp_pkg.sql oname=emp_pkg_hide.sql
Output
PL/SQL Wrapper: Release 11.1.0.7.0- Production on Mon Jul 15 22:15:31 2018 Copyright (c) 1993, 2004, Oracle. All rights reserved. Processing emp_pkg.sql to emp_pkg_hide.sql
2. Steps To Wrap PL SQL Code Using Toad Example
- Click on the Menu Utilities > Wrap Code.
- For the Input File field, provide the source file name with the path (use the browse button).
- For the Output File field, provide the file name with the path.
- Then click on Wrap Code (green) button to wrap the code.