ORACLE PROVIDER HORRIBLE MEMORY LEAK 
Author Message
 ORACLE PROVIDER HORRIBLE MEMORY LEAK

Ack !

I have just discovered on the Microsoft Knowledge Base why all my
batch-oriented applications which use the Microsoft OLE-DB Provider For
Oracle eventually grab all the virtual memory (paging file) for themselves !
This is even happenning while stepping through very large read-only
ADODB.Recordsets created with "SELECT . . ." SQL.

Article ID: Q236583

If you use ADODB.Connection.Execute() to create ADODB.Recordsets . . .
memory leaks can then occur !!!!!!!!

There is no workaround !!!!

I am on VB6 SP3, latest MDAC, NT4 SP5.

Here is the article text:

BUG: Microsoft Oracle Provider Leaks Memory Through ICommandText

----------------------------------------------------------------------------
----
The information in this article applies to:

Microsoft OLE DB Provider for Oracle, version 2.1

----------------------------------------------------------------------------
----

SYMPTOMS
The Microsoft OLE DB Provider for Oracle leaks memory when you use
ICommandText::SetCommandText(), ICommandText::Execute(), and
ICommandText::Release().

RESOLUTION
Currently, there are no workarounds for this problem.

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at
the beginning of this article.

MORE INFORMATION
The following code reproduces the memory leak:

hr = pIDBCreateCommand->CreateCommand( NULL,
 IID_ICommandText, ( IUnknown ** ) & pICommandText );

hr = pICommandText->SetCommandText( DBGUID_DBSQL, wSQLString );

hr = pICommandText->Execute( NULL, IID_IRowset, NULL,
 & cRowsAffected, ( IUnknown ** ) & pIRowset );

if( pIRowset )
 pIRowset->Release();

hr = pICommandText->Release();

Additional query words:

Keywords          : kbOLEDB kbGrpMDAC kbGrpOLEDB
Version           : WINDOWS:2.1
Platform          : WINDOWS
Issue type        : kbbug



Thu, 06 Jun 2002 03:00:00 GMT  
 ORACLE PROVIDER HORRIBLE MEMORY LEAK
I thought I was doomed until I discovered you can avoid leak (at least in
JET OLEDB) if you create brand new connection and run SELECT against it.

