Enable All Compilation Warnings
ALTER SESSION SET PLSQL_WARNINGS='ENABLE:ALL'
Statement processed.
CREATE OR REPLACE PACKAGE pack5 AUTHID DEFINER AS
PRAGMA DEPRECATE(pack5 , 'Package pack5 has been deprecated, use new_pack5 instead.');
PROCEDURE foo;
PROCEDURE bar;
END pack5;
Warning: PACKAGE PACK5 Line: 2 PLW-06019: entity PACK5 is deprecatedMore Details: https://docs.oracle.com/error-help/db/ora-20001
CREATE OR REPLACE PACKAGE BODY pack5 AS
PROCEDURE foo AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Executing foo.');
END foo;
PROCEDURE bar IS
BEGIN
DBMS_OUTPUT.PUT_LINE('Executing bar.');
END bar;
END;
Package Body created.
EXEC pack5.bar
Executing bar.
CREATE OR REPLACE PACKAGE pack6 AUTHID DEFINER AS
PROCEDURE proc3;
END pack6;
Package created.
CREATE OR REPLACE PACKAGE BODY pack6 AS
PROCEDURE proc3 AS
BEGIN
pack5.foo;
END proc3;
END;
Warning: PACKAGE BODY PACK6 Line: 4 PLW-06020: reference to a deprecated entity: PACK5 declared in unit PACK5[1,9]. Package pack5 has been deprecated, use new_pack5 instead.More Details: https://docs.oracle.com/error-help/db/ora-20001
EXEC pack6.proc3
Executing foo.
Display All Compilation Warnings for Units PACK5 and PACK6
SELECT * FROM USER_ERRORS WHERE NAME IN ('PACK5','PACK6')
NAME | TYPE | SEQUENCE | LINE | POSITION | TEXT | ATTRIBUTE | MESSAGE_NUMBER | PACK5 | PACKAGE | 1 | 2 | 1 | PLW-06019: entity PACK5 is deprecated | WARNING | 6019 | PACK6 | PACKAGE BODY | 1 | 4 | 10 | PLW-06020: reference to a deprecated entity: PACK5 declared in unit PACK5[1,9]. Package pack5 has been deprecated, use new_pack5 instead. | WARNING | 6020 |
---|