Skip to Main Content

Oracle Database Discussions

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!

11g: dbms_output.disable / dbms_output.enable looses messages

user8704911Feb 11 2016 — edited Feb 11 2016

The documentation says:

--------

DISABLE Procedure

This procedure disables calls to PUT, PUT_LINE, NEW_LINE, GET_LINE, and GET_LINES, and purges the buffer of any remaining information.

As with the ENABLE Procedure, you do not need to call this procedure if you are using the SERVEROUTPUT option of SQL*Plus.

--------

I have a PL/SQL script A, which uses dbms_output to generate another script B (spooling dbms_output to a file).

However script A invokes a PL/SQL package C, that uses dbms_output to log error/warning/debug messages.

This clashes with script B generation of script A.

So i tried to wrap the invocation of PL/SQL package C with dbms_output.disable / dbms_output.enable.

However, as documented above DISABLE "...purges the buffer of any remaining information."

But here is no flush for dbms_output .

I cannot easily rewrite legacy code to replace script B generation via dbms_output.

Is there a way around?

best regards,

Frank

This post has been answered by doganay.wordpress.com on Feb 11 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2016
Added on Feb 11 2016
2 comments
1,633 views