很早以前碰到的bug,今天手头正好有环境,简单记录一下这个问题:在9201版本中,WRAP工具对中文支持存在问题。
看一个简单的例子:
bash-3.00$ more p_test.sql
create or replace procedure p_test as
begin
null;
end;
/
bash-3.00$ env|grep NLS
NLS_LANG=SIMPLIFIED CHINESE
bash-3.00$ wrap iname=p_test.sql name=p_test_wrap.sql
kgepop: no error frame. to pop to for error 1801
bash-3.00$ export NLS_LANG=american
bash-3.00$ wrap iname=p_test.sql name=p_test_wrap.sql
PL/SQL Wrapper: Release 9.2.0.1.0- 64bit Production on Thu Aug 06 18:57:21 2009
Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.
Processing p_test.sql to p_test_wrap.sql
如果是中文环境,执行WRAP则报错,将环境换成英文,则可以顺利执行。
在9204中,Oracle已经解决了这个问题:
[oracle@bjtest ~]$ more p_test.sql
create or replace procedure p_test as
begin
null;
end;
/
[oracle@bjtest ~]$ env|grep NLS
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
[oracle@bjtest ~]$ wrap iname=p_test.sql name=p_test_wrap.sql
PL/SQL Wrapper: Release 9.2.0.4.0- 64bit Production on 星期四 8月 06 18:56:53 2009
Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.
Processing p_test.sql to p_test_wrap.sql
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4227/viewspace-611530/ ,如需转载,请注明出处,否则将追究法律责任。