Call (800) 766-1884 for Oracle support & training
Free Oracle Tips


Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance
 

Free Oracle Tips


 

HTML Text

BC Oracle tuning

Oracle training

Oracle support

Remote Oracle

 

Donald K. Burleson

Oracle Utilities Tips

 

Utilities for Oracle Developers

 

Oracle developers can take advantage of many PL/SQL or Java utilities that exist in $ORACLE_HOME/bin or in supplied packages.

These utilities can load, encrypt, tune or debug code objects.  This chapter will focus on the utilities that perform these functions, including wrap, dbms_profiler, dbms_debug, loadjava, dropjava and loadpsp.

The first of these utilities to be discussed will be the wrap utility that allows PL/SQL developers to encrypt their code. 

 

PL/SQL Wrap Utility for Encryption

 

The wrap utility (wrap.exe) provides a way for PL/SQL developers to protect their intellectual property by making their PL/SQL code unreadable.  These encryption options have long been available for other programming languages and were introduced for PL/SQL in version 7.  It still amazes me at the number of proprietary procedures and packages that are installed in a readable format – plain PL/SQL.    

Unfortunately there is no such command as:

 

ALTER PACKAGE BODY [name] WRAP; 

 

Instead, the wrap utility takes a readable, ASCII text file as input and converts it to a file containing byte code.  The result is that the DBA, developers or anyone with database access cannot view the source code in any readable format. 

 

The command line options for wrap are:

 

wrap iname=[file] oname=[file]

 

·     iname – The name of the unencrypted PL/SQL file to be used as input (your source file). 

·     oname – The name of the output file.  This file will be encrypted. 

Below is a sample procedure that increases an employee’s salary by 15%, if they scored a 5 in their performance rating: 

 

create or replace procedure give_raise

    (emp_id in employee.id%type, 

     emp_rating  in NUMBER )

   IS

   BEGIN

      -- raises are only given to those that scored a 5

      -- in their rating

    if emp_rating = 5 then

      update employee

      set salary = salary + (salary * .15)

      where id = emp_id;  

    end if;  

   END ;

 

 

Once added to the dictionary, the data dictionary views display the source code for this procedural object:


To learn more about these techniques, see the book "Advanced Oracle Utilities: The Definitive Reference". 

You can buy it directly from the publisher and get instant access to the code depot of utilities scripts.


 

  ”call


Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

  
 

Oracle performance tuning software 
 
 
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 
   

Copyright © 1996 -  2014 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.