Memory Leak in Oracle ODBC Driver Calling a Stored PROCEDURE or FUNCTION (Doc ID 459255.1)

Last updated on JULY 05, 2017

Applies to:

Oracle ODBC Driver - Version: 10.2.0.1.0 to 10.2.0.3.0
Oracle ODBC Driver - Version: 11.1.0.6.0 to 11.1.0.6.0]
Information in this document applies to any platform.
***Checked for relevance on 10-Mar-2010***

Symptoms

A large memory leak is visible when calling a stored procedure using ODBC 10.2.0.3.0.
Also occurs on instant client 10.2.0.3.0 too.
The leak will show up in SQLPrepare.

Potential symptom would be:

[Oracle][ODBC]Memory allocation error.
SqlState = S1001 Native error = 0, msg count = 1


No leak present with 9.0.1.0 ODBC drivers.

Use the following source to test for the leak.
Monitor the process in task manager or any other memory diagnostic tool

1. Create a test procedure

CREATE OR REPLACE PROCEDURE P_TEST
IS
  c char;
  begin
    SELECT 'x' into c
    FROM DUAL
    WHERE 5< 4;
END;


2. Save the following source into a file "test.vbs"
Invoke using Start-> "Run" -> "Wscript test.vbs"


Dim Conn, RST
Set Conn = CreateObject("ADODB.Connection")
Conn.Open "DSN=ic102;UID=scott;Pwd=tiger;"

Wscript.echo "Starting loop"

  dim n
  n=0
  while n<1001
    n=n+1
    Set RST = Conn.Execute("{call P_TEST}")
  wend

wscript.echo "Done"

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms