Reputation: 1862
Is there any way to set the serveroutput on/off using pl/sql procedures/packages. I want to do some changes in displaying of my data on SQL*PLUS screen. like for my previous post
Upvotes: 2
Views: 2269
Reputation: 231851
You cannot call SQL*Plus commands (which run only on the client) from PL/SQL (which runs only on the server).
In the particular case where you simply want to enable and disable message output, however, you can call the PL/SQL procedures dbms_output.disable
and dbms_output.enable
.
If you are depending on the data being written via dbms_output
to be displayed to a human user, however, you are almost certainly doing something wrong. Production processes should be writing important data to some other location (i.e. a table somewhere), not writing to dbms_output
and hoping that the client application happens to be configured to display the data.
Upvotes: 2