Oracle wrap 测试的一些细节问题
今天在做 wrap 的测试实验的时候,出现一个很奇怪的现象,就是加密不成功。
具体表现为:1.加密后的文件大小为0kb。
2.加密后的文件仍然可视。
具体测试步骤如下:
D:\Just4work\someSQLs>wrap iname=test_oracle_warp.sql PL/SQL Wrapper: Release 11.2.0.1.0- Production on 星期五 2月 21 15:26:40 2014 Copyright (c) 1993, 2009, Oracle. All rights reserved. Processing test_oracle_warp.sql to test_oracle_warp.plb D:\Just4work\someSQLs>dir /s test_oracle*
驱动器 D 中的卷是 work
卷的序列号是 F4A9-7648 D:\Just4work\someSQLs 的目录 2014/02/21 15:26 0 test_oracle_warp.plb
2014/02/21 15:23 3,582 test_oracle_warp.sql
2 个文件 3,582 字节 所列文件总数:
2 个文件 3,582 字节
0 个目录 171,316,117,504 可用字节
在另一台装有完整数据库的机器上测试:
oracle@zen-VirtualBox:~$ ls -l | grep test
-rw-r----- 1 oracle oinstall 20987904 Feb 21 12:01 tab16ktest.dbf
-rw-r--r-- 1 oracle oinstall 1789 Feb 21 15:06 test_oracle_wrap2.plb
-rw-r--r-- 1 oracle oinstall 23316 Feb 21 15:03 test_oracle_wrap2.sql
-rw-r--r-- 1 oracle oinstall 3492 Feb 21 16:03 test_oracle_wrap3.sql
-rw-r--r-- 1 oracle oinstall 552 Feb 21 15:00 test_oracle_wrap.plb
-rw-r--r-- 1 oracle oinstall 692 Feb 21 14:59 test_oracle_wrap.sql
oracle@zen-VirtualBox:~$ wrap iname=test_oracle_wrap3.sql PL/SQL Wrapper: Release 11.2.0.1.0- 64bit Production on Fri Feb 21 16:04:30 2014 Copyright (c) 1993, 2009, Oracle. All rights reserved. Processing test_oracle_wrap3.sql to test_oracle_wrap3.plb
oracle@zen-VirtualBox:~$ ls -l | grep test
-rw-r----- 1 oracle oinstall 20987904 Feb 21 12:01 tab16ktest.dbf
-rw-r--r-- 1 oracle oinstall 1789 Feb 21 15:06 test_oracle_wrap2.plb
-rw-r--r-- 1 oracle oinstall 23316 Feb 21 15:03 test_oracle_wrap2.sql
-rw-r--r-- 1 oracle oinstall 1106 Feb 21 16:04 test_oracle_wrap3.plb
-rw-r--r-- 1 oracle oinstall 3492 Feb 21 16:03 test_oracle_wrap3.sql
-rw-r--r-- 1 oracle oinstall 552 Feb 21 15:00 test_oracle_wrap.plb
-rw-r--r-- 1 oracle oinstall 692 Feb 21 14:59 test_oracle_wrap.sql oracle@zen-VirtualBox:~$ cat test_oracle_wrap3.plb
CREATE OR REPLACE PROCEDURE zx_test_satisfy_analyse wrapped
a000000
354
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
8d4 3b0
UsqjIEQoNf3Spb35eItCneQalf4wgztc10rrfC+LbrB1BRsJw3mqYURRAFP0BQ3fLdYAPrrR
PBxvvb1SKRxU2x2mBt39ytx6iNUc1t7x6FJ4ogwCjSwFT8ETJPYbscWLoWutzzAgICDfxJ/H
EPjJTpL/h52YPxLEvgjPKKk7VmXH3k6JodXTL9MrWcYfWdAVYlY7iwxr8l85r8KFi3EHjdg1
QN84hfZQ90yTp8FxGyuFAvysKsbmDE1AxaUvePZqDbnd7aZGa4KHghEZIyvwLtq9td4vjaY7
Gl3ezWCijsfAaXvmcnKkmnGvnn5Cb82geJ/d2ZncUsb7bYZilav/9p9k9QL6NtMcCkb4V01C
YuLHHBUDL0CoWeYEB3yZOKusEmYWJvyQTQlJFAK9KQeeIXKNYAz91fPH9gSeA1S6w4UlCb6d
Az5GGwOoU2DYVMXT8debif2jwO3iWDauFZcHbLYl0Y1m7qJ1APzYFmpHFq2KaKQ9WaRQU15w
Jb4SM7/s3rDdVhZEdK5CXzKHYThIAoZ81S3FFJJqDitc8DNojlgPF6A7/44+p71jwSHnRe86
0H6MQHlPrAvXe2IpfdoUe0nw0HBWXUEDnusZs/8MuI7BTdDH9XbBU9DHz3bBGtDHwHbBkyzB
MVJu6yL/KQtXUlCqnOwLKI1yn5faDXI0pzwCK4hx0acp1qOnuJFmRNjLHImjxY9IOzvlYjFf
lN9+ILXQZnGchDsYdosevHvCYrEtl2U3zDE+M6TII5f6KaFd9e3NGXPBT52qz+210s2xnLs2
EuTFi63TmOp70TWoviCpvMKghAohkAPOZcXq+nqCp5LJh4+phxOe+nNqSrUI725nWpYubp+a
4YN4r6RI1XTF7UoLi+lFssDWilXvRsmTAsPh94DDpfyXZni0kW6hp/HD0l0o0BWImw== /
oracle@zen-VirtualBox:~$
只是装了11g的客户端的机器上测试不成功,生成的文件只有0字节;安装整个数据库的机器上测试成功,没找到确切的原因。
继续测试:
修改文件的开头
oracle@zen-VirtualBox:~$ cat test_oracle_wrap3.sql > test_oracle_wrap4.sql
oracle@zen-VirtualBox:~$ vim test_oracle_wrap4.sql
oracle@zen-VirtualBox:~$ cat test_oracle_wrap4.sql
EATE OR REPLACE PROCEDURE zx_test_satisfy_analyse
(
av_task_plan_id IN VARCHAR2,
an_region_id IN NUMBER,
av_stat_date IN VARCHAR2,
av_append_info IN VARCHAR2,
av_return OUT VARCHAR2,
av_syserr OUT VARCHAR2
) IS
/*
*author: zen
*created date :20130812
*/
v_date VARCHAR2(8);
v_channel NUMBER; -- 1 10000,2 114,3 wap net,6 实体渠道,8 装移 BEGIN
v_date := av_stat_date;
v_channel := av_append_info; --即时测评满意度分析:总体满意度分析
DELETE FROM report_service_satisfy_total t
WHERE t.acct_day = v_date
AND decode(t.channel_type, 9, 1, 4, 3, 7, 6, t.channel_type) = v_channel;
COMMIT; av_return := '';
av_syserr := '执行成功'; EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line(av_task_plan_id || ' , ' || an_region_id || ' , ' ||
av_append_info);
av_return := SQLCODE;
av_syserr := SQLERRM;
RETURN;
END zx_test_satisfy_analyse;
/ oracle@zen-VirtualBox:~$ wrap iname=test_oracle_wrap4.sql PL/SQL Wrapper: Release 11.2.0.1.0- 64bit Production on Fri Feb 21 16:09:53 2014 Copyright (c) 1993, 2009, Oracle. All rights reserved. Processing test_oracle_wrap4.sql to test_oracle_wrap4.plb
oracle@zen-VirtualBox:~$ ls -l | grep test_oracle_wrap
-rw-r--r-- 1 oracle oinstall 1789 Feb 21 15:06 test_oracle_wrap2.plb
-rw-r--r-- 1 oracle oinstall 23316 Feb 21 15:03 test_oracle_wrap2.sql
-rw-r--r-- 1 oracle oinstall 1106 Feb 21 16:04 test_oracle_wrap3.plb
-rw-r--r-- 1 oracle oinstall 3492 Feb 21 16:03 test_oracle_wrap3.sql
-rw-r--r-- 1 oracle oinstall 2727 Feb 21 16:09 test_oracle_wrap4.plb
-rw-r--r-- 1 oracle oinstall 3490 Feb 21 16:08 test_oracle_wrap4.sql
-rw-r--r-- 1 oracle oinstall 552 Feb 21 15:00 test_oracle_wrap.plb
-rw-r--r-- 1 oracle oinstall 692 Feb 21 14:59 test_oracle_wrap.sql
oracle@zen-VirtualBox:~$ cat test_oracle_wrap4.plb
EATE OR REPLACE PROCEDURE zx_test_satisfy_analyse
(
av_task_plan_id IN VARCHAR2,
an_region_id IN NUMBER,
av_stat_date IN VARCHAR2,
av_append_info IN VARCHAR2,
av_return OUT VARCHAR2,
av_syserr OUT VARCHAR2
) IS
/*
*author: zen
*created date :20130812
*/
v_date VARCHAR2(8);
v_channel NUMBER; -- 1 10000,2 114,3 wap net,6 实体渠道,8 装移
BEGIN
v_date := av_stat_date;
v_channel := av_append_info; WHERE t.acct_day = v_date
AND decode(t.channel_type, 9, 1, 4, 3, 7, 6, t.channel_type) = v_channel; av_return := '';
av_syserr := '执行成功'; EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line(av_task_plan_id || ' , ' || an_region_id || ' , ' ||
av_append_info);
av_return := SQLCODE;
av_syserr := SQLERRM;
RETURN;
END zx_test_satisfy_analyse;
/ oracle@zen-VirtualBox:~$ cat test_oracle_wrap5.sql
DELETE FROM report_service_satisfy_total t
WHERE t.acct_day = v_date
AND decode(t.channel_type, 9, 1, 4, 3, 7, 6, t.channel_type) = v_channel; COMMIT; oracle@zen-VirtualBox:~$ wrap iname=test_oracle_wrap5.sql PL/SQL Wrapper: Release 11.2.0.1.0- 64bit Production on Fri Feb 21 16:24:24 2014 Copyright (c) 1993, 2009, Oracle. All rights reserved. Processing test_oracle_wrap5.sql to test_oracle_wrap5.plb
oracle@zen-VirtualBox:~$ ls -l | grep test_oracle_wrap
-rw-r--r-- 1 oracle oinstall 1789 Feb 21 15:06 test_oracle_wrap2.plb
-rw-r--r-- 1 oracle oinstall 23316 Feb 21 15:03 test_oracle_wrap2.sql
-rw-r--r-- 1 oracle oinstall 1106 Feb 21 16:04 test_oracle_wrap3.plb
-rw-r--r-- 1 oracle oinstall 3492 Feb 21 16:03 test_oracle_wrap3.sql
-rw-r--r-- 1 oracle oinstall 2727 Feb 21 16:09 test_oracle_wrap4.plb
-rw-r--r-- 1 oracle oinstall 3490 Feb 21 16:08 test_oracle_wrap4.sql
-rw-r--r-- 1 oracle oinstall 163 Feb 21 16:24 test_oracle_wrap5.plb
-rw-r--r-- 1 oracle oinstall 167 Feb 21 16:23 test_oracle_wrap5.sql
-rw-r--r-- 1 oracle oinstall 552 Feb 21 15:00 test_oracle_wrap.plb
-rw-r--r-- 1 oracle oinstall 692 Feb 21 14:59 test_oracle_wrap.sql
oracle@zen-VirtualBox:~$ cat test_oracle_wrap5.plb
DELETE FROM report_service_satisfy_total t
WHERE t.acct_day = v_date
AND decode(t.channel_type, 9, 1, 4, 3, 7, 6, t.channel_type) = v_channel;
COMMIT; oracle@zen-VirtualBox:~$ cat test_oracle_wrap6.sql
DELETE FROM report_service_satisfy_total t
WHERE t.acct_day = v_date
AND decode(t.channel_type, 9, 1, 4, 3, 7, 6, t.channel_type) = v_channel;
COMMIT; CREATE OR REPLACE PROCEDURE zx_test_satisfy_analyse
(
av_task_plan_id IN VARCHAR2,
an_region_id IN NUMBER,
av_stat_date IN VARCHAR2,
av_append_info IN VARCHAR2,
av_return OUT VARCHAR2,
av_syserr OUT VARCHAR2
) IS
/*
*author: zen
*created date :20130812
*/
v_date VARCHAR2(8);
v_channel NUMBER; -- 1 10000,2 114,3 wap net,6 实体渠道,8 装移 BEGIN
v_date := av_stat_date;
v_channel := av_append_info; --即时测评满意度分析:总体满意度分析
DELETE FROM report_service_satisfy_total t
WHERE t.acct_day = v_date
AND decode(t.channel_type, 9, 1, 4, 3, 7, 6, t.channel_type) = v_channel; COMMIT; av_return := '';
av_syserr := '执行成功'; EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line(av_task_plan_id || ' , ' || an_region_id || ' , ' ||
av_append_info);
av_return := SQLCODE;
av_syserr := SQLERRM;
RETURN;
END zx_test_satisfy_analyse;
/ oracle@zen-VirtualBox:~$ wrap iname=test_oracle_wrap6.sql PL/SQL Wrapper: Release 11.2.0.1.0- 64bit Production on Fri Feb 21 16:43:38 2014 Copyright (c) 1993, 2009, Oracle. All rights reserved. Processing test_oracle_wrap6.sql to test_oracle_wrap6.plb
oracle@zen-VirtualBox:~$ ls -l | grep test_oracle
-rw-r--r-- 1 oracle oinstall 1789 Feb 21 15:06 test_oracle_wrap2.plb
-rw-r--r-- 1 oracle oinstall 23316 Feb 21 15:03 test_oracle_wrap2.sql
-rw-r--r-- 1 oracle oinstall 1106 Feb 21 16:04 test_oracle_wrap3.plb
-rw-r--r-- 1 oracle oinstall 3492 Feb 21 16:03 test_oracle_wrap3.sql
-rw-r--r-- 1 oracle oinstall 2727 Feb 21 16:09 test_oracle_wrap4.plb
-rw-r--r-- 1 oracle oinstall 3490 Feb 21 16:08 test_oracle_wrap4.sql
-rw-r--r-- 1 oracle oinstall 163 Feb 21 16:24 test_oracle_wrap5.plb
-rw-r--r-- 1 oracle oinstall 167 Feb 21 16:23 test_oracle_wrap5.sql
-rw-r--r-- 1 oracle oinstall 1267 Feb 21 16:43 test_oracle_wrap6.plb
-rw-r--r-- 1 oracle oinstall 3655 Feb 21 16:42 test_oracle_wrap6.sql
-rw-r--r-- 1 oracle oinstall 552 Feb 21 15:00 test_oracle_wrap.plb
-rw-r--r-- 1 oracle oinstall 692 Feb 21 14:59 test_oracle_wrap.sql
oracle@zen-VirtualBox:~$ cat test_oracle_wrap6.plb
DELETE FROM report_service_satisfy_total t
WHERE t.acct_day = v_date
AND decode(t.channel_type, 9, 1, 4, 3, 7, 6, t.channel_type) = v_channel;
COMMIT;
CREATE OR REPLACE PROCEDURE zx_test_satisfy_analyse wrapped
a000000
354
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
8d4 3b0
UsqjIEQoNf3Spb35eItCneQalf4wgztc10rrfC+LbrB1BRsJw3mqYURRAFP0BQ3fLdYAPrrR
PBxvvb1SKRxU2x2mBt39ytx6iNUc1t7x6FJ4ogwCjSwFT8ETJPYbscWLoWutzzAgICDfxJ/H
EPjJTpL/h52YPxLEvgjPKKk7VmXH3k6JodXTL9MrWcYfWdAVYlY7iwxr8l85r8KFi3EHjdg1
QN84hfZQ90yTp8FxGyuFAvysKsbmDE1AxaUvePZqDbnd7aZGa4KHghEZIyvwLtq9td4vjaY7
Gl3ezWCijsfAaXvmcnKkmnGvnn5Cb82geJ/d2ZncUsb7bYZilav/9p9k9QL6NtMcCkb4V01C
YuLHHBUDL0CoWeYEB3yZOKusEmYWJvyQTQlJFAK9KQeeIXKNYAz91fPH9gSeA1S6w4UlCb6d
Az5GGwOoU2DYVMXT8debif2jwO3iWDauFZcHbLYl0Y1m7qJ1APzYFmpHFq2KaKQ9WaRQU15w
Jb4SM7/s3rDdVhZEdK5CXzKHYThIAoZ81S3FFJJqDitc8DNojlgPF6A7/44+p71jwSHnRe86
0H6MQHlPrAvXe2IpfdoUe0nw0HBWXUEDnusZs/8MuI7BTdDH9XbBU9DHz3bBGtDHwHbBkyzB
MVJu6yL/KQtXUlCqnOwLKI1yn5faDXI0pzwCK4hx0acp1qOnuJFmRNjLHImjxY9IOzvlYjFf
lN9+ILXQZnGchDsYdosevHvCYrEtl2U3zDE+M6TII5f6KaFd9e3NGXPBT52qz+210s2xnLs2
EuTFi63TmOp70TWoviCpvMKghAohkAPOZcXq+nqCp5LJh4+phxOe+nNqSrUI725nWpYubp+a
4YN4r6RI1XTF7UoLi+lFssDWilXvRsmTAsPh94DDpfyXZni0kW6hp/HD0l0o0BWImw== /
印证了Oracle官方文档的说法
Wrapping PL/SQL Code with wrap Utility
The wrap utility processes an input SQL file and wraps only the PL/SQL units in the file,
such as a package specification, package body, function, procedure, type specification, or type body.
It does not wrap PL/SQL content in anonymous blocks or triggers or non-PL/SQL code.
我想是通过在文件中查找开始位置的CREATE OR REPLACE PROCEDURE(function,package body,type)来判断加密开始和结束的位置
Oracle wrap 测试的一些细节问题的更多相关文章
- Oracle DG测试failover和后续恢复报告
Oracle DG测试failover和后续恢复报告 一.概述 二.验证过程: 2.1 A库异常关闭 2.2 B库进行failover切换为新主库 2.3 要求C库成为新主库的备库 2.4 要求A库成 ...
- loadrunner 脚本开发-调用java jar文件远程操作Oracle数据库测试
调用java jar文件远程操作Oracle数据库测试 by:授客 QQ:1033553122 测试环境 数据库:linux 下Oracle_11g_R2 Loadrunner:11 备注:想学ora ...
- Oracle数据库测试和优化最佳实践: OTest介绍 (转)
当前Oracle数据库最佳测试工具OTest * Otest是用于Oracle数据库测试.优化.监控软件. * Otest是免费提供给Oracle客户和广大DBA工程师使用的软件.由原厂技术专家王 ...
- 使用Oracle Wrap工具加密你的代码
Oracle提供Wrap工具,可以用于加密你的Package等.不过需要注意的是,加密后的代码无法解密,你需要保管好你的源代码. 以下是个例子: 1.源代码 create or replace fun ...
- Oracle wrap 和 unwrap( 加密与解密) 说明
一. Wrap 说明 官网的说明如下: A PL/SQL Source Text Wrapping http://download.oracle.com/docs/cd/E11882_01/appde ...
- 使用Apache JMeter对SQL Server、Mysql、Oracle压力测试(四)
这篇文章是对前面三篇的一个总结: 1.从测试结果来看,原生的数据库性能分别是:SQL Server(4587)>Oracle(271)>Mysql(145),测试数据量分别为5W.50W. ...
- 使用Apache JMeter对SQL Server、Mysql、Oracle压力测试(三)
接第二篇写 第四步,测试Oracle数据库的性能. a.加载JDBC Oracle驱动,添加线程组和线程属性和前面两部一样,如果有需要可以往前翻看. b.设置JDBC Connection Oracl ...
- Oracle 11g 测试ogg中断之后,重新同步操作
测试ogg中断之后,重新同步操作 2018-06-07 17:11 779 1 原创 GoldenGate 本文链接:https://www.cndba.cn/leo1990/article/2839 ...
- oracle 压力测试工具benchmarksql
TPC-C测试 TPC-C 于 1992 年 7 月 23 日认可为新的基准测试.TPC(Transaction Processing Performance Council,事务处理性能委员会)-C ...
随机推荐
- 面向对象的程序设计(二)理解各种方法和属性typeof、instanceof、constructor、prototype、__proto__、isPrototypeOf、hasOwnProperty
//理解各种方法和属性typeof.instanceof.constructor.prototype.__proto__.isPrototypeOf.hasOwnProperty. //1.typeo ...
- spring源码分析之spring-web http详解
spring-web是spring webmvc的基础,它的功能如下: 1. 封装http协议中client端/server端的request请求和response响应及格式的转换,如json,rss ...
- 多系统通讯-DotNetMQ
很久都没有写博客了,从15年4月份一直忙到现在,我才有时间去做梳理和总结,因为我提离职了,感觉整个世界突然变得不一样,随着而来的就是心情的放松,写一篇文章也是对过去一年多工作的梳理,加深印象 积累和沉 ...
- Android(java)学习笔记154:使用GridView以及重写BaseAdapter
1.BaseAdapter: 对于ListView.GridView.Gallery.Spinner等等,它是它们的适配器,直接继承自接口类Adapter的,使用BaseAdapter时需要重写很多方 ...
- C++ (P160—)多继承 二义性 虚基类 “向上转型”
1 多继承中,必须给每个基类指定一种派生类型,如果缺省,相应的基类则取私有派生类型,而不是和前一个基类取相同的派生类型 2 一个类的保护成员只能被本类的成员函数或者它的派生类成员函数访问 3 由于c+ ...
- five kinds of IPC methods
Shared memory permits processes to communicate by simply reading and writing to a specified memory l ...
- 【转】ArrayList的toArray,也就是list.toArray[new String[list.size()]];,即List转为数组
[转]ArrayList的toArray ArrayList提供了一个将List转为数组的一个非常方便的方法toArray.toArray有两个重载的方法: 1.list.toArray(); 2.l ...
- Extjs3笔记 fbar
在项目中会遇到在grid右下角显示合计之类的显示. 之前使用过的方式: 1.用width强制顶过去. 2.利用css来控制. 弊端: 利用第一种方式:导致调整窗口大小时会导致合计不能根据窗体的大小变化 ...
- ASP多行多列又一个方法
<table border=1 width="200"> <% col=4 '列数 i=1 Do While i<=100 If i Mod col=1 T ...
- js实现图片滑动显示效果
js实现图片滑动显示效果 今天用户提出一个需求,要实现一个滑动显示新闻列表的效果,具体就是图片新闻自动滑动显示,鼠标移上去就停止滑动,移开就继续滑动:效果如下: 第一:先用HTML和CSS实现显示,主 ...