Solved

encrypt my pl/sql

Posted on 2001-06-06
8
1,364 Views
Last Modified: 2008-02-26
I need to encrypt my pl/sql procedure which stored in oracle   ,and no one can retrive the source code  from the Dictionary Views.
What can I do?
thanks.
0
Comment
Question by:wangweiww
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 9

Accepted Solution

by:
dbalaski earned 200 total points
ID: 6161085
Hi,

This is pretty easy to do with a supplied utility from Oracle -- Wrap Utility
Wrap Utility, a stand-alone programming utility that encrypts PL/SQL source code. You can use the Wrap Utility to deliver PL/SQL applications without exposing your source code.


You can read in more detail about it the Oracle Manual:
"PL/SQL User's Guide and Reference Release 8.1.6"
Part Number A77069-01
Appendix C:   Wrap Utility


A clip from the manual:

To run the Wrap Utility, enter the wrap command at your operating system prompt using the following syntax:
wrap iname=input_file [oname=output_file]

Leave no space around the equal signs because spaces delimit individual arguments.
The wrap command requires only one argument, which is

iname=input_file
where input_file is the name of the Wrap Utility input file. You need not specify the file extension because it defaults to sql. For example, the following commands are equivalent:
wrap iname=/mydir/myfile
wrap iname=/mydir/myfile.sql

-------------------------------------

Hope this answers the question and solves your problem,
sincerely
dBalaski
0
 
LVL 3

Expert Comment

by:sidcap
ID: 6161088
I have to wrap your code. Depending on the client version use are using you will have to execute wrap.exe or wrap80.exe.

That's exactly what you need.

Hope this helps, SIDCAP.
0
 
LVL 9

Expert Comment

by:dbalaski
ID: 6161092
BTW -- the Wrap utility is not only available in oracle 8i -- it is in oracle 7 as well.

dBalaski
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 3

Expert Comment

by:sidcap
ID: 6161095
sorry dbalaski; I have not notified about your answer.

Sorry once again, SIDCAP
0
 
LVL 9

Expert Comment

by:dbalaski
ID: 6161101
its okay -- our entry times are close (12:34 to 12:34)
I guess i submitted a few seconds before you...

dBalaski
0
 

Author Comment

by:wangweiww
ID: 6171493
thanks dbalaski and sidcap,

   c:\tmp\t.sql has the following function:
   create or replace function f_test return varchar2
   is
   begin
     return '12345';
   end;

but
   wrap iname=c:\tmp\t.sql
   kgepop: no error frame to pop to for error 1801

why ?
thanks

 

   
0
 
LVL 9

Expert Comment

by:dbalaski
ID: 6172580
Hi,

From what I have read,  kgepop  is usually a memory error..

I just tried your code on my Sun E5000 under Oracle 8.1.6  -- worked fine:

$ cat testwrap.sql
create or replace function f_test return varchar2
is
begin
return '12345';
end;
$
$ wrap iname=testwrap.sql

PL/SQL Wrapper: Release 8.1.6.0.0 - Production on Sat Jun 09 23:36:13 2001
Copyright (c) Oracle Corporation 1993, 1994, 1995, 1996, 1997, 1998, 1999.  Alld
Processing testwrap.sql to testwrap.plb
$
$ cat testwrap.plb
create or replace function f_test wrapped
0
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
1
8
8106000
1
4
0
5
2 :e:
1FUNCTION:
1F_TEST:
1RETURN:
1VARCHAR2:
112345:
0

0
0
14
2
0 a0 1d 8d a0 b4 a0 2c
6a a0 6e 65 b7 a4 b1 11
68 4f 17 b5
14
2
0 3 7 10 c b 21 25
29 2d 31 36 3a 3c 40 42
4e 52 54 5d
14
2
0 :2 1 a 11 0 18 :3 1 8
:9 1
14
2
0 :4 1 0 :3 1 :3 4 :2 3 :6 1
5f
4
:2 0 8 1 :4 0
3 :3 0 3 :3 0
2 :a 0 10 1
:4 0 4 :3 0 5
6 0 10 3
7 :2 0 3 :3 0
5 :4 0 a :2 0
c 3 f :3 0
f 0 f e
c d :6 0 10
:2 0 3 7 f
12 :2 0 2 10
13 :8 0
5
4
:3 0 1 b
1
4
0
12
0
1
14
1
1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0
3 0 1
0

/
-------------------------------------


I see you are using NT,   check to see if there is WRAP23.exe and WRAP80.EXE
Try one of those ...  

dBalaski




0
 

Author Comment

by:wangweiww
ID: 6186316
thanks dbalaski
I think it the right way to encrypt my pl/sql.

But I still can not run wrap correctly.(error msg: kgepop: no error frame to pop to for error 1801)
I am using Oracle 8.1.5 for NT and can not find the WRAP23.exe and WRAP80.EXE .


 
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to take different types of Oracle backups using RMAN.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question