用wrap加密一個package異常的解決過程

達芬奇的夢發表於2017-04-26

在windows下wrap 一個package的時候,不能成功,是怎麼回事?
D:>dir *.sql
驅動器 D 中的卷是 應用盤
卷的序列號是 C4CF-9B46

D: 的目錄

2006-05-27 09:57 145,910 toms_dbms.sql
1 個檔案 145,910 位元組
0 個目錄 2,174,296,064 可用位元組

D:>wrap iname=toms.dbms.sql
kgepop: no error frame to pop to for error 1801

D:>


同樣的package在aix 5.2下加密的時候也報錯,但可以安裝,內容如下

/oracle> wrap iname=1.sql

PL/SQL Wrapper: Release 9.2.0.6.0- 64bit Production on Sat May 27 10:19:41 2006

Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.

Processing 1.sql to 1.plb
PSU(103,1,269,46):Encountered the symbol "SQL" when expecting one of the following:

<an identifier> <a double-quoted delimited-identifier>
The symbol "<an identifier> was inserted before "SQL" to continue.

PL/SQL Wrapper error: Compilation error(s) for:
create or replace package body toms_dbms
Outputting source and continuing.
/oracle> sqlplus /nolog

SQL*Plus: Release 9.2.0.6.0 - Production on Sat May 27 10:19:48 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> conn user/pwd
Connected.
SQL> start 1.plb

Package created.


Package body created.

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.6.0 - Production
/oracle>

有誰知道是怎麼回事?難道是包體太長了? 以前包體在2000多行的時候沒事,現在增加到3000多行了
就不行了。^|^


經過查詢資料發現,原來在windows下,是因為客戶端字符集的問題,在CMD下執行
set nls_lang=american_america.usascii7

然後,再執行OK了.

而如下的錯誤資訊,是因為部分SQL語法不支援導致的。加上edebug=wrap_new_sql[強制支援所有語法]就OK了。
PSU(103,1,269,46):Encountered the symbol "SQL" when expecting one of the followi
ng:

<an identifier> <a double-quoted delimited-identifier>
The symbol "<an identifier> was inserted before "SQL" to continue.

PL/SQL Wrapper error: Compilation error(s) for:
create or replace package body toms_dbms
Outputting source and continuing.


附:成功WRAP的過程

Microsoft Windows XP [版本 5.1.2600]
(C) 版權所有 1985-2001 Microsoft Corp.

D:>set nls_lang=american_america.usascii7

D:>wrap iname=toms_dbms.sql;

PL/SQL Wrapper: Release 9.2.0.1.0- Production on Sat May 27 12:24:00 2006

Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.

PL/SQL Wrapper error: Couldn't open input file toms_dbms.sql;

D:>wrap iname=toms_dbms.sql

PL/SQL Wrapper: Release 9.2.0.1.0- Production on Sat May 27 12:24:14 2006

Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.

Processing toms_dbms.sql to toms_dbms.plb
PSU(103,1,269,46):Encountered the symbol "SQL" when expecting one of the followi
ng:

<an identifier> <a double-quoted delimited-identifier>
The symbol "<an identifier> was inserted before "SQL" to continue.

PL/SQL Wrapper error: Compilation error(s) for:
create or replace package body toms_dbms
Outputting source and continuing.

D:>wrap iname=toms_dbms.sql edebug=wrap_new_sql

PL/SQL Wrapper: Release 9.2.0.1.0- Production on Sat May 27 12:25:03 2006

Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved.

Processing toms_dbms.sql to toms_dbms.plb

D:>

相關連線:http://www.itpub.net/557386.html

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31444259/viewspace-2138056/,如需轉載,請註明出處,否則將追究法律責任。

相關文章