Quick note. During my 11.2.0.4 to 19c upgrade that I have been writing about we found a difference in behavior of DBMS_UTILITY.FORMAT_CALL_STACK. I tested it on several versions, and it switched in 12.2. Now it puts the procedure name within the package in the stack.
Old output:
----- PL/SQL CALL STACK -----
OBJECT LINE OBJECT
HANDLE NUMBER NAME
0X15BFA6930 9 PACKAGE BODY MYUSER.MYPKG
0X10C988058 1 ANONYMOUS BLOCK
New output:
----- PL/SQL CALL STACK -----
OBJECT LINE OBJECT
HANDLE NUMBER NAME
0XA796DF28 9 PACKAGE BODY MYUSER.MYPKG.MYPROC
0X7ADFEEB8 1 ANONYMOUS BLOCK
Test code:
select * from v$version;
CREATE OR REPLACE PACKAGE MYPKG
AS
PROCEDURE MYPROC;
END MYPKG;
/
SHOW ERRORS
CREATE OR REPLACE PACKAGE BODY MYPKG
AS
PROCEDURE MYPROC
IS
BEGIN
DBMS_OUTPUT.PUT_LINE(UPPER(dbms_utility.format_call_stack));
END MYPROC;
END MYPKG;
/
SHOW ERRORS;
execute mypkg.myproc;
show errors;
Might be useful to someone else. We had some code that depended on the package name being the last thing on its line, but the new version includes the name of the procedure after the package name.
Bobby
Bobby you have no idea how grateful I am that you posted this – I have been tearing my hair out for months (literally, since December 2019) trying to understand why logging code that worked so flawlessly for more than eight years suddenly decided to start breaking – SOMETIMES. Heisenbugs are the worst, but you are the best!
Glad that you found it helpful. I was surprised by this change as well and I was surprised that we had application code that depended on it!
Thanks for commenting on this blog.
Bobby