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: Oracle Memory Leak Using Prepare Statement

Re: Oracle Memory Leak Using Prepare Statement

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 29 Dec 1999 20:02:35 GMT
Message-ID: <386a6887.1331478@news.demon.nl>


On Wed, 29 Dec 1999 18:31:23 GMT, gladden_at_ictt.com wrote:

>I came across numerous postings on DejaNews pertaining to a memory leak
>when using the Oracle PREPARE statement to build dynamic queries and
>FETCHing records using a CURSOR. I am having the same problem with
>Oracle 7.3.4.1 running on HPUX 10.20. The following lines of code
>generate about a 4Kbyte memory leak each time it is called:
>
>sprintf( query_buffer, "SELECT a,b,c FROM t WHERE x=%d AND y=%d AND z=%d
>ORDER BY a", x, y, z);
>
>EXEC SQL PREPARE s1 FROM :query_buffer;
>EXEC SQL DECLARE c1 CURSOR FOR s1;
>EXEC SQL OPEN c1;
>while ( ...)
>{
> EXEC SQL FETCH c1
> INTO ...
>}
>EXEC SQL CLOSE c1;
>
>I believe the memory leak is based on the size of the query buffer (char
>query_buffer[3072]).
>
>Has anyone ever gotten any resolution to this problem. I have tried a
>number of times to contact Oracle Technical Support to check on a patch
>with no luck (you probably know how that goes).
>
>Any insights to this problem would be greatly appreciated!
>
>Keith E. Gladden
>ICTT, Inc.
>Systems Engineer
>Tel: 812.232.3991
>Fax: 812.232.2998
>gladden_at_ictt.com
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

The most recent version for 7.3.4 on HP-UX is 7.3.4.4. This problem might have been already addressed. You would think the upgrade can be downloaded from Metalink.

Hth

Hth,

Sybrand Bakker, Oracle DBA Received on Wed Dec 29 1999 - 14:02:35 CST

Original text of this message

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