Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BUFFER OVERFLOW ERR. 1

Status
Not open for further replies.

UDIT

Technical User
Nov 24, 2000
37
0
0
US
Hi ,

While programming in PL/SQL i came accross a problem ,
i created a FOR LOOP for generating nos 100 till 1(reverse order) and also checking whether the no. is ODD or EVEN .
After giving me a display from 100 till no. 29 , an error was flashed :
ORA-20000 : ORU-10027:BUFFER OVERFLOW , LIMIT OF 2000 BYTES

Please tell how do i handle this and get the complete output?

Secondly , if i want to REDIRECT the output of the PL/SQL program directly into any text file without showing it in the oracle screen , HOW CAN I DO THAT ????

Thanks,
Udit.
 
Spool the file with the text extension and remember to turn spool off at the end of your script.
 
UDIT,


I take it your using DBMS_OUTPUT here for your output??

firstly you need to define dbms_output to have a bigger buffer so after the begin stick a :

dbms_output.enable(100000);

this is the nunmber of bytes you assign it IN THE EXAMPLE ABOVE 100,000

if you don't want the output going to the screen but to a file then you'll need to switch terminal output off with the set term off command
 
UDIT,


I take it your using DBMS_OUTPUT here for your output??

firstly you need to define dbms_output to have a bigger buffer so after the begin stick a :

dbms_output.enable(100000);

this is the nunmber of bytes you assign it IN THE EXAMPLE ABOVE 100,000

if you don't want the output going to the screen but to a file then you'll need to switch terminal output off with the set term off command in conjunction with the spool
 
To print to file, look up the SPOOL command.

Terry M. Hoey
th3856@txmail.sbc.com

Ever notice that by the time that you realize that you ran a truncate script on the wrong instance, it is too late to stop it?
 
Increase the arraysize.
set arraysize <n> where n be a number greater than 1000

thx,
Kavy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top