0

I have a weird problem concerning DBMS_OUTPUT.PUT - it is not printing data. I've tried these solutions:

1 - SET SERVEROUTPUT ON
2 - Enable DBMS_OUTPUT

and nothing works.

Littlefoot
  • 131,892
  • 15
  • 35
  • 57
Erwin Smith
  • 65
  • 2
  • 11
  • what version of SQL Developer and what version of your database? Newer versions of sqldeveloper won't show dbms_output on a 10g instance due to a change in the jdbc driver – thatjeffsmith Nov 13 '18 at 22:12
  • please share the solutions you have found/tried, plus the actual code you are using for a test – thatjeffsmith Nov 14 '18 at 01:31

2 Answers2

1

pick dbms_output from the view menu. The window should pop open.

There is a plus sign on the window. Pick that and signin to the schema you are running in.

begin
    dbms_output.put_line('hello world');
end;

When you run it, "hello world" should appear in the window.

EvilTeach
  • 28,120
  • 21
  • 85
  • 141
  • actually my friends solve this with SET SERVEROUTPUT ON and i dont khow why its didn't work for me or any solution that i tried, should i download another sql dev version ? – Erwin Smith Nov 15 '18 at 02:58
0

Check this link and see if it is useful.

Could not add it as a comment due to reputation restriction.

Edited part starts here:

I executed the following in Oracle LiveSQL and here is how it works.

exec dbms_output.put_line('A' || CHR(10) || 'B');     --prints

begin
    dbms_output.put('A');
    dbms_output.put('B');
   -- dbms_output.put_line(' ');   --doesn't print
end;    

begin
    dbms_output.put('A');
    dbms_output.put('B');
    dbms_output.put_line(' ');  --prints
end;

begin
    dbms_output.put('A');
    dbms_output.put('B');
    dbms_output.new_line;       --prints
end;

begin
    dbms_output.put('A');
    dbms_output.put('B');
    dbms_output.put('');       --doesn't print
end;
Namandeep_Kaur
  • 368
  • 1
  • 3
  • 11