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
1 Answer
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.
2 Comments
dbms_output buffer. You would write that sort of thing to a table that tracks each execution of your extract. As I said in my answer, you can enable and disable dbms_output from PL/SQL. You cannot set feedback off from PL/SQL since that is a client-side setting. And your server-side PL/SQL cannot force the client application to have enabled serveroutput.
"want to do some changes in"can you elaborate"some"?