Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / March 2004

Tip: Looking for answers? Try searching our database.

ODBC Memory Leak

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
M. Oakley - 03 Mar 2004 20:42 GMT
We are using ODBC connection pooling with DB2 v 8.1 on Win 2000 v5
sp4.

Each time we get a connection, SQLConnect, we see the memory usage go
up, about 52K.  When we return the connection to the pool,
SQLDisconnect, and after the time that the connection remains in pool
expires we see the memory usage drop by about 28K.

Our basic steps for a select are:
 SQLAllocHandle(SQL_HANDLE_DBC, hGblEnv, &hdbc);
 SQLSetConnectAttr(hdbc, SQL_ATTR_LOGIN_TIMEOUT,
(SQLPOINTER)lLoginTimeOut, 0);
 SQLSetConnectAttr(hdbc, SQL_ATTR_ACCESS_MODE,
                 (SQLPOINTER)SQL_MODE_READ_ONLY, SQL_IS_POINTER);
 SQLConnect(hdbc,(SQLCHAR *)szDatabase, SQL_NTS,
                 (SQLCHAR *)szUserId,   SQL_NTS,
                 (SQLCHAR *)szPassword, SQL_NTS);
 SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
 // Build the select statement
 SQLExecDirect(hstmt, (SQLCHAR * )pszSQLStmt, strlen(pszSQLStmt));
 SQLFetch(hstmt);
 SQLFreeHandle (SQL_HANDLE_STMT, hstmt);
 SQLDisconnect(hdbc);

Same memory leak occurs in SQL Server 2000, but that's another forum.
Mark Yudkin - 05 Mar 2004 07:52 GMT
You need to open this problem against the Microsoft MDAC. The very fact that
you have the same problem with both DB2 and SQL Server should alert you to
the likelhood of the problem's being in the MDAC drivers. Open the case with
Microsoft support.

> We are using ODBC connection pooling with DB2 v 8.1 on Win 2000 v5
> sp4.
[quoted text clipped - 21 lines]
>
> Same memory leak occurs in SQL Server 2000, but that's another forum.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.