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

Home -> Community -> Usenet -> c.d.o.tools -> Re: DBMS_OUTPUT

Re: DBMS_OUTPUT

From: Thomas Jensen <tintin_at_image.dk>
Date: Wed, 08 Sep 2004 21:07:31 +0200
Message-ID: <413f5873$0$276$edfadb0f@dread11.news.tele.dk>


David_T MO wrote:
> I'm a long time SQL user but an Oracle newbie and have inherited an
> Oracle database. I'm trying to get DBMS_OUTPUT going but am hitting a
> brick wall. I can describe the package and execute the 'set
> serveroutput on' command, but anytime I attempt to use any procedure
> within the package I get an 'unknown command' error (see below).
> Doesn't matter what user_id I use. I've rerun the dbmsotpt.sql as SYS
> successfully but no joy on using the procedures.
>
> Any suggestions on how to get DBMS_OUTPUT working?
>
> ---
>
> limsd>describe dbms_output;
> PROCEDURE DISABLE
> PROCEDURE ENABLE
> Argument Name Type In/Out
> Default?
> ------------------------------ ----------------------- ------
> --------
> BUFFER_SIZE NUMBER(38) IN DEFAULT
> PROCEDURE GET_LINE
> Argument Name Type In/Out
> Default?
> ------------------------------ ----------------------- ------
> --------
> LINE VARCHAR2 OUT
> STATUS NUMBER(38) OUT
> PROCEDURE GET_LINES
> Argument Name Type In/Out
> Default?
> ------------------------------ ----------------------- ------
> --------
> LINES TABLE OF VARCHAR2(255) OUT
> NUMLINES NUMBER(38) IN/OUT
> PROCEDURE NEW_LINE
> PROCEDURE PUT
> Argument Name Type In/Out
> Default?
> ------------------------------ ----------------------- ------
> --------
> A VARCHAR2 IN
> PROCEDURE PUT
> Argument Name Type In/Out
> Default?
> ------------------------------ ----------------------- ------
> --------
> A NUMBER IN
> PROCEDURE PUT_LINE
> Argument Name Type In/Out
> Default?
> ------------------------------ ----------------------- ------
> --------
> A VARCHAR2 IN
> PROCEDURE PUT_LINE
> Argument Name Type In/Out
> Default?
> ------------------------------ ----------------------- ------
> --------
> A NUMBER IN
>
> limsd>SET SERVEROUTPUT ON;
> limsd>DBMS_OUTPUT.ENABLE;
> SP2-0734: unknown command beginning "DBMS_OUTPU..." - rest of line
> ignored.

Hi,

using sql*plus you have use one of the following syntaxes:

SQL> execute dbms_output.put_line('Test executing statement');

or

SQL> begin
2 dbms_output.put_line('Test using PL/SQL'); 3 end;
4 /

Best regards
Thomas Jensen Received on Wed Sep 08 2004 - 14:07:31 CDT

Original text of this message

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