Enable PL/SQL Warnings:
ALTER SESSION SET PLSQL_WARNINGS = 'ENABLE:ALL'
Then compile source in Debug mode.
This results in the following warnings:
SELECT text FROM user_errors;
PLW-06013: deprecated parameter PLSQL_DEBUG forces PLSQL_OPTIMIZE_LEVEL <= 1
PLW-06015: parameter PLSQL_DEBUG is deprecated; use PLSQL_OPTIMIZE_LEVEL = 1
Looks like PLSQL_DEBUG has been deprecated for a long time:
The PLSQL_DEBUG
parameter is deprecated. It is retained for backward compatibility only.
I guess this parameter is set by TOAD?
Still happens when compiling with TOAD 17.1 (with "Toggle Compiling with Debug" enabled). Oracle 19c.
Can you reproduce this?
I've confirmed that the only place we might explicitly set that in Toad is if you use JDWP debugging, and in that case, it's only in the debug session which exists only for a short time. There is no other place in our source that sets PLSQL_DEBUG.
Interestingly, I can reproduce your steps using SQL*Plus and never setting PLSQL_DEBUG, so I guess something is going on at the database level. I think the message is just triggered whenever a procedure is compiled with debug.
SQL*Plus: Release 19.0.0.0.0 - Production on Tue May 14 09:07:29 2024
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Tue May 14 2024 09:07:05 -05:00
Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL>
SQL> ALTER SESSION SET PLSQL_WARNINGS = 'ENABLE:ALL';
Session altered.
SQL>
SQL> alter procedure TEST_PROC compile;
SP2-0805: Procedure altered with compilation warnings
SQL>
SQL> select text
2 from user_errors
3 where name = 'TEST_PROC'
4 and text like '%PLSQL_DEBUG%';
no rows selected
SQL>
SQL> alter procedure test_proc compile debug;
SP2-0805: Procedure altered with compilation warnings
SQL>
SQL> select text
2 from user_errors
3 where name = 'TEST_PROC'
4 and text like '%PLSQL_DEBUG%';
TEXT
--------------------------------------------------------------------------------
PLW-06015: parameter PLSQL_DEBUG is deprecated; use PLSQL_OPTIMIZE_LEVEL = 1
PLW-06013: deprecated parameter PLSQL_DEBUG forces PLSQL_OPTIMIZE_LEVEL <= 1
SQL>
SQL>
1 Like
I'm not really debugging.
The button "Toggle Compiling with Debug" was active, so when compiling code it shows this warning in user_errors
.

CREATE OR REPLACE PROCEDURE test
AS
BEGIN
NULL;
END test;
SELECT text FROM user_errors WHERE name = 'TEST';
PLW-06015: parameter PLSQL_DEBUG is deprecated; use PLSQL_OPTIMIZE_LEVEL = 1
PLW-06013: deprecated parameter PLSQL_DEBUG forces PLSQL_OPTIMIZE_LEVEL <= 1
Disable it and recompile, and the errors are gone.
Hi Peter,
This can be reproduced in SQL*Plus. It is not a Toad issue.
-John
Sorry, looks like I did not read your whole answer.
Strange behavior, thanks for looking into it!
1 Like
I edited my answer after my initial reply, so it may have just been bad timing.