Catch is, you may not see the most recent changes to your data due to some
caching problem in ADO... :-(

=Mario


Quote:
> Ack !

> I have just discovered on the Microsoft Knowledge Base why all my
> batch-oriented applications which use the Microsoft OLE-DB Provider For
> Oracle eventually grab all the virtual memory (paging file) for themselves
!
> This is even happenning while stepping through very large read-only
> ADODB.Recordsets created with "SELECT . . ." SQL.

> Article ID: Q236583

> If you use ADODB.Connection.Execute() to create ADODB.Recordsets . . .
> memory leaks can then occur !!!!!!!!

> There is no workaround !!!!

> I am on VB6 SP3, latest MDAC, NT4 SP5.

> Here is the article text:

> BUG: Microsoft Oracle Provider Leaks Memory Through ICommandText

> --------------------------------------------------------------------------
--
> ----
> The information in this article applies to:

> Microsoft OLE DB Provider for Oracle, version 2.1

> --------------------------------------------------------------------------
--
> ----

> SYMPTOMS
> The Microsoft OLE DB Provider for Oracle leaks memory when you use
> ICommandText::SetCommandText(), ICommandText::Execute(), and
> ICommandText::Release().

> RESOLUTION
> Currently, there are no workarounds for this problem.

> STATUS
> Microsoft has confirmed this to be a bug in the Microsoft products listed
at
> the beginning of this article.

> MORE INFORMATION
> The following code reproduces the memory leak:

> hr = pIDBCreateCommand->CreateCommand( NULL,
>  IID_ICommandText, ( IUnknown ** ) & pICommandText );

> hr = pICommandText->SetCommandText( DBGUID_DBSQL, wSQLString );

> hr = pICommandText->Execute( NULL, IID_IRowset, NULL,
>  & cRowsAffected, ( IUnknown ** ) & pIRowset );

> if( pIRowset )
>  pIRowset->Release();

> hr = pICommandText->Release();

> Additional query words:

> Keywords          : kbOLEDB kbGrpMDAC kbGrpOLEDB
> Version           : WINDOWS:2.1
> Platform          : WINDOWS
> Issue type        : kbbug



Fri, 07 Jun 2002 03:00:00 GMT  
 ORACLE PROVIDER HORRIBLE MEMORY LEAK
mario, create a new connection when ?  each time you want to perform a new
query ?  does this apply to all types of queries or just SELECT queries ?

how bad is the memory leak you are experiencing ?



Sun, 09 Jun 2002 03:00:00 GMT  
 ORACLE PROVIDER HORRIBLE MEMORY LEAK

Example of how to cause memory leak:

cmd.CommandText = "SELECT * FROM DUAL
rs.CursorLocation = adUseClient
rs.Open cmd, , adOpenStatic, adLockReadOnly

Example of how to bypass memory leak:

With rs
  .CursorLocation = adUseClient
  .Open pstrSQL, cn, adOpenStatic, adLockReadOnly
  If .State <> adStateClosed Then Set .ActiveConnection = Nothing
End With

However, the MS OLE DB Provider for Oracle is not suitable for
multi-threaded environments (such as MTS) supporting more than
a few tens of users. In my scalability testing I experienced complete
failure at 100 users in less than 10 minutes and at 50 users in less
than 30 minutes. The MS ODBC Driver for Oracle allows higher
user counts for extended periods, but has its own limits with regard
to scaling in the MTS environment.

Mike

Quote:

>Ack !

>I have just discovered on the Microsoft Knowledge Base why all my
>batch-oriented applications which use the Microsoft OLE-DB Provider For
>Oracle eventually grab all the virtual memory (paging file) for themselves
!
>This is even happenning while stepping through very large read-only
>ADODB.Recordsets created with "SELECT . . ." SQL.

>Article ID: Q236583

>If you use ADODB.Connection.Execute() to create ADODB.Recordsets . . .
>memory leaks can then occur !!!!!!!!

>There is no workaround !!!!

>I am on VB6 SP3, latest MDAC, NT4 SP5.

>Here is the article text:

>BUG: Microsoft Oracle Provider Leaks Memory Through ICommandText

>---------------------------------------------------------------------------
-
>----
>The information in this article applies to:

>Microsoft OLE DB Provider for Oracle, version 2.1

>---------------------------------------------------------------------------
-
>----

>SYMPTOMS
>The Microsoft OLE DB Provider for Oracle leaks memory when you use
>ICommandText::SetCommandText(), ICommandText::Execute(), and
>ICommandText::Release().

>RESOLUTION
>Currently, there are no workarounds for this problem.

>STATUS
>Microsoft has confirmed this to be a bug in the Microsoft products listed
at
>the beginning of this article.

>MORE INFORMATION
>The following code reproduces the memory leak:

>hr = pIDBCreateCommand->CreateCommand( NULL,
> IID_ICommandText, ( IUnknown ** ) & pICommandText );

>hr = pICommandText->SetCommandText( DBGUID_DBSQL, wSQLString );

>hr = pICommandText->Execute( NULL, IID_IRowset, NULL,
> & cRowsAffected, ( IUnknown ** ) & pIRowset );

>if( pIRowset )
> pIRowset->Release();

>hr = pICommandText->Release();

>Additional query words:

>Keywords          : kbOLEDB kbGrpMDAC kbGrpOLEDB
>Version           : WINDOWS:2.1
>Platform          : WINDOWS
>Issue type        : kbbug



Mon, 10 Jun 2002 03:00:00 GMT  
 ORACLE PROVIDER HORRIBLE MEMORY LEAK


Fri, 19 Jun 1992 00:00:00 GMT  
 ORACLE PROVIDER HORRIBLE MEMORY LEAK
Check this url:
http://support.microsoft.com/support/kb/articles/q236/5/83.asp

This fix appears to be from last summer.  Is this not valid?

Bob


Quote:
> Ack !

> I have just discovered on the Microsoft Knowledge Base why all my
> batch-oriented applications which use the Microsoft OLE-DB Provider For
> Oracle eventually grab all the virtual memory (paging file) for themselves
!
> This is even happenning while stepping through very large read-only
> ADODB.Recordsets created with "SELECT . . ." SQL.

> Article ID: Q236583

> If you use ADODB.Connection.Execute() to create ADODB.Recordsets . . .
> memory leaks can then occur !!!!!!!!

> There is no workaround !!!!

> I am on VB6 SP3, latest MDAC, NT4 SP5.

> Here is the article text:

> BUG: Microsoft Oracle Provider Leaks Memory Through ICommandText

> --------------------------------------------------------------------------
--
> ----
> The information in this article applies to:

> Microsoft OLE DB Provider for Oracle, version 2.1

> --------------------------------------------------------------------------
--
> ----

> SYMPTOMS
> The Microsoft OLE DB Provider for Oracle leaks memory when you use
> ICommandText::SetCommandText(), ICommandText::Execute(), and
> ICommandText::Release().

> RESOLUTION
> Currently, there are no workarounds for this problem.

> STATUS
> Microsoft has confirmed this to be a bug in the Microsoft products listed
at
> the beginning of this article.

> MORE INFORMATION
> The following code reproduces the memory leak:

> hr = pIDBCreateCommand->CreateCommand( NULL,
>  IID_ICommandText, ( IUnknown ** ) & pICommandText );

> hr = pICommandText->SetCommandText( DBGUID_DBSQL, wSQLString );

> hr = pICommandText->Execute( NULL, IID_IRowset, NULL,
>  & cRowsAffected, ( IUnknown ** ) & pIRowset );

> if( pIRowset )
>  pIRowset->Release();

> hr = pICommandText->Release();

> Additional query words:

> Keywords          : kbOLEDB kbGrpMDAC kbGrpOLEDB
> Version           : WINDOWS:2.1
> Platform          : WINDOWS
> Issue type        : kbbug



Sun, 30 Jun 2002 03:00:00 GMT  
 ORACLE PROVIDER HORRIBLE MEMORY LEAK
bob,

that MS Knowledge Base Q number (Q236583) is the same Q number as the
original article which described the bug.  apparently they updated the
article to a "FIX" on dec 29 1999.   the fix is only available as a special
patch , which apparently you can obtain only by directly phoning ms support
and asking for it.   i have not yet been able to get in touch with the right
people so as to get my hands on the patch.

has anyone else ??

also, i am suspicious that this patch might address a much smaller memory
leak than the one i am experiencing.  i am experiencing my "memory leak"
only when using ADO with client-side cursors.  basically, ADO will attempt
to transfer over the entire recordset until it runs out of ram + virtual
memory , at which point it will fail with a provider-specific error "7 out
of memory"

so if a million record recordset is opened and each record needs 1000 bytes
in the local cache then up to 1 gig of ram+virtual memory will be filled
up -- assuming that much is available.

this is an absurd situation, considering that ADODB.Recordset.CacheSize is
the property which is suppossed to directly control approximately how much
memory can be grabbed by the recordset on the local client.

Quote:

>Check this url:
>http://support.microsoft.com/support/kb/articles/q236/5/83.asp

>This fix appears to be from last summer.  Is this not valid?

>Bob



>> Ack !

>> I have just discovered on the Microsoft Knowledge Base why all my
>> batch-oriented applications which use the Microsoft OLE-DB Provider For
>> Oracle eventually grab all the virtual memory (paging file) for
themselves
>!
>> This is even happenning while stepping through very large read-only
>> ADODB.Recordsets created with "SELECT . . ." SQL.

>> Article ID: Q236583

>> If you use ADODB.Connection.Execute() to create ADODB.Recordsets . . .
>> memory leaks can then occur !!!!!!!!

>> There is no workaround !!!!

>> I am on VB6 SP3, latest MDAC, NT4 SP5.

>> Here is the article text:

>> BUG: Microsoft Oracle Provider Leaks Memory Through ICommandText

>> -------------------------------------------------------------------------
-
>--
>> ----
>> The information in this article applies to:

>> Microsoft OLE DB Provider for Oracle, version 2.1

>> -------------------------------------------------------------------------
-
>--
>> ----

>> SYMPTOMS
>> The Microsoft OLE DB Provider for Oracle leaks memory when you use
>> ICommandText::SetCommandText(), ICommandText::Execute(), and
>> ICommandText::Release().

>> RESOLUTION
>> Currently, there are no workarounds for this problem.

>> STATUS
>> Microsoft has confirmed this to be a bug in the Microsoft products listed
>at
>> the beginning of this article.

>> MORE INFORMATION
>> The following code reproduces the memory leak:

>> hr = pIDBCreateCommand->CreateCommand( NULL,
>>  IID_ICommandText, ( IUnknown ** ) & pICommandText );

>> hr = pICommandText->SetCommandText( DBGUID_DBSQL, wSQLString );

>> hr = pICommandText->Execute( NULL, IID_IRowset, NULL,
>>  & cRowsAffected, ( IUnknown ** ) & pIRowset );

>> if( pIRowset )
>>  pIRowset->Release();

>> hr = pICommandText->Release();

>> Additional query words:

>> Keywords          : kbOLEDB kbGrpMDAC kbGrpOLEDB
>> Version           : WINDOWS:2.1
>> Platform          : WINDOWS
>> Issue type        : kbbug



Fri, 05 Jul 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Horrible Memory Leaks...

2. VB4 32 Oracle Memory leak

3. Oracle/RDO Memory Leak?

4. Connecting to Oracle thru Oracle OLE DB Provider(OraOLDDB.Oracle)

5. Memory Leaks/Resource Leaks

6. OLE Automation Problems - MEMORY HOG (Memory Leak?)

7. memory leak in vitual memory

8. memory leak on vitual memory

9. Memory Leak -- Out of Memory

10. ADO Memory Leak results in out of memory

11. Unable to connect Oracle using the Microsoft OLE DB Provider for Oracle

12. Memory leaks using shell from VBA with winAPI kernel32

 

 
Powered by phpBB® Forum Software