步骤如下:
1、设置环境变量NLS_LANG
D:\>set NLS_LANG=AMERICAN_AMERICA.USACII7
2、
在D:\下创建sample.sql文件,内容如下:
create or replace procedure test1(i in number) as
begin
null;
end;
3、加密存储过程
D:\>wrap iname=sample.sql
PL/SQL Wrapper: Release 10.2.0.1.0- Production on Fri Sep 12 09:40:19 2008
Copyright (c) 1993, 2004, Oracle. All rights reserved.
Processing sample.sql to sample.plb
4、创建存储过程
SQL> @D:\sample.plb
过程已创建。
5、查看存储过程的代码
SQL> select name,text from all_source where type='PROCEDURE' and name='TEST1' and owner='CSC1';
NAME
------------------------------
TEXT
--------------------------------------------------------------------------------
TEST1
procedure test1 wrapped
a000000
1
abcd
abcd
abcd
abcd
abcd
NAME
------------------------------
TEXT
--------------------------------------------------------------------------------
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
NAME
------------------------------
TEXT
--------------------------------------------------------------------------------
abcd
7
35 6d
fE+SgnklxsX2hAhX+84807Y4bZ4wg5nnm7+fMr2ywFwWoWLRf3elw6XSXqWZgTLAsiXDuHSL
BsDAMv7ShgYG0pmBCC2LBsCBxy3JpqY/xHQF
SQL>
6、备注
文件sample.sql中可定义多个存储过程。