How to Wrap PL SQL Code in Oracle?

How to Wrap PL SQL Code in Oracle?

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.

  1. On your computer, open Command Prompt.
  2. Change to the directory where your SQL code resides.
  3. Then type the Wrap command as shown in below example.
wrap iname=emp_pkg.sql oname=emp_pkg_hide.sql


PL/SQL Wrapper: Release 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

  1. Click on the Menu Utilities > Wrap Code.
  2. For the Input File field, provide the source file name with the path (use the browse button).
  3. For the Output File field, provide the file name with the path.
  4. Then click on Wrap Code (green) button to wrap the code.

See also:

  • Create Profiles for User Security
  • How to Encrypt data in Oracle using PL SQL