You can't SET SERVEROUTPUT ON from within a PL/SQL block,
because that's a SQL*Plus command, not a PL/SQL function.
You *can* invoke dbms_output.enable(), but that still
doesn't set the flag within SQL*Plus that tells SQL*Plus to
fetch and display the output.

If you tend to forget a lot, you could issue the SET
SERVEROUTPUT ON command from your SQL*Plus login file.

I know of no way to directly execute commands from within a
PL/SQL block. I have heard of using DBMS_PIPE to send
commnands to a daemon (written in a language such as C) that
executes commands on your behalf. I've never actually done
that myself, but I can see where it's possible.

Best regards,

Jonathan Gennick   
mailto:[EMAIL PROTECTED] * 906.387.1698
http://Gennick.com * http://MichiganWaterfalls.com * http://ValleySpur.com

Friday, February 22, 2002, 4:13:19 PM, you wrote:
kk> I can i issue host commands from within a PL/SQL block in 8i(8.1.7) ??
kk> Also is there a way to issue set serveroutput on from within a stored 
kk> procedure so that when someone run the stored procedure, the stored 
kk> procedure output will be seen even if the person forgot to set serveroutput 
kk> on for their sql*plus session ??

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jonathan Gennick
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to