0

When I am using dbms_output.put_line() in any of of Pl/SQL program, this line is not getting printed and it is not showing any kind of error message, whenever I am running my program is is just printing "PL/SQL procedure successfully completed".

For an example When I am running the following piece of code it is showing the similar behaviour and not printing anything.

DECLARE 
   message  varchar2(20):= 'Hello, World!'; 
BEGIN 
   dbms_output.put_line(message); 
END;

When I am running the above code, the output is the following:

PL/SQL procedure successfully completed

Moreover on my worksheet screen the dbms_output.put_line() is showing in colors like it is commented out. Although I have checked many times nothing is commented.

William Robertson
  • 15,273
  • 4
  • 38
  • 44

2 Answers2

3

Since you are using SQL Developer make sure to follow the steps:

  1. Go to View
  2. Click on Dbms Output (this will create a window on SQL Developer)
  3. Click the + button, this will create a prompt.
  4. Select the connection, the selected connection will appear and the background of Dbms Output will turn white
  5. Run the procedure.
Ergi Nushi
  • 837
  • 1
  • 6
  • 17
1

Don't forget to set serveroutput on. View/DBMS output/pick the connection to show the output window. In SQL Plus:

set serveroutput on size unlimited
Gary_W
  • 9,933
  • 1
  • 22
  • 40