Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBMS_OUTPUT in UDF function shown in SQL Developer

InfoDocOct 5 2017 — edited Oct 5 2017

I have a simple test function:

create or replace function put_line_function return string as

begin

dbms_output.put_line('this is some output');

return 'x';

end put_line_function;

in sql developer I

set SERVEROUTPUT ON;

Then I open the DBMS output window

pastedImage_4.png

then I call the function in a simple sql:

select put_line_function from dual;

But I never see the DBMS_OUTPUT from the PUT_LINE function

My goal was to have my db functions spit out informational messages when useful to our database team.

Is there a way to do this in oracle user defined functions?

ps: I also had this at the start of my function, but it did not help either:

DBMS_OUTPUT.ENABLE();

This post has been answered by Gary Graham-Oracle on Oct 5 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2017
Added on Oct 5 2017
5 comments
877 views