Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Wrapping of type specification seems not to be possible, when accessible by clause is used

Jan GorkowMar 4 2023

Hi community,

I just found an unexpected limitation of the pl/sql wrapping utility when I wanted to wrap the following type specification:

CREATE OR REPLACE TYPE tp_test_internal
AUTHID DEFINER ACCESSIBLE BY (TYPE tp_test)
AS OBJECT
(
id INTEGER
);
/

When run the wrapping utility with command wrap iname=TP_TEST_INTERNAL.tps ONAME=TP_TEST_INTERNAL.wrp
I get the following output on screen
PL/SQL Wrapper: Release 21.0.0.0.0 - Production on Sa Mrz 4 22:14:01 2023
Version 21.9.0.0.0

Copyright (c) 1982, 2023, Oracle and/or its affiliates. All rights reserved.

Processing TP_TEST_INTERNAL.tps to TP_TEST_INTERNAL.wrp

but the content of the resulting file TP_TEST_INTERNAL.wrp is unwrapped. When the ACCESSIBLE BY clause is omitted wrapping works as expected. Wrapping a simple package specification works with and without accessible by clause.

I also tried the dbms_ddl.created_wrapped method like this:
BEGIN
sys.DBMS_DDL.create_wrapped ('CREATE OR REPLACE TYPE tp_test_internal
AUTHID DEFINER ACCESSIBLE BY (TYPE tp_test)
AS OBJECT
(
id INTEGER
);');
END;
/

This leads to ORA-24230 “input to DBMS_DDL.WRAP is not a legal PL/SQL unit” while doing this without the accessible by clause like this

BEGIN
sys.DBMS_DDL.create_wrapped ('CREATE OR REPLACE TYPE tp_test_internal
AUTHID DEFINER --ACCESSIBLE BY (TYPE tp_test)
AS OBJECT
(
id INTEGER
);');
END;
/

works as expected.

For me this looks like a bug. What do you think?

Thank you in advance,
best regards
Jan

Comments

Post Details

Added on Mar 4 2023
0 comments
101 views