3
votes

I have an oracle stored procedure which has output to the users in the form of

DBMS_OUTPUT.PUT_LINE('....');

I run the stored procedure through .sql file in sqlplus and none of the output messages of the stored procedures are being shown in sqlplus command window. How could I get the outputs to show in the command window?

Thanks,

2
Before running the script, try writing SET SERVEROUTPUT ON. - tilley31

2 Answers

7
votes

You need set your server output to on by this command:

SET serveroutput ON;

Cheers!

3
votes

PhatHV's answer is correct.

Additionally, you can give size if you want in range 2000 through 1000000. SET serveroutput ON size 2000;

For more detail, you can see https://oracleblogging.wordpress.com/2010/10/08/dbms_output-buffer-set-serveroutput-on-size/