Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> problem executing plb files
OK, so I'm using the wrap utility to encrypt a .sql
file that contains a pl/sql package definition and body.
The problem is that when I attempt to execute the resulting plb, I get some SQL errors that were not present in the original sql source version.
The problem seems to be related to the use of package defined types, but I don't see what it is.
Here is a simple file that illustrates the problem:
bash$ cat tst.sql
create or replace package wraptst
authid current_user
as
type idrec is record (id int);
type idtab is table of idrec;
function func1 return idtab pipelined; function func2 return idtab pipelined; function func3 return idtab pipelined;
end wraptst;
/
show errors;
create or replace package body wraptst
as
function func1
return idtab pipelined
is
irec idrec;
begin
for c in (select 123 id from dual)
loop
irec := c; pipe row(irec);
function func2
return idtab pipelined
is
irec idrec;
begin
irec.id := 123;
pipe row(irec);
return;
end;
function func3
return idtab pipelined
is
irec idrec;
begin
for c in (select 123 id from dual)
loop
null;
end loop;
return;
end;
end wraptst;
/
show errors;
bash$ sqlplus / @tst.sql
.. No errors ...
bash$ wrap iname=tst.sql oname=tst.plb
bash$ sqlplus / @tst.plb
Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
Package created.
No errors.
Warning: Package Body created with compilation errors.
Errors for PACKAGE BODY WRAPTST:
LINE/COL ERROR
9/5 PLS-00707: unsupported construct or internal error [2603] 11/8 PL/SQL: Statement ignored 11/16 PLS-00382: expression is of wrong type 12/8 PL/SQL: Statement ignored
Anybody else seen this kind of thing?
Thanks. Received on Tue Jan 27 2004 - 15:52:29 CST
![]() |
![]() |