Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SPOOL Problem
I would expect that it is an SQL*Plus
bug as this is the program that is responsible for accepting the data from the
RDBMS and outputting it to file. (The fact that the realloc system call is
unhandled would indicate to me that the memory allocation routine is not being
tested which is certainly a bug).
Typically a program would read the
incoming data (from the RDBMS) into a buffer and then writing from that buffer
to the output destination (eg terminal/disk file).
If memory is continuously being
allocated to increase the size of the buffer but it is not being released then
this leads to a memory leak.
Of course, there could be another reason
for your problem so best to raise a TAR and have the guys that write the
software give you the definitive answer. To be honest, I’ve never tried
creating a spool file that large and it may be that the developers of SQL*Plus
didn’t anticipate users would have this requirement either!
What are you actually trying to achieve,
there may be an alternative solution?
Cheers
Graeme Farmer
From:
oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of "Yongping Yao"
<yaoyongping@gmail.com>
Sent: Wednesday, 7 June 2006 1:02
PM
To: "Graeme.Farmer
Cc: oracle-l@freelists.org
Subject: Re: SPOOL Problem
Thank you for your reply.
You mean it's a Oracle Bug or maybe a SQL*Plus bug?
On 6/7/06, Graeme.Farmer@mincom.com <Graeme.Farmer@mincom.com> wrote:
Looks like a memory leak bug. Can't imagine the
SQL*Plus would intentionally need to allocate memory for the entire output
stream.
The reason for the variability in your results
probably relates to the amount of memory available on the heap at the time.
Cheers
Graeme
Farmer
Consulting
Architect
MMS
Architecture & Solutions Design
From: oracle-l-bounce@freelists.org
[mailto:
oracle-l-bounce@freelists.org] On Behalf
Of "Yongping Yao" <yaoyongping@gmail.com>
Sent: Wednesday, 7 June 2006 12:13
PM
To: oracle-l@freelists.org
Subject: SPOOL Problem
Hi all,
I don't know if it's off topic, but I met it in SQLPlus.
I SPOOLed the output into a text. When the file reached to GB, an
exception "xrealloc: cannot reallocate 706258176 bytes (0 bytes
allocated)" occurred. I tried again and again. Everytime the exception
occurred with different file size. Sometime it was about 3G, sometime it's near
1G ( and of cource the number in the error is different everytime ).
-bash-2.05b$ uname -a
Linux zszj2 2.4.21-27.EL #1 Wed Dec 1 22:08:15 EST 2004 i686 i686 i386
GNU/Linux
That's my OS. I also tried on Solaris 8, just the same. So I think it's
not a 32bitOS or 64bitOS problem. The database is 9.2.0.1.
Have anyone met and solved it?
Thank you in advance.
--
Learning Oracle, UNIX/Linux...
Love
Blog: http://spaces.msn.com/members/yaoyp/
--
This
transmission is for the intended addressee only and is confidential
information. If you have received this transmission in error, please notify the
sender and delete the transmission. The contents of this e-mail are the opinion
of the writer only and are not endorsed by the Mincom Group of companies unless
expressly stated otherwise.
--
Learning Oracle, UNIX/Linux...
Love
Blog:
http://spaces.msn.com/members/yaoyp/