Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle output in sqlplus

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,

like image 237
javakid1993 Avatar asked Nov 05 '25 05:11

javakid1993


2 Answers

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

SET serveroutput ON;

Cheers!

like image 183
PhatHV Avatar answered Nov 08 '25 09:11

PhatHV


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/

like image 35
Oğuz Çam Avatar answered Nov 08 '25 09:11

Oğuz Çam