Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Newbie DBMS_OUTPUT problem

Re: Newbie DBMS_OUTPUT problem

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/07/24
Message-ID: <33d9c87a.27341214@newshost>#1/1

don't use the dbms_output.enable and disable calls. All they do is set a flag in the dbms_output package. Since you called disable in the procedure, when sql*plus went to get the lines from dbms_output AFTER the procedure executed, dbms_output thought that output was disabled and returned NO lines.

Do this:

SQL> set serveroutput on
SQL> exec YourProcedure

And just have your procedure call dbms_output.put_line. the set serveroutput on tells sql*plus to call dbms_output.enable. You don't want to disable it.

On Thu, 24 Jul 1997 11:05:15 -0700, AMARENDRA B NETTEM <nettama_at_charlie.cns.iit.edu> wrote:

>Richard E. Isler wrote:
>>
>> Heres the problem:
>> I am writing this PL/SQL program that uses DBMS_OUTPUT.PUT_LINE to write
>> a header line, some report lines within a cursor FOR loop, and a footer
>> line e.g. DBMS_OUTPUT.PUT_LINE('End of Report');
>>
>> I have a DBMS_OUTPUT.ENABLE statement right after the BEGIN statement,
>> and a DBMS_OUTPUT.DISABLE call just before the final END; statement. The
>> procedure compiles with no errors and all I get is the message
>> 'Procedure created'.
>>
>> Any suggestions? Thanks in advance for your help.
>>
>> --
>> Richard E. Isler | "Give a man a Twinkie and you feed him
>> | for a day,
>> isler_at_sandia.gov | teach him to shoplift Twinkies and you
>> | feed him for life."
>
>Hi,
>you can see DBMS_OUTPUT message only if you EXECUTE the procedure.
>
>
>--
> AMARENDRA B NETTEM ( http://www.iit.edu/~nettama)
> Certified Oracle DBA
> WHITTMAN-HART Inc.
> CHICAGO.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jul 24 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US