[oracle]尝试加密procedure

对于oracle object的加密方式
一、利用wrap加密
如下是一个测试的procedure:
[oracle@orclrac1:/home/oracle]$cat sp_test.sql
create or replace procedure leo(i in number)

as

begin

dbms_output.put_line('input parameter: '||to_char(i));

end;

如下是加密过程:
[oracle@orclrac1:/home/oracle]$wrap iname=sp_test.sql oname=sp_test_jm.sql

PL/SQL Wrapper: Release 11.2.0.1.0- 64bit Production on Wed Nov 08 14:06:58 2017

Copyright (c) 1993, 2009, Oracle. All rights reserved.

Processing sp_test.sql to sp_test_jm.sql

如下是加密完成之后的显示内容:
[oracle@orclrac1:/home/oracle]$cat sp_test_jm.sql
create or replace procedure leo wrapped
a000000
354
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
6b ae
eLucoK2tPHT0oy+WjvSukeA9+fUwg5nnm7+fMr2ywFyFodexpcOl0l6lmYEywLIlXQbAdIsG
wMAy/tKGBgmm+x9Jmo8wtVDIqVAvAMpK/gjSxz1pckfVFmLMFlpW8kcuYqFiwglpZCa9CNC/
M7h0JaV3d6CLBsCBx/vxdKa1unZI

/


对存储过程做编译,并可顺利执行:
[oracle@orclrac1:/home/oracle]$sqlplus zq/oracle

SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 8 14:07:03 2017

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> @sp_test_jm.sql

Procedure created.

SQL> set serveroutput on;
SQL> exec leo(100);
input parameter: 100

PL/SQL procedure successfully completed.




查看oracle的数据字典中的显示:
SQL> select name,text from user_source where type='PROCEDURE' and name='LEO';

NAME
----
TEXT
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LEO
procedure leo wrapped
a000000
354
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
6b ae
eLucoK2tPHT0oy+WjvSukeA9+fUwg5nnm7+fMr2ywFyFodexpcOl0l6lmYEywLIlXQbAdIsG
wMAy/tKGBgmm+x9Jmo8wtVDIqVAvAMpK/gjSxz1pckfVFmLMFlpW8kcuYqFiwglpZCa9CNC/
M7h0JaV3d6CLBsCBx/vxdKa1unZI





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值