ODBC connection to Oracle shows handle count leak

From: Kong Li (likong_at_email.com)
Date: 04/24/04

  • Next message: ad: "query date/time"
    Date: 23 Apr 2004 19:03:31 -0700
    
    

    Follow up to this thread. The latest Oracle 9i release 2 patchset
    (9.2.0.5) fixed this problem. The problem is within Oracle client.

    Thanks.

    Kong

    -----
    From: Kong Li (likong@email.com)
    Subject: Re: ODBC connection to Oracle shows handle count leak
    This is the only article in this thread
    View: Original Format
    Newsgroups: microsoft.public.data.odbc
    Date: 2004-01-30 17:35:11 PST
     

    Follow up to this thread,
    In addition to Microsoft ODBC for Oracle, I also tried Oracle ODBC
    driver (version 9.02.00.54) while keeping everything else the same.
    There is also handle count leak. 2 per
    allochandle/connect/disconnect/freehandle, identical to the behavior
    of using Microsoft ODBC for Oracle.

    I used the same code to connect to SQL 2000 with MSSQL ODBC driver
    (version 2000.81.9042.00). There is no handle count leak.

    The Oracle server is 9i (9.2.0).

    Here is the skelton code:
        SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
        while (true) {
            construct connection string for a new Oracle server
            SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
            if (SQL_SUCCEEDED(SQLDriverConnect(hdbc,...))) {
                SQLDisconnect(hdbc);
            }
            SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
        }

    Any ideas or pointers?

    Thanks.

    Kong

    "Kong Li" <likong@email.com> wrote in message news:<uUlODAI5DHA.3548@TK2MSFTNGP11.phx.gbl>...
    > Environments:
    > 1. WinXP SP1, MDAC 2.7 SP1 (Microsoft ODBC for Oracle is 2.573.9030.0),
    > Oracle client 9.2.0.1.
    > 2. Win2000 SP4, MDAC 2.7 SP1 (Microsoft ODBC for Oracle is 2.573.9030.0),
    > Oracle client 9.2.0.1.
    > 3. Win2000 SP4, MDAC 2.8 (Microsoft ODBC for Oracle is 2.573.1022.0), Oracle
    > client 9.2.0.1.
    >
    > I have a simple program calling SQLDriverConnect (not OLEDB, not ADO, but
    > ODBC) to an Oracle server 9.2, and then disconnect. The value of handle
    > count increases by 2 each time I did the connect/disconnect. This has been
    > verified on the above 3 environments. Turning on/off ODBC connection
    > pooling does not change the handle count leakage.
    >
    > Connection caching is not an option for me since the application connects to
    > a set of Oracle servers that keep changing.
    >
    > Is this a known problem?
    >
    > Any pointers, ideas?
    >
    > Thanks.
    >
    > Kong


  • Next message: ad: "query date/time"

    Relevant Pages

    • Re: Oracle Database and VB6
      ... Other ways to connect to Oracle beside ODBC? ... > name and the Oracle ODBC driver in the client PC and everything are OK, ... >> You will find drivers on your Oracle Client CD. ...
      (microsoft.public.vb.general.discussion)
    • Re: Whats so bad about ODBC
      ... It is far better to connect to Oracle using the native connectivity. ... What exactly might be a problem with ODBC? ... data to be fetched to the client, and have it filtered on the client. ... actual execution paths are often unpredictable, ...
      (comp.databases.oracle.server)
    • RE: Windows to Oracle
      ... resolved yet (with respect to a Windows OS). ... and Oracle DBDs. ... Need to install Oracle on your own machine before you can connect to the ... If you are truly trying to use ODBC, why are you specifying the Oracle ...
      (perl.dbi.users)
    • Re: MS OLE DB for ODBC with Oracle ODBC source headaches
      ... John Bell wrote: ... the Oracle OLEDB provider (as opposed to the Microsoft OLE for ODBC ... >> I have no idea why sometimes I can connect to the linked server with no ...
      (comp.databases.ms-sqlserver)
    • Re: Probleme unter Access beim Zugriff auf Oracle-Daten
      ... Der Zugriff erfolgt via ODBC mit dem Microsoft Treiber. ... Hier wird allerdings nicht wirklich etwas Bewegendes gemacht: mit Access-backend verkünpfte Tabellen, mit via ODBC eingebundene Oracle Tabellen und eine PT-Abfrage. ... Schema: Es gibt zwei Schemata, welche vom Aufbau absolut identisch sind. ...
      (microsoft.public.de.access.clientserver)