Oracle dbms_output.put_line only displays ??? in message window

27 views
Skip to first unread message

MudGuard

unread,
Apr 13, 2022, 10:20:26 AMApr 13
to SQL Workbench/J - DBMS independent SQL tool
Hi,
I try to do some output to the Message window in SqlWorkbench, connected to Oracle 12g database.
I tried the following:

CREATE OR REPLACE PROCEDURE AndreasTest AS
BEGIN
  dbms_output.put_line('DEBUG: starting ');
  dbms_output.put_line('DEBUG: middle ');
  dbms_output.put_line('DEBUG: finished ');
END;
/

then for running the procedure:

set serveroutput on;
exec AndreasTest();

the result:

Execution time: 0ms
Statement 1 of 2 finished (2022-04-13 15:59:59.901)

???
???
???

AndreasTest executed successfully

Execution time: 6ms
Statement 2 of 2 finished (2022-04-13 15:59:59.925)


Script execution finished (2022-04-13 15:59:59.937)
Total script execution time: 6ms

If I change the number of put_line calls, this will change the number of "???" lines in the output.
If I use SET SERVEROUTPUT OFF  the lines with the ??? will not appear.
So SET SERVEROUTPUT is working.
The put_line only works insofar as it creates a ??? line - but not a line with the given text.

Do I need to configure something to get the real text instead of the ???

It does not help to replace the "exec" with "wbCall" ...

Thanks in advance
Andreas

Thomas Kellerer

unread,
Apr 13, 2022, 11:58:49 AMApr 13
to sql-wo...@googlegroups.com

Hmm, I canot reproduce this. But I only have access to an Oracle 19 database.

But the code for that hasn't changed for ages and I am 100% sure it worked backed when we were still using Oracle 12

What is your driver version?


MudGuard

unread,
Apr 13, 2022, 12:59:57 PMApr 13
to SQL Workbench/J - DBMS independent SQL tool
Thanks for the hint - I upgraded from ojdbc6 to ojdbc11, and now it works.

You were completely right in suspecting the driver!

Thanks again,
and a happy easter egg search ;-)

Andreas
Reply all
Reply to author
Forward
0 new messages