Home » Other » Client Tools » Serveroutput (10.2.0.4.0 ,windows)
Serveroutput [message #439831] Tue, 19 January 2010 10:28 Go to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
Hi,

i know something about serveroutput like we need to manually set on in sqlplus
to display the output .

Can somebody tell me what exactly it is and where/when it is used ?
i mean is it only used for procedure or for sql query also ??

Regards,
Re: Serveroutput [message #439832 is a reply to message #439831] Tue, 19 January 2010 10:34 Go to previous messageGo to next message
cookiemonster
Messages: 13961
Registered: September 2008
Location: Rainy Manchester
Senior Member
serveroutput prints the output of calls to dbms_output
Re: Serveroutput [message #439839 is a reply to message #439831] Tue, 19 January 2010 11:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Can you explain your question, I have to admit I understant nothing of what you know and what you want to know.

Maybe you will find the answer in documentation? SQL*PlusĀ® User's Guide and Reference

Regards
Michel
Re: Serveroutput [message #439845 is a reply to message #439839] Tue, 19 January 2010 12:08 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
Thanks.

My question here is, when to set serveroutput in sqlplus tool?

When running SQL query or running procedure ??

Now i think from the link you provided and the answer from Cookie , i understood that
this can be used at the time of running the procedure .


Regards,
Re: Serveroutput [message #439846 is a reply to message #439845] Tue, 19 January 2010 12:19 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
using CUT & PASTE show what you did & how sqlplus responded
Re: Serveroutput [message #439862 is a reply to message #439845] Tue, 19 January 2010 14:37 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you'll get the (basic) idea by seeing this tiny example: first, create a (PL/SQL) procedure which is supposed to say "Hello":
SQL> create procedure prc_print is
  2  begin
  3    dbms_output.put_line('Hello!');
  4  end;
  5  /

Procedure created.

Execute it (note that no other settings have been done):
SQL> exec prc_print;

PL/SQL procedure successfully completed.
It has completed, but - nothing had happened (no "Hello" message).

Now set serveroutput on and execute the procedure once again:
SQL> set serveroutput on
SQL> exec prc_print;
Hello!

PL/SQL procedure successfully completed.
See? "Hello" is now here.
Re: Serveroutput [message #439940 is a reply to message #439862] Wed, 20 January 2010 05:14 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member

Littlefoot
Thanks for your examples.Now i understood .

Thank you all.


Regards,
Re: Serveroutput [message #476522 is a reply to message #439839] Thu, 23 September 2010 12:58 Go to previous messageGo to next message
lpimentel
Messages: 10
Registered: September 2010
Junior Member
Please, do y know how to display current "serveroutput on size"
?
I can't find it in Sqlplus manual.

tks.
Re: Serveroutput [message #476525 is a reply to message #476522] Thu, 23 September 2010 13:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL> show serveroutput
serveroutput ON SIZE 1000000 FORMAT WRAPPED

Regards
Michel
Re: Serveroutput [message #476526 is a reply to message #476522] Thu, 23 September 2010 13:46 Go to previous messageGo to next message
lpimentel
Messages: 10
Registered: September 2010
Junior Member
I set it "set serveroutput on size 1000000" in Unix Server
where the database is located
/b_dados/oracle8i/product/8.1.7/sqlplus/admin/glogin.sql

But when I display "show serveroutput" shows "OFF" ???

SQL> show serveroutput
serveroutput OFF
SQL>
Re: Serveroutput [message #476534 is a reply to message #476526] Thu, 23 September 2010 14:23 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
So it is OFF whatever you think.

Regards
Michel
Re: Serveroutput [message #476538 is a reply to message #476534] Thu, 23 September 2010 14:53 Go to previous messageGo to next message
lpimentel
Messages: 10
Registered: September 2010
Junior Member
Did I miss something ? I need to set "serveroutput 1000000"
to solve "overflow" error.
Re: Serveroutput [message #476539 is a reply to message #476538] Thu, 23 September 2010 14:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use SQL*Plus and copy and paste your session, the WHOLE session.

Before, Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.

Regards
Michel
Re: Serveroutput [message #476908 is a reply to message #476538] Mon, 27 September 2010 05:59 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
lpimentel wrote on Thu, 23 September 2010 21:53
Did I miss something ? I need to set "serveroutput 1000000"
to solve "overflow" error.

set serveroutput ON SIZE 1000000

[Updated on: Mon, 27 September 2010 06:00]

Report message to a moderator

Previous Topic: Stored Procedures (HELP NEEDED)
Next Topic: login to isql*plus
Goto Forum:
  


Current Time: Sun Dec 22 06:23:25 CST 2